[Bug 1852434] [NEW] grub-common: 10_linux_zfs imported_tools is incorrectly set when no ZFS pools exist
Colin Ian King
1852434 at bugs.launchpad.net
Wed Nov 13 13:16:34 UTC 2019
Public bug reported:
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.
** Affects: grub2 (Ubuntu)
Importance: High
Assignee: Didier Roche (didrocks)
Status: New
** Changed in: grub2 (Ubuntu)
Importance: Undecided => High
--
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