[Bug 1859090] Re: [zfs-root] Trivial bug in 10_linux_zfs breaks booting from ZFS mirrored boot pools

Ubuntu Foundations Team Bug Bot 1859090 at bugs.launchpad.net
Fri Jan 10 04:22:29 UTC 2020


The attachment "This trivial patch fixes the issue." seems to be a
patch.  If it isn't, please remove the "patch" flag from the attachment,
remove the "patch" tag, and if you are a member of the ~ubuntu-
reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by
~brian-murray, for any issues please contact him.]

** Tags added: patch

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to grub2 in Ubuntu.
https://bugs.launchpad.net/bugs/1859090

Title:
  [zfs-root] Trivial bug in 10_linux_zfs breaks booting from ZFS
  mirrored boot pools

Status in grub2 package in Ubuntu:
  New

Bug description:
  If you manually modify a Ubuntu 19.10 on ZFS install to do mirroring,
  running update-grub will generate a /boot/grub/grub.cfg missing the
  file paths for the vmlinuz and initrd.img files, which creates an
  unbootable system. update-grub will report "Syntax errors are detected
  in generated GRUB config file.".

  The problem occurs because of a single line
  `initrd_device=$(${grub_probe} --target=device "${boot_dir}")` in
  `get_dataset_info()` in `/etc/grub.d/10_linux_zfs`. The code is
  designed to expect a single device, but a mirrored pool will give two.
  This inserts boht devices separated by a line break, which messes up
  the script.

  Changing the line in question to `initrd_device=$(${grub_probe}
  --target=device "${boot_dir}" | head -1)` will workaround the problem.
  Looking at what is being done, I think this change could go into
  production without any ill effect. I have attached a patch with the
  change.

  As for the other information requested by the bug reporting
  guidelines:

  1) $ lsb_release -rd
  Description:	Ubuntu 19.10
  Release:	19.10

  2) $ apt-cache policy grub-common
  grub-common:
    Installed: 2.04-1ubuntu12.1
    Candidate: 2.04-1ubuntu12.1
    Version table:
   *** 2.04-1ubuntu12.1 500
          500 http://us.archive.ubuntu.com/ubuntu eoan-updates/main amd64 Packages
          100 /var/lib/dpkg/status
       2.04-1ubuntu12 500
          500 http://us.archive.ubuntu.com/ubuntu eoan/main amd64 Packages

  3) The system should have been fine with a mirrored boot pool.

  4) A bug broke the boot process. A patch fixing it is attached.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/1859090/+subscriptions



More information about the foundations-bugs mailing list