EFI ZFS loader success story

Ganael Laplanche ganael.laplanche at corp.ovh.com
Wed Aug 12 12:48:10 UTC 2015


On Wednesday, August 12, 2015 11:39:40 AM Ganael Laplanche wrote:

> Using the patch from this post :
> 
> https://lists.freebsd.org/pipermail/freebsd-hackers/2015-June/047823.html
> 
> against -CURRENT (r286279), I've been able to boot my ZFS-root system,
> yeah!

As a followup to :

https://lists.freebsd.org/pipermail/freebsd-hackers/2015-April/047608.html

> Also, if someone with a UFS system could test that the modularization didn't
> break UFS functionality, that'd be helpful.

I would like to add I've successfully booted a UFS root too (in UEFI mode) 
using your patch, with both loaders (either directly from loader.efi or using 
boot1.efi + loader.efi). Here is how.

First, create partitions this way :

# gpart create -s gpt ada0
# gpart add -s 800K -t efi ada0
# gpart add -t freebsd-ufs ada0

Then, install FreeBSD within the freebsd-ufs partition.

You can then choose between two ways of booting your system :

(let's consider the efi partition is mounted under /tmp/efi and the root FS 
under /mnt)

1) Using loader.efi :
---------------------

# cp loader.efi /tmp/efi/efi/boot/BOOTx64.efi

# cat > /tmp/efi/boot/loader.rc << EOF
unload
set currdev=part1:
load boot/kernel/kernel
autoboot
EOF

2) Using boot1.efi + loader.efi :
---------------------------------

# cp boot1.efi /tmp/efi/efi/boot/BOOTx64.efi
# cp loader.efi /mnt/boot/

Cleanup previous test :
# rm /tmp/efi/boot/loader.rc
# rmdir /tmp/efi/boot

Also, in both cases, do not forget to modify the fstab within /mnt/etc to 
mount the root fs.

Regards,

-- 
Ganaël LAPLANCHE <ganael.laplanche at corp.ovh.com>


More information about the freebsd-hackers mailing list