Bug 154099 - reboot integration with grub
Summary: reboot integration with grub
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: sysvinit
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: David Lawrence
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-04-07 09:19 UTC by Need Real Name
Modified: 2014-03-17 02:53 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-05-16 21:14:36 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Need Real Name 2005-04-07 09:19:25 UTC
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:
Always

Steps to Reproduce:
x

Additional info:

Comment 1 Bill Nottingham 2005-04-07 19:14:48 UTC
Any way to set a single 'boot this by default once' entry for grub?

Comment 2 R P Herrold 2005-04-08 04:51:58 UTC
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 05:33:15 UTC
Huh?

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 09:44:03 UTC
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
--device-map=/boot/grub/device.map

Comment 5 Bill Nottingham 2005-04-08 14:53:23 UTC
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 20:59:32 UTC
grub-reboot does this.

Comment 7 Peter Jones 2006-02-28 15:57:02 UTC
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
current=${out#index=}
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 17:09:56 UTC
That's still grub-specific.

Comment 9 David Lawrence 2007-06-22 02:18:25 UTC
Package name is now sysvinit in latest Fedora.

Comment 10 Bill Nottingham 2008-05-16 21:14:36 UTC
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.