Grub: Difference between revisions

From miki
Jump to navigation Jump to search
Line 13: Line 13:
* http://www.mail-archive.com/bug-grub@gnu.org/msg10280.html
* http://www.mail-archive.com/bug-grub@gnu.org/msg10280.html
* http://gentoo-wiki.com/TIP_Chainloading_a_bootable_CD-ROM_from_GRUB
* http://gentoo-wiki.com/TIP_Chainloading_a_bootable_CD-ROM_from_GRUB

== Grubonce ==
'''grubonce''' is an handy tool to force the system to immediately boot a given grub entry at the next reboot.

(as root)
$ grubonce
0: openSUSE 11.0 - 2.6.25.20-0.1
1: Failsafe -- openSUSE 11.0 - 2.6.25.20-0.1
2: windows
3: Floppy
$ grubonce 2

By default, '''grubonce''' can only be run by root. We can use '''sudo''' to allow any user to use '''grubonce'''.

% su
$ visudo
... edit the /etc/sudoers file
$ exit
% sudo grubonce 2

Make the following change to the <tt>sudoers</tt> file:
Defaults env_keep = "DISPLAY ..." # add DISPLAY env var to the list of kept var
ALL ALL = (ALL) NOPASSWD: /usr/sbin/grubonce

Revision as of 23:22, 20 April 2009

Documentation

  • Official manual here.

Boot from CDROM

When booting on HDD, it is possible to tell Grub to boot from CDROM instead.

  • Press esc to quit Grub GUI menu.
  • Press c to go to command-line mode.
  • Enter the following commands (adapt hd2 according to your configuration):
grub>rootnoverify (hd2)
grub>chainloader +1
grub>boot

Note that this might be actually a hack that only works on my machine. More information on normal way to tell Grub to boot on CDROM:

Grubonce

grubonce is an handy tool to force the system to immediately boot a given grub entry at the next reboot.

 (as root)
 $ grubonce
 0: openSUSE 11.0 - 2.6.25.20-0.1
 1: Failsafe -- openSUSE 11.0 - 2.6.25.20-0.1
 2: windows
 3: Floppy
 $ grubonce 2

By default, grubonce can only be run by root. We can use sudo to allow any user to use grubonce.

 % su
 $ visudo
 ... edit the /etc/sudoers file
 $ exit
 % sudo grubonce 2

Make the following change to the sudoers file:

 Defaults        env_keep = "DISPLAY ..."             # add DISPLAY env var to the list of kept var
 ALL     ALL = (ALL) NOPASSWD: /usr/sbin/grubonce