BootLoader > GRUB


GRUB is the GRand Unified Bootloader, a very powerful newish BootLoader that can be used to boot most operating system on the intel platforms.

Debian provides both grub v1 and v2 (more on Debian BootLoader ).

Installing Grub

Up to Debian Lenny

Grub v1 for Debian (package grub) can be installed with:

To install grub v2, you need install the appropriate variant of grub v2, depending on your system's firmware (usually grub-pc, see grub2 variants).

See Also

Debian Squeeze and later

Grub "v2" for Debian (package grub) can be installed with:

If your system isn't a regular PC (i.e if your system has EFI or OpenFirmware rather than a BIOS), you may have to install another version of grub (see grub 2 variants).

Configuring Grub

Configuring grub v1

The configuration file is /boot/grub/menu.lst

Under Debian, the grub configuration file is updated automatically, when you install a new kernel. This is done automatically by update-grub.

You can edit the settings in /boot/grub/menu.lst. Make sure you read the comments, /usr/share/doc/grub/README.Debian.gz for more information and the update-grub(8) manpage from your distribution)

Configuring grub v2

The configuration file is /boot/grub/grub.cfg, but you shouldn't edit it directly. This file is generated by grub v2's update-grub(8), based on:

  1. The script snippets in /etc/grub.d/

  2. The configuration file /etc/default/grub

To configure grub "v2", you should edit /etc/default/grub, then run update-grub. Advanced configuration are achieved by modifying the snippets in /etc/grub.d/.

Upgrading from v1 to v2

To upgrade to grub v2, you should:

  1. Install grub v2 (but don't remove the grub 1 yet).
  2. Follow the instruction displayed the package installation (i.e grub v1 now has an entry to cascade to grub v2, so reboot and try it, then you can actually enable grub2 bootloader by running upgrade-from-grub-legacy).

Transition from v1 to v2

FAQ

Dual Boot

See Also

  1. Grub is the main default bootloader on x86... But some other bootloaders are installed by default in some scenario that aren't supported by Grub v1. (1)