grub-common: 10_linux_zfs imported_tools is incorrectly set when no ZFS pools exist
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
grub2 (Ubuntu) |
New
|
High
|
Didier Roche-Tolomelli | ||
Eoan |
New
|
Undecided
|
Unassigned | ||
Focal |
New
|
High
|
Didier Roche-Tolomelli |
Bug Description
Script /etc/grub.
sudo update-grub
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-
Found initrd image: /boot/initrd.
Found linux image: /boot/vmlinuz-
Found initrd image: /boot/initrd.
Found linux image: /boot/vmlinuz-
Found initrd image: /boot/initrd.
Found linux image: /boot/vmlinuz-
Found initrd image: /boot/initrd.
Found linux image: /boot/vmlinuz-
Found initrd image: /boot/initrd.
Found linux image: /boot/vmlinuz-
Found initrd image: /boot/initrd.
cannot open 'This': no such pool
Adding "set -x" on the script shows the error:
+ prefix=/usr
+ datarootdir=
+ ubuntu_recovery=1
+ quiet_boot=1
+ quick_boot=1
+ gfxpayload_
+ vt_handoff=1
+ . /usr/share/
+ prefix=/usr
+ exec_prefix=/usr
+ datarootdir=
+ datadir=/usr/share
+ bindir=/usr/bin
+ sbindir=/usr/sbin
+ [ x/usr/share/grub = x ]
+ test x = x
+ grub_probe=
+ test x = x
+ grub_file=
+ test x = x
+ grub_mkrelpath=
+ which gettext
+ :
+ grub_tab=
+ export TEXTDOMAIN=grub
+ export TEXTDOMAINDIR=
+ set -u
+ which zfs
+
+ imported_pools=
+ mktemp -d /tmp/zfsmnt.XXXXXX
+ MNTDIR=
+ mktemp -d /tmp/zfstmp.XXXXXX
+ ZFSTMP=
+ RC=0
+ trap on_exit EXIT INT QUIT ABRT PIPE TERM
+ GRUB_LINUX_
+ 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
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.
Changed in grub2 (Ubuntu): | |
assignee: | nobody → Didier Roche (didrocks) |
Issue is in debian/ patches/ ubuntu- zfs-enhance- support. patch, in function import_pools: