Differences between revisions 7 and 8
Revision 7 as of 2011-03-26 22:19:26
Size: 2462
Editor: ?skizzhg
Comment: fixing header
Revision 8 as of 2011-03-28 18:30:03
Size: 2602
Editor: ?RémiVanicat
Comment: the language about grub-reboot was unclear: grub rebbot does not reboot by itself. It configure the next boot.
Deletions are marked like this. Additions are marked like this.
Line 66: Line 66:
We can use the grub-reboot command to reboot to a specified OS. We can use the grub-reboot command to select the OS we want to boot only once.
Line 70: Line 70:
Where [num] is the number of a entry in /boot/grub/menu.lst or /boot/grub/grub.cfg
For example.
Where [num] is the number of a entry in /boot/grub/menu.lst or /boot/grub/grub.cfg.

For example:
Line 75: Line 76:
Will reboot into WinXP in the example. Will select WinXP for the next boot in the example. If we reboot now,
WinXP will boot once. The time after that the boot will be again
on the default entry.

Translation(s): English - Italiano


GrubReboot

GRUB contains the ability to reboot into a specified OS once. This is useful for people who DualBoot.

Configuration

With GRUB v1

In your /boot/grub/menu.list you need to set "default" to "saved". For example.

default         saved           ## important.
timeout         5
color           cyan/blue white/blue

title           Debian GNU/Linux, kernel 2.6.18-4-k7
root            (hd0,2)
kernel          /boot/vmlinuz-2.6.18-4-k7 root=/dev/sda3 ro
initrd          /boot/initrd.img-2.6.18-4-k7

title           WinXP
root            (hd0,0)
makeactive
chainloader     +1

Next you need to run grub-install to set up the default change.

With GRUB v2

in your /etc/default/grub GRUB_DEFAULT should be set to saved, for example:

# If you change this file, run 'update-grub' afterward to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
#   info -f grub -n 'Simple configuration'

GRUB_DEFAULT=saved              ## important.
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet"
GRUB_CMDLINE_LINUX=""

Next you need to run update-grub to set up the default change.

grub-set-default

Next you need to specify the default OS for grub to boot. This is the OS booted if we don't use grub-reboot. For this we use the grub-set-default command.

grub-set-default [num]

Where [num] is the number of a entry in /boot/grub/menu.lst or /boot/grub/grub.cfg

To set the first OS (Debian in example) as the default run

grub-set-default 0

Usage

We can use the grub-reboot command to select the OS we want to boot only once.

grub-reboot [num]

Where [num] is the number of a entry in /boot/grub/menu.lst or /boot/grub/grub.cfg.

For example:

grub-reboot 1

Will select WinXP for the next boot in the example. If we reboot now, WinXP will boot once. The time after that the boot will be again on the default entry.

KDE usage

Kde has a built in implementation of this. To set this up go to Control Center > System Administration > Login Manager > Shutdown > Miscellaneous And set Boot Manager to "Grub"

Now when you go to reboot, at the shutdown screen if you click-hold the mouse over reboot you get a drop down menu where you can select which OS you want to go to.