Skip to content

grub.cfg incorrectly includes a / after zpool name and halts system on boot #25

@almereyda

Description

@almereyda

System information

Attribute Value
Distribution Name Ubuntu
Distribution Version 16.04.4
Linux Kernel 4.4.0-97-generic
ZFS Version 0.6.5.6-0ubuntu18

Describe the problem you're observing

When installing from an Ubuntu 16.04.3 installimage at Hetzner, installation of a ZFS-capable GRUB via a chrooted environment and reboot into such works as expected, as outlined by the recipies in Ubuntu 16.04 root on ZFS informed by Ubuntu on ZFS root on Hetzner Server.

If the system is upgraded immediately after set up with apt update && apt upgrade -y prior to installation of zfs-dkms and zfs-initramfs, the resulting GRUB file will not contain the right pool identifier to continue.

Describe how to reproduce the problem

  1. Install Ubuntu 16.04.3 via a Hetzner installimage.
  2. Update it immediately via apt update && apt upgrade -y
  3. Move the system from the installation on i.e. ext4 to a zfs partition and install GRUB to the respective disk's boot_grub-flagged 1M partition via a chroot environment. Verify to be in the correct system with grub-probe /.
  4. Reboot the system and see the system being stuck at loading the zpool during initramfs.

Include any warning/errors/backtraces from the system logs

Message: filesystem 'rpool/' cannot be mounted, unable to open the dataset

The system will try to auto-import rpool/, containing a slash, which cannot be found. Manually removing the trailing / from grub.cfg's linux lines after running update-grub in the chroot and only then installing GRUB helped to circumvent the issue.

Trying with root=ZFS=rpool/ROOT/ubuntu didn't help solving the case.

Possibly (in)directly related to

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