# freebsd-boot & efi



## balanga (Apr 22, 2017)

Following Warren Block's instructions for setting up a disk on FreeBSD, I'm confused about the freebsd-boot and efi types which are created. When I run `gpart show`after installing FreeBSD 11.0-RELEASE amd64 there is no freebsd-boot partition only an efi partition, so I'm not sure if freebsd-boot is required.

And if I want to add Grub into the mix, apparently I also need a bios-boot type partition...

Is anyone aware of step-by-step guide to setting up FreeBSD to use EFI and GRUB2, showing the sequence in which different partition types should be added?


----------



## Phishfry (Apr 22, 2017)

No the freebsd-boot slice is not used anymore on a stock install.
Only EFI and freebsd-ufs / is needed. freebsd-boot now resides in your /boot folder.

With a manual disk install you can still partition it however you like.
https://www.freebsd.org/cgi/man.cgi?hier(7)


----------



## balanga (Apr 22, 2017)

Phishfry said:


> No the freebsd-boot slice is not used anymore on a stock install.
> Only EFI and freebsd-ufs / is needed. freebsd-boot now resides in your /boot folder.



Thanks for pointing this out, but I wonder how else I would have known this as I haven't seen mentioned anywhere...

Looking around I find very few examples of using `gpart` and certainly haven't seen an example of how to get efi to play with grub...


----------



## Phishfry (Apr 23, 2017)

Ok I missed the grub requirment. I think with a normal MBR install you might need a separate freebsd-boot slice but I wonder if you couldn't piggyback on the /EFI boot slice with your grub.cfg on a EFI install. The EFI slice is much larger than the EFI bootloader and grub size is minimal.
Do a search on "grubx64.efi"
It looks like FreeBSD -current has `efibootmgr` to help with this.
Not in FreeBSD11 but a new feature.


----------



## ANOKNUSA (Apr 23, 2017)

Phishfry said:


> No the freebsd-boot slice is not used anymore on a stock install.



It is if you're booting from a legacy BIOS board. I believe it also if you you're using an MBR partition table.



balanga said:


> Thanks for pointing this out, but I wonder how else I would have known this as I haven't seen mentioned anywhere...



Well, you don't have a freebsd-boot partition, and your system boots, so... 

It's documented in gpart(8), boot(8), and uefi(8). The documentation is simply written with the assumption that you're already familiar with the general requirements for booting any system from UEFI since, whether you're booting macOS, Linux, *BSD or Windows, the partition scheme is always the same, and there's enough information on it elsewhere that it doesn't make sense to write out several paragraphs in the man page explaining the fundamentals of UEFI.

As for GRUB, just follow the instructions on the Arch Wiki from the UEFI entry on down. GRUB is both an EFI boot binary and an EFI boot manager combined, so as long as it's on the same EFI system partition as the FreeBSD EFI boot binary and set as the first boot option in your machine's boot menu, it should work.


----------



## Phishfry (Apr 23, 2017)

Have a look at this thread for both EFI and freebsd-boot partition.
https://forums.freebsd.org/threads/58231/


----------

