[Bug 1897785] [NEW] 10_linux_zfs: empty bootmenu if POSIXLY_CORRECT

Jens Elkner 1897785 at bugs.launchpad.net
Tue Sep 29 18:21:51 UTC 2020


Public bug reported:

If one has POSIXLY_CORRECT env var set (which is the case for all our
admin/operator accounts) and one calls /usr/sbin/update-grub or grub-
mkconfig ... it produces a /boot/grub/grub.cfg with a single entry 'UEFI
Firmware Settings' (fwsetup). So the after a reboot the OS is not
bootable anymore unless one is able to remember, which kernel exactly
got installed (because Ubuntu does not link the kernel/ram image to
generic names like vmlinuz , initrd) and which of the dozens of hds and
partitions actually contain the kernel/ram image to boot.

The root cause for this is /etc/grub.d/10_linux_zfs and its mount usage:

Since Linux mount requires arguments given in a posixly incorrect
"order", a script should always unset POSIXLY_CORRECT, when it is going
to call mount. Otherwise mount errors out, and because the script has
'set -e', the script gets aborted immediately.

NOTE: 'zfs mount ...' also calls 'mount', so same requirement applies to
'zfs {mount|create} ...'

Env:
Distributor ID:	Ubuntu
Description:	Ubuntu 20.04.1 LTS
Release:	20.04
Codename:	focal

Linux box 5.4.0-48-generic #52-Ubuntu SMP Thu Sep 10 10:58:49 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
with latest updates installed.

** Affects: grub2 (Ubuntu)
     Importance: Undecided
         Status: New

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

Title:
  10_linux_zfs: empty bootmenu if POSIXLY_CORRECT

Status in grub2 package in Ubuntu:
  New

Bug description:
  If one has POSIXLY_CORRECT env var set (which is the case for all our
  admin/operator accounts) and one calls /usr/sbin/update-grub or grub-
  mkconfig ... it produces a /boot/grub/grub.cfg with a single entry
  'UEFI Firmware Settings' (fwsetup). So the after a reboot the OS is
  not bootable anymore unless one is able to remember, which kernel
  exactly got installed (because Ubuntu does not link the kernel/ram
  image to generic names like vmlinuz , initrd) and which of the dozens
  of hds and partitions actually contain the kernel/ram image to boot.

  The root cause for this is /etc/grub.d/10_linux_zfs and its mount
  usage:

  Since Linux mount requires arguments given in a posixly incorrect
  "order", a script should always unset POSIXLY_CORRECT, when it is
  going to call mount. Otherwise mount errors out, and because the
  script has 'set -e', the script gets aborted immediately.

  NOTE: 'zfs mount ...' also calls 'mount', so same requirement applies
  to 'zfs {mount|create} ...'

  Env:
  Distributor ID:	Ubuntu
  Description:	Ubuntu 20.04.1 LTS
  Release:	20.04
  Codename:	focal

  Linux box 5.4.0-48-generic #52-Ubuntu SMP Thu Sep 10 10:58:49 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
  with latest updates installed.

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



More information about the foundations-bugs mailing list