[Bug 788298] Re: grub-reboot changes boot default permanently on Lucid LTS

Seb Bonnard 788298 at bugs.launchpad.net
Wed Nov 17 20:03:48 UTC 2021


Correct me if I'm wrong, according to [this
documentation](https://www.gnu.org/software/grub/manual/grub/html_node/Environment-
block.html), on LVM or RAID disk the `/boot/grub/grubenv` file cannot be
modified by GRUB, in that case, by the `save_env` routine. Only the OS
via `grub-reboot`, `grub-editenv` or `grub-set-default` can modify the
`/boot/grub/grubenv` file.

Therefore, the `save_env prev_saved_entry` won't work here (on LVM or
RAID disk), and the system will not be able to boot on the previously
saved entry.

Is that correct ?

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

Title:
  grub-reboot changes boot default permanently on Lucid LTS

Status in grub2 package in Ubuntu:
  Fix Released
Status in grub2-signed package in Ubuntu:
  Fix Released
Status in grub2 source package in Bionic:
  Fix Released
Status in grub2-signed source package in Bionic:
  Fix Released

Bug description:
  [Impact]
  The grub-reboot manpage says it will "Set the default boot menu entry for GRUB, for the next boot only." But, that's a promise it cannot keep when GRUB cannot write to the environment block, such as when it is stored on Linux software RAID (md) or LVM devices. An administrator of such a system may expect grub-reboot to work as documented, only to find that their change is now permanent, requiring manual recovery. Users without console access may rely on grub-reboot to provide a mechanism for testing a possible-broken boot entry. If that entry causes the system to fail to boot, they may find their system unrecoverable.

  [Test Case]
  Run grub-reboot on an impacted system and check for a warning and instructions on manually restoring the default. Also, check for a warning in the grub-reboot manpage.

  [Regression Risk]
  This is a documentation change only. The documentation is emitted by (trivial) code, so a bug in that code could lead to unintentional functional changes.

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




More information about the foundations-bugs mailing list