Bug#612838: grub-pc: [kfreebsd] update-grub fails on custom partinioning during, , installation

Tiernan Messmer tiernan.messmer at gmail.com
Mon Mar 14 16:12:33 UTC 2011


I have experienced the same issues on kFreeBSD amd64 on a zroot setup.

I have one disk, /dev/da0 partitioned with a single partition used for 
ZFS. During the install grub failed to install. Upon further 
investigation /etc/grub.d/10_kfreebsd failed at line 65:

   if test -n "${devices}" ; then

The set -e on the second line of the file appears to be causing it to 
abort when that line is encountered. Commenting out set -e followed by 
an update-grub and grub-install allowed grub to boot into the kernel.

After the kernel booted, it failed to mount root. Upon further 
investigation, /boot/zfs/zpool.cache was missing, apparently not copied 
over from the livecd tmpfs environment during install, either because it 
was forgotten, or because grub's failed install prevented copying of it 
over.

To remedy this, booting off from the livecd, executing zpool import -f 
and copying /boot/zfs/zpool.cache from the livecd tmpfs environment to 
/boot/zfs/zpool.cache on the zroot allowed the system to boot successfully.

I have not tested this on i386, but I suspect it would be experiencing 
the same issues. I am not sure if the issue with /etc/grub.d/10_kfreebsd 
is causing the issues with grub on other file systems as I have not 
tested it, but my guess is that it would be.

Being stuck at a grub rescue cli prompt during my endeavours to get the 
install to boot was remedied by a quick re-run of grub-install which 
might help Erwan.

Testing was performed on a VMware Workstation Virtual Machine using the 
debian-6.0.0-kfreebsd-amd64-CD-1.iso image.

~Tiernan Messmer






More information about the Pkg-grub-devel mailing list