Public bug reported: If zfs is used for boot, boot will fail because of bogus information returned by /usr/bin/grub-mkrelpath. E.g. if the zfs dataset for / is rpool/ROOT/linux:
# /usr/bin/grub-mkrelpath / /ROOT/linux@ This leads to a bogus /boot/grub/grub.cfg because /etc/grub.d/10_linux generates a boot entry like this: linux /ROOT/linux@/boot/vmlinuz-4.4.0-77-generic root=ZFS=/ROOT/linux ro crashkernel=384M-2G:64M,2G-:128M bootdegraded=true debug=y console=ttyS1,115200 crashkernel=384M-:128M This in turn causes that initramfs to fail on boot: ... + wait_for_udev + command -v udevadm + udevadm settle + modprobe zfs zfs_autoimport_disable=1 + ZFS_BOOTFS=/ROOT/linux + echo /ROOT/linux + sed -e s,/.*,, + ZFS_RPOOL= + delay=0 + [ 0 -gt 0 ] + unset delay + zpool import -N [ 10.922149] SPL: The /etc/hostid file is not found. [ 10.927031] SPL: using hostid 0x00000000 + ZFS_STDERR=cannot import '': no such pool available + ZFS_ERROR=1 + [ 1 -ne 0 ] + panic Command: zpool import -N Message: cannot import '': no such pool available Error: 1 Manually import the root pool at the command prompt and then exit. Hint: Try: zpool import -f -R / -N Wrong hint BTW, but at least a hint: "zpool import; zpool import ${poolID}|rpool" fixes it. Anyway, when continuing after an 'exit' it fails with: ... + zpool status -L + [ n != y ] + log_begin_msg Setting mountpoint=/ on ZFS filesystem /ROOT/linux + _log_msg Begin: Setting mountpoint=/ on ZFS filesystem /ROOT/linux ... + [ n = y ] + printf Begin: Setting mountpoint=/ on ZFS filesystem /ROOT/linux ... Begin: Setting mountpoint=/ on ZFS filesystem /ROOT/linux ... + zfs set mountpoint=/ /ROOT/linux + ZFS_STDERR=cannot open '/ROOT/linux': invalid dataset name + [ n != y ] + log_end_msg + _log_msg done.\n + [ n = y ] + printf done.\n done. + [ n != y ] + log_begin_msg Mounting ZFS filesystem /ROOT/linux + _log_msg Begin: Mounting ZFS filesystem /ROOT/linux ... + [ n = y ] + printf Begin: Mounting ZFS filesystem /ROOT/linux ... Begin: Mounting ZFS filesystem /ROOT/linux ... + mount -t zfs -o zfsutil /ROOT/linux /root + ZFS_STDERR=filesystem 'ROOT/linux' cannot be mounted, unable to open the dataset mount: mounting /ROOT/linux on /root failed: No such file or directory + ZFS_ERROR=1 + [ n != y ] + log_end_msg + _log_msg done.\n + [ n = y ] + printf done.\n done. + [ 1 -ne 0 ] + panic Command: mount -t zfs -o zfsutil /ROOT/linux /root Message: filesystem 'ROOT/linux' cannot be mounted, unable to open the dataset mount: mounting /ROOT/linux on /root failed: No such file or directory Error: 1 Manually mount the root filesystem on /root and then exit. A 'mount -t zfs -o zfsutil rpool/ROOT/linux /root' fixis it and after an 'exit' the system finally starts. ** Affects: grub2 (Ubuntu) Importance: Undecided Status: New ** Package changed: dmidecode (Ubuntu) => grub2 (Ubuntu) -- You received this bug notification because you are a member of Kernel Packages, which is subscribed to dmidecode in Ubuntu. https://bugs.launchpad.net/bugs/1688424 Title: grub-mkrelpath returns invalid zfs dataset -> initramfs: mount /root fails Status in grub2 package in Ubuntu: New Bug description: If zfs is used for boot, boot will fail because of bogus information returned by /usr/bin/grub-mkrelpath. E.g. if the zfs dataset for / is rpool/ROOT/linux: # /usr/bin/grub-mkrelpath / /ROOT/linux@ This leads to a bogus /boot/grub/grub.cfg because /etc/grub.d/10_linux generates a boot entry like this: linux /ROOT/linux@/boot/vmlinuz-4.4.0-77-generic root=ZFS=/ROOT/linux ro crashkernel=384M-2G:64M,2G-:128M bootdegraded=true debug=y console=ttyS1,115200 crashkernel=384M-:128M This in turn causes that initramfs to fail on boot: ... + wait_for_udev + command -v udevadm + udevadm settle + modprobe zfs zfs_autoimport_disable=1 + ZFS_BOOTFS=/ROOT/linux + echo /ROOT/linux + sed -e s,/.*,, + ZFS_RPOOL= + delay=0 + [ 0 -gt 0 ] + unset delay + zpool import -N [ 10.922149] SPL: The /etc/hostid file is not found. [ 10.927031] SPL: using hostid 0x00000000 + ZFS_STDERR=cannot import '': no such pool available + ZFS_ERROR=1 + [ 1 -ne 0 ] + panic Command: zpool import -N Message: cannot import '': no such pool available Error: 1 Manually import the root pool at the command prompt and then exit. Hint: Try: zpool import -f -R / -N Wrong hint BTW, but at least a hint: "zpool import; zpool import ${poolID}|rpool" fixes it. Anyway, when continuing after an 'exit' it fails with: ... + zpool status -L + [ n != y ] + log_begin_msg Setting mountpoint=/ on ZFS filesystem /ROOT/linux + _log_msg Begin: Setting mountpoint=/ on ZFS filesystem /ROOT/linux ... + [ n = y ] + printf Begin: Setting mountpoint=/ on ZFS filesystem /ROOT/linux ... Begin: Setting mountpoint=/ on ZFS filesystem /ROOT/linux ... + zfs set mountpoint=/ /ROOT/linux + ZFS_STDERR=cannot open '/ROOT/linux': invalid dataset name + [ n != y ] + log_end_msg + _log_msg done.\n + [ n = y ] + printf done.\n done. + [ n != y ] + log_begin_msg Mounting ZFS filesystem /ROOT/linux + _log_msg Begin: Mounting ZFS filesystem /ROOT/linux ... + [ n = y ] + printf Begin: Mounting ZFS filesystem /ROOT/linux ... Begin: Mounting ZFS filesystem /ROOT/linux ... + mount -t zfs -o zfsutil /ROOT/linux /root + ZFS_STDERR=filesystem 'ROOT/linux' cannot be mounted, unable to open the dataset mount: mounting /ROOT/linux on /root failed: No such file or directory + ZFS_ERROR=1 + [ n != y ] + log_end_msg + _log_msg done.\n + [ n = y ] + printf done.\n done. + [ 1 -ne 0 ] + panic Command: mount -t zfs -o zfsutil /ROOT/linux /root Message: filesystem 'ROOT/linux' cannot be mounted, unable to open the dataset mount: mounting /ROOT/linux on /root failed: No such file or directory Error: 1 Manually mount the root filesystem on /root and then exit. A 'mount -t zfs -o zfsutil rpool/ROOT/linux /root' fixis it and after an 'exit' the system finally starts. To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/1688424/+subscriptions -- Mailing list: https://launchpad.net/~kernel-packages Post to : kernel-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~kernel-packages More help : https://help.launchpad.net/ListHelp