Hi everyone, A few months ago I got myself a new box and I have been happily running FreeBSD on it ever since. I noticed that the boot was not as fast as I had expected and I've realized that, while my disk is GPT partitioned, the boot process is still BIOS based: % gpart show => 34 976773101 ada0 GPT (466G) 34 6 - free - (3.0K) 40 1024 1 freebsd-boot (512K) 1064 984 - free - (492K) 2048 67108864 2 freebsd-swap (32G) 67110912 909662208 3 freebsd-zfs (434G) 976773120 15 - free - (7.5K) I am reading uefi(8) and it looks like FreeBSD 11 should be able to boot using UEFI straight into ZFS, so I am thinking of converting that freebsd-boot partition to an EFI partition, creating a FAT filesystem and copying /boot/boot.efi there. How good of an idea is that? Would it really be that simple or am I missing something? My only reason for wanting to boot with UEFI is faster boot, everything is working fine otherwise. Thanks in advance for your help. Best, Fernando
On 12/16/2016 11:08, Fernando Herrero Carr?n wrote:> Hi everyone, > > A few months ago I got myself a new box and I have been happily running > FreeBSD on it ever since. I noticed that the boot was not as fast as I had > expected and I've realized that, while my disk is GPT partitioned, the boot > process is still BIOS based: > > % gpart show > => 34 976773101 ada0 GPT (466G) > 34 6 - free - (3.0K) > 40 1024 1 freebsd-boot (512K) > 1064 984 - free - (492K) > 2048 67108864 2 freebsd-swap (32G) > 67110912 909662208 3 freebsd-zfs (434G) > 976773120 15 - free - (7.5K) > > I am reading uefi(8) and it looks like FreeBSD 11 should be able to boot > using UEFI straight into ZFS, so I am thinking of converting that > freebsd-boot partition to an EFI partition, creating a FAT filesystem and > copying /boot/boot.efi there. > > How good of an idea is that? Would it really be that simple or am I missing > something? My only reason for wanting to boot with UEFI is faster boot, > everything is working fine otherwise.I would recommend creating another partition for EFI instead of replacing your freebsd-boot partition, in order to have a working fallback in case EFI boot doesn't work. You would need to steal some space from your swap partition. Otherwise, it's a good idea, and it really is that simple. I did exactly that when I updated a machine to 11 and switched to EFI. $ gpart show ada0 => 34 500118125 ada0 GPT (238G) 34 6 - free - (3.0K) 40 1024 1 freebsd-boot (512K) 1064 1600 2 efi (800K) 2664 10485144 4 freebsd-swap (5.0G) 10487808 489629696 3 freebsd-zfs (233G) 500117504 655 - free - (328K) $ sysctl machdep.bootmethod machdep.bootmethod: UEFI Eric
On Fri, Dec 16, 2016 at 06:08:34PM +0100, Fernando Herrero Carr?n wrote:> Hi everyone, > > A few months ago I got myself a new box and I have been happily running > FreeBSD on it ever since. I noticed that the boot was not as fast as I had > expected and I've realized that, while my disk is GPT partitioned, the boot > process is still BIOS based: > > % gpart show > => 34 976773101 ada0 GPT (466G) > 34 6 - free - (3.0K) > 40 1024 1 freebsd-boot (512K) > 1064 984 - free - (492K) > 2048 67108864 2 freebsd-swap (32G) > 67110912 909662208 3 freebsd-zfs (434G) > 976773120 15 - free - (7.5K) > > I am reading uefi(8) and it looks like FreeBSD 11 should be able to boot > using UEFI straight into ZFS, so I am thinking of converting that > freebsd-boot partition to an EFI partition, creating a FAT filesystem and > copying /boot/boot.efi there. > > How good of an idea is that? Would it really be that simple or am I missing > something? My only reason for wanting to boot with UEFI is faster boot, > everything is working fine otherwise. > > Thanks in advance for your help.I am also interesting by this case. I think expand freebsd-boot to about 1M (size of /boot/boot1.efifat), dding /boot/boot1.efifat and set to type to 'efi' may be enough. I am never tried this.
On Fri, 16 Dec 2016 18:08:34 +0100, Fernando Herrero Carr?n wrote: > Hi everyone, Hi, you've had plenty of helpful responses, but nobody has commented on: > My only reason for wanting to boot with UEFI is faster boot, > everything is working fine otherwise. I'm skeptical that UEFI boot would be any or noticeably faster than via BIOS, but am interested in hearing of any experiences regarding that. cheers, Ian
Hi. On 16.12.2016 22:08, Fernando Herrero Carr?n wrote:> I am reading uefi(8) and it looks like FreeBSD 11 should be able to boot > using UEFI straight into ZFS, so I am thinking of converting that > freebsd-boot partition to an EFI partition, creating a FAT filesystem and > copying /boot/boot.efi there. > > How good of an idea is that? Would it really be that simple or am I missing > something? My only reason for wanting to boot with UEFI is faster boot, > everything is working fine otherwise. >I tried the UEFI boot sequence on a Supermicro server. It boots only manually, gives some cryptic error while booting automatically. When entering the path to the EFI loader in a appearing prompt - it boots fine, but this kills the idea. I've written a message here about this, so far nobody answered (August, 14th, "FreeBSD doesn't boot automatically from UEFI"). Now it runs on gptzfsboot again, so .... Eugene.