Skip to content

grub "root=ZFS=..." misses zpool #22

Open
@heilts

Description

@heilts

Hello,

I use Debian "Jessie" with zfs 0.6.4-1.1-2 and root on zfs. The root pool is "tank0".

After upgrading to grub 2.02-beta2.9-ZOL1, the grub.cfg misses the pool part, i.e. it becomes e.g.

linux /jessie-1/ROOT@/boot/vmlinuz-3.19.8 root=ZFS=jessie-1/ROOT ro boot=zfs $bootfs quiet

This does not work, it should be e.g.

linux /jessie-1/ROOT@/boot/vmlinuz-3.19.8 root=ZFS=tank0/jessie-1/ROOT ro boot=zfs $bootfs quiet

Also, at running "update-grub", I got

root@tor:~# update-grub
Generating grub configuration file ...
Found background image: /usr/share/images/desktop-base/desktop-grub.png
Found linux image: /boot/vmlinuz-3.19.8
Found initrd image: /boot/initrd.img-3.19.8
/usr/sbin/grub-probe: error: unknown filesystem.
Found linux image: /boot/vmlinuz-3.19.3
Found initrd image: /boot/initrd.img-3.19.3
Found linux image: /boot/vmlinuz-3.16.0-4-amd64
Found initrd image: /boot/initrd.img-3.16.0-4-amd64
/usr/sbin/grub-probe: error: unknown filesystem.
Found memtest86+ image: /jessie-1/ROOT@/boot/memtest86+.bin
Found memtest86+ multiboot image: /jessie-1/ROOT@/boot/memtest86+_multiboot.bin
Found Debian GNU/Linux (8.0) on /dev/sdi1
done

The root filesystem is placed on GPT parted disks (raidz1) partitition 4. The other partititions are used for gtp grub and md1 (carrying an ext4 based rescue system and swap, this is why the update-grub creates so many entries). In more detail:
3.19.8 and 3.19.3 are one zfs (active root) only.
3.16.0-4-amd64 andn memtest are one zfs and ext4 (rescue).
And there is a complete backup of zfs placed on /dev/sdi1. This looks to break GRUB as well, because it creates only entries for 3.16.0-4-amd64, these multiple times, with increasing numbers of auf /dev/sdi1, looking like:

        menuentry 'Debian GNU/Linux (auf /dev/sdi1) (auf /dev/sdi1) (auf /dev/sdi1) (auf /dev/sdi1) (auf /dev/sdi1) (auf /dev/sdi1) (auf /dev/sdi1) (on /dev/sdi1)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-3.16.0-4-amd
64--51a2e90e-b2a5-4006-ba1b-db85588a6881' {
                insmod part_msdos
                insmod ext2
                set root='hd7,msdos1'
                if [ x$feature_platform_search_hint = xy ]; then
                  search --no-floppy --fs-uuid --set=root --hint-bios=hd8,msdos1 --hint-efi=hd8,msdos1 --hint-baremetal=ahci8,msdos1 --hint='hd7,msdos1'  51a2e90e-b2a5-4006-ba1b-db85588a6881
                else
                  search --no-floppy --fs-uuid --set=root 51a2e90e-b2a5-4006-ba1b-db85588a6881
                fi
                linux /boot/vmlinuz-3.16.0-4-amd64 root=UUID=8e3538db-de20-4ef4-81f2-9464fdeed165 ro quiet
                initrd /boot/initrd.img-3.16.0-4-amd64
        }

grub-probe works:

root@tor:~# grub-probe /
zfs

GRUB installation is:

root@tor:~# dpkg -l \*grub\* | grep ^ii
ii  grub-common     2.02-beta2.9-ZOL11-7aa9f6 amd64        GRand Unified Bootloader (common files)
ii  grub-pc         2.02-beta2.9-ZOL11-7aa9f6 amd64        GRand Unified Bootloader, version 2 (PC/BIOS version)
ii  grub-pc-bin     2.02-beta2.9-ZOL11-7aa9f6 amd64        GRand Unified Bootloader, version 2 (PC/BIOS binaries)
ii  grub2-common    2.02-beta2.9-ZOL11-7aa9f6 amd64        GRand Unified Bootloader (common files for version 2)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions