[Bug 1852434] Re: grub-common: 10_linux_zfs imported_tools is incorrectly set when no ZFS pools exist

Didier Roche didrocks at ubuntu.com
Wed Nov 13 13:29:16 UTC 2019


*** This bug is a duplicate of bug 1848399 ***
    https://bugs.launchpad.net/bugs/1848399

This is a dup, and interestingly, we just fixed this (but adding tests
before pushing the SRU or to focal :)).

However, thanks to your backlog, we finally know where the "This" is
coming from and can fix it, thanks! :)

** This bug has been marked a duplicate of bug 1848399
   update-grub fails if zpools with unsupported feature_flags exist

-- 
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/1852434

Title:
  grub-common: 10_linux_zfs imported_tools is incorrectly set when no
  ZFS pools exist

Status in grub2 package in Ubuntu:
  New

Bug description:
  Script /etc/grub.d/10_linux_zfs in the grub-common package emits the
  error "cannot open 'This': no such pool" when no ZFS pools are
  available, e.g.:

  sudo update-grub
  Sourcing file `/etc/default/grub'
  Sourcing file `/etc/default/grub.d/init-select.cfg'
  Generating grub configuration file ...
  Found linux image: /boot/vmlinuz-5.4.0-5-generic
  Found initrd image: /boot/initrd.img-5.4.0-5-generic
  Found linux image: /boot/vmlinuz-5.3.0-21-generic
  Found initrd image: /boot/initrd.img-5.3.0-21-generic
  Found linux image: /boot/vmlinuz-5.3.0-12-generic
  Found initrd image: /boot/initrd.img-5.3.0-12-generic
  Found linux image: /boot/vmlinuz-5.3.0-10-lowlatency
  Found initrd image: /boot/initrd.img-5.3.0-10-lowlatency
  Found linux image: /boot/vmlinuz-5.3.0-5-generic
  Found initrd image: /boot/initrd.img-5.3.0-5-generic
  Found linux image: /boot/vmlinuz-5.2.0-10-lowlatency
  Found initrd image: /boot/initrd.img-5.2.0-10-lowlatency
  cannot open 'This': no such pool

  Adding "set -x" on the script shows the error:

  + prefix=/usr
  + datarootdir=/usr/share
  + ubuntu_recovery=1
  + quiet_boot=1
  + quick_boot=1
  + gfxpayload_dynamic=1
  + vt_handoff=1
  + . /usr/share/grub/grub-mkconfig_lib
  + prefix=/usr
  + exec_prefix=/usr
  + datarootdir=/usr/share
  + datadir=/usr/share
  + bindir=/usr/bin
  + sbindir=/usr/sbin
  + [ x/usr/share/grub = x ]
  + test x = x
  + grub_probe=/usr/sbin/grub-probe
  + test x = x
  + grub_file=/usr/bin/grub-file
  + test x = x
  + grub_mkrelpath=/usr/bin/grub-mkrelpath
  + which gettext
  + :
  + grub_tab=	
  + export TEXTDOMAIN=grub
  + export TEXTDOMAINDIR=/usr/share/locale
  + set -u
  + which zfs
  + 
  + imported_pools=
  + mktemp -d /tmp/zfsmnt.XXXXXX
  + MNTDIR=/tmp/zfsmnt.xDDUj0
  + mktemp -d /tmp/zfstmp.XXXXXX
  + ZFSTMP=/tmp/zfstmp.yEeU2G
  + RC=0
  + trap on_exit EXIT INT QUIT ABRT PIPE TERM
  + GRUB_LINUX_ZFS_TEST=
  + import_pools
  + zpool list
  + awk {if (NR>1) print $1}
  + local initial_pools=
  + local all_pools=
  + local imported_pools=
  + zpool import -f -a -o cachefile=none -N
  + imported_pools=This pool uses the following feature(s) not supported by this system:
  	org.zfsonlinux:userobj_accounting (User/Group object accounting.)
  All unsupported features are only required for writing to the pool.
  The pool can be imported using '-o readonly=on'.
  + on_exit
  + zpool export This
  cannot open 'This': no such pool

  This shows it is assuming that ZFS pools exist, which don't on my
  particular machine when I ran update-grub on Ubuntu focal.

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



More information about the foundations-bugs mailing list