[zfs-discuss] ZFS Root - grub.cfg not updated on kernel updates

Garrett Fields ghfields at gmail.com
Tue Nov 27 13:33:01 EST 2018


"grub2-probe: error: failed to get canonical path of
`/dev/ata-CT1000BX100SSD1_1504F0023DE2-part1'."

Yea... in the past when running Ubuntu 14.04.  I ended up dirty-fixing it
by running:
ln -sf
/dev/disk/by-id/ata-CT1000BX100SSD1_1504F0023DE2-part1
/dev/ata-CT1000BX100SSD1_1504F0023DE2-part1
before any grub operations.  There probably is a better fix out there.
Problem went away when I jumped to 18.04.

Garrett

On Tue, Nov 27, 2018 at 10:08 AM Gordan Bobic via zfs-discuss <
zfs-discuss at list.zfsonlinux.org> wrote:

> I changed the line in this section as you described:
>
> case x"$GRUB_FS" in
>     xbtrfs)
>         rootsubvol="`make_system_path_relative_to_its_root /`"
>         rootsubvol="${rootsubvol#/}"
>         if [ "x${rootsubvol}" != x ]; then
>             GRUB_CMDLINE_LINUX="rootflags=subvol=${rootsubvol}
> ${GRUB_CMDLINE_LINUX}"
>         fi;;
>     xzfs)
>         rpool=`zdb -l ${GRUB_DEVICE} | grep " name"| grep -o "'.*'"| sed
> "s/'//g" 2>/dev/null || true`
>         bootfs="`make_system_path_relative_to_its_root / | sed -e
> "s,@$,,"`"
>         LINUX_ROOT_DEVICE="ZFS=${rpool}${bootfs}"
>         ;;
> esac
>
> Just did yum update to get the latest kernel, and it again didn't update
> grub2.cfg, I had to add it manually.
>
> Are there any other changes required? Troubleshooting steps?
>
> On Mon, Nov 26, 2018 at 12:03 AM Garrett Fields <ghfields at gmail.com>
> wrote:
>
>> Gordan,
>> I've been tweaking a script that takes Ubuntu 18.04.1 live cd and creates
>> a bootable encrypted rpool.  Work found at:
>> https://gist.github.com/ghfields/92660bc9199fee6c78e34b6913531722
>>
>> I'm not sure exactly where you current issue lies, but I was having a
>> problem with grub identifying the pool name (eg. command line was
>> boot=ZFS=/ROOT/ubuntu-1 instead of boot=ZFS=rpool/ROOT/ubuntu-1)
>>
>> In /etc/grub.d/10_linux, I replaced
>> ${grub_probe} --device ${GRUB_DEVICE} --target=fs_label
>> with
>> zdb -l ${GRUB_DEVICE} | grep " name"| grep -o "'.*'"| sed "s/'//g"
>> with the following command:
>> ======
>> sed -i 's/.*fs_label*/\trpool=\`zdb -l ${GRUB_DEVICE} \| grep \" name\"\|
>> grep -o \"\x27.*\x27\"\| sed \"s\/\x27\/\/g\"/'
>> /rpool/ROOT/ubuntu-1/etc/grub.d/10_linux
>> ======
>>
>> It looks horrid, but works.
>>
>> Does "grub-probe /" return "zfs"?  Where is your /boot located?
>>
>
>  /boot is on the rootfs on the same ZFS pool. Only non-ZFS partition is
> /boot/efi, which is FAT.
>
>
> _______________________________________________
> zfs-discuss mailing list
> zfs-discuss at list.zfsonlinux.org
> http://list.zfsonlinux.org/cgi-bin/mailman/listinfo/zfs-discuss
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.zfsonlinux.org/pipermail/zfs-discuss/attachments/20181127/169dd57a/attachment.html>


More information about the zfs-discuss mailing list