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

Keith Brown 788298 at bugs.launchpad.net
Sat Oct 29 13:57:04 UTC 2011


Regarding the problem of grub-reboot not working with /boot on a RAID array (and in my case not being able to boot back into Ubuntu), I would be happy with a timed default. It wouldn't require GRUB_DEFAULT=saved or grubenv. As I imagine it, a user who normally uses e.g. GRUB_DEFAULT=0 would edit /etc/default/grub to add something like:

GRUB_TIMED_DEFAULT=6 300   # set the default menu entry to 6 for 300
seconds from when grub.cfg is generated

Then the user would run grub-update and it would result in something
like the following in grub.cfg (using bash command substitution to get
the date but perhaps a special environment variable could be added):

### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
  load_env
fi
set default="0"
if [ $(date +%s) -le 1319894091 ] ; then   # grub-update at Sat Oct 29 15:09:51 CEST 2011; date is 300 seconds in future
  set default="6"
fi
if [ ${prev_saved_entry} ]; then
...

If the user reboots at any point in time in the next 300 seconds then
the default menu entry would be 6, after that it would be 0. To guard
against a user forgetting that a timed default setting is present grub-
update could issue an "are you sure" prompt.

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

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

Status in “grub2” package in Ubuntu:
  New

Bug description:
  Binary package hint: grub-pc

  This is related to the following bug:
  https://bugs.launchpad.net/ubuntu/karmic/+source/grub2/+bug/497326

  Opening a new bug since the aforementioned bug is related to Karmic.
  Although it was marked as "fixed" over 16 months ago, this feature
  still appears to be broken in Lucid LTS.

  Ubuntu Release:  Ubuntu 10.04.2 LTS
  Architecture:  x86_64
  Package Version:  1.98-1ubuntu10

  Steps taken:
  - Edited /etc/boot/default and changed "GRUB_DEFAULT=0" to "GRUB_DEFAULT=saved"
  - Used grub-reboot so that grub would reboot into Windows on the next boot only
  - Rebooted from Ubuntu
  - Windows booted as expected
  - Rebooted from Windows

  Expected Results:
  - After rebooting from Windows, my grub default selection should be back to Ubuntu (or whatever it was before issuing grub-reboot) since grub-reboot is supposed to "set the default boot entry for GRUB, for the next boot only" as per the man page.

  Actual Results:
  - Windows remains selected by default at the bootloader screen and boots.  Note that this prevents users from being able to reboot into Windows and back when they are accessing their machines remotely.

  Additional Information:
  - The system I am experiencing this on is set up as follows:
  -   Ubuntu is installed on a Linux mdadm raid 1 mirror (/dev/sda1 and /dev/sdb1)
  -   Windows is installed on an Intel Raid 1 mirror (what would have been /dev/sdc and /dev/sdd are now /dev/mapper/isw_febcbhicb_Windows)

  ProblemType: Bug
  DistroRelease: Ubuntu 10.04
  Package: grub-pc 1.98-1ubuntu10
  ProcVersionSignature: Ubuntu 2.6.32-31.61-generic 2.6.32.32+drm33.14
  Uname: Linux 2.6.32-31-generic x86_64
  NonfreeKernelModules: fglrx
  Architecture: amd64
  CheckboxSubmission: 60d09ed5715e10eba06ad43865289d68
  CheckboxSystem: f134069bba098730d27f59b402920826
  Date: Wed May 25 15:08:12 2011
  InstallationMedia: Ubuntu 10.04 LTS "Lucid Lynx" - Release amd64 (20100427.1)
  ProcEnviron:
   PATH=(custom, user)
   LANG=en_CA.UTF-8
   SHELL=/bin/bash
  SourcePackage: grub2

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