Bug 154099 - reboot integration with grub
reboot integration with grub
Product: Fedora
Classification: Fedora
Component: sysvinit (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Bill Nottingham
David Lawrence
: FutureFeature
Depends On:
  Show dependency treegraph
Reported: 2005-04-07 05:19 EDT by Need Real Name
Modified: 2014-03-16 22:53 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-05-16 17:14:36 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Need Real Name 2005-04-07 05:19:25 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6) Gecko/20050322 Epiphany/1.5.8

Description of problem:
The ability to run
 # reboot title
where title is a grub title, something like "mykernel1", "xp", etc, would be nice.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:

Additional info:
Comment 1 Bill Nottingham 2005-04-07 15:14:48 EDT
Any way to set a single 'boot this by default once' entry for grub?
Comment 2 R P Herrold 2005-04-08 00:51:58 EDT
wow -- this is really a dangerous suggested option; several motherboards, and
poweroff/reboot implementations 'hang' on the way down and require manual
intervention to get restarted.  I never prefer unattended reboots, as they
inevitably seem to happen on Saturday night at 4 am requiring a drive to a COLO
facility the following Monday.

About as far as I think this should go is it issue an advisory email to
root@localhost (on the assumption that root's email is being forwarded offhost
to a monitored account; or [on the asumption that one cannot count on a MTA
running or being properly configured] perhaps emitting to 'logger' a advisory
request for a reboot, to be 'caught' by logwatch on the remote syslog box [wame
issue as to a properly set up and monitored syslog]. 
Comment 3 Bill Nottingham 2005-04-08 01:33:15 EDT

This is simply adding an option to the normal reboot syntax, saying it should
boot something else by default first.

The reboot command itself works the same as it always has.
Comment 4 Jeremy Katz 2005-04-08 05:44:03 EDT
You can do this with grub, but the method of doing it is different for every
boot loader, which would make it kind of sucky to implement for the general
case.  To use, something like the following works:
  echo -e "savedefault --default=2 --once\nquit" |/sbin/grub --batch
Comment 5 Bill Nottingham 2005-04-08 10:53:23 EDT
OK, sounds like functionality that needs to be wrapped in grubby first before
reboot could sanely use it.
Comment 6 Need Real Name 2005-10-20 16:59:32 EDT
grub-reboot does this.
Comment 7 Peter Jones 2006-02-28 10:57:02 EST
This should be able to be done just like pm-utils does it:

[ -x /sbin/grubby -a -x /sbin/grub ] || return 1
[ -e /boot/vmlinuz-$(uname -r) ] || return 1

out=$(/sbin/grubby --info /boot/vmlinuz-$(uname -r) |grep index)
[ -n "${out}" ] || return 1
echo "savedefault --default=${current} --once" | /sbin/grub --batch --no-floppy
--device-map=/boot/grub/device.map --no-floppy

(except you obviously don't want "current" since it's specified by hand)
Comment 8 Bill Nottingham 2006-02-28 12:09:56 EST
That's still grub-specific.
Comment 9 David Lawrence 2007-06-21 22:18:25 EDT
Package name is now sysvinit in latest Fedora.
Comment 10 Bill Nottingham 2008-05-16 17:14:36 EDT
Closing, this is unlikely to be implemented. Patches accepted, though.

Note You need to log in before you can comment on or make changes to this bug.