[zfs-discuss] debian-jessie on zfs root?

John Gilmore j.arthur.gilmore at gmail.com
Mon Dec 26 17:28:40 EST 2016


Got it!

The problem is that update-grub didn't correctly find the name of the
pool when generating /boot/grub/grub.cfg

As a result, the kernel command line is: linux
/vmlinuz-3.16.0-4-amd64 root=ZFS=/ROOT/debian-1 ro

it should be: root=ZFS=rpool/ROOT/debian-1

Because the root= argument is WRONG, even adding rpool and bootfs=
parameters didn't help.

Editing /boot/grub/grub.cfg to correct it fixes the problem. That is
of course an automatically generated file, and will bork again the
moment something runs update-grub.

So why is update-grub not finding the pool name?

This may be due to a work-around for grub-probe not working:

jgilmore at Herb:/dev$ sudo update-grub
[sudo] password for jgilmore:
/usr/sbin/grub-probe: error: failed to get canonical path of
`/dev/50964012-4aae-498a-a21f-553f572cf549'.
jgilmore at Herb:/dev$ sudo ln -s
/dev/disk/by-uuid/50964012-4aae-498a-a21f-553f572cf549 .
jgilmore at Herb:/dev$ sudo update-grub
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-3.16.0-4-amd64
Found initrd image: /boot/initrd.img-3.16.0-4-amd64
Found Windows Recovery Environment (loader) on /dev/sdb1
Found Debian GNU/Linux (8.5) on /dev/sdb7
done
jgilmore at Herb:/dev$

/boot/grub/grub.cfg now has the wrong root=ZFS= parameter again.

So is there a correct work-around for grub-probe not working
correctly? (But it got the bootfs correct?)
Maybe it's because that's a LUKS volume, and I linked to the actual device?

jgilmore at Herb:/dev$ sudo rm 50964012-4aae-498a-a21f-553f572cf549
jgilmore at Herb:/dev$ sudo ln -s
/dev/mapper/50964012-4aae-498a-a21f-553f572cf549 .
jgilmore at Herb:/dev$ sudo update-grub
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-3.16.0-4-amd64
Found initrd image: /boot/initrd.img-3.16.0-4-amd64
Found Windows Recovery Environment (loader) on /dev/sdb1
Found Debian GNU/Linux (8.5) on /dev/sdb7
done

Nope, /boot/grub/grub.cfg is still missing the pool name.

So how to I get grub to do this correctly? I'm still puzzled why it's
getting the bootfs but not the pool name. "mount" shown the pool name
and fs, why not get it from there?


More information about the zfs-discuss mailing list