Grub

From Nuclear Physics Group Documentation Pages
Revision as of 20:05, 1 January 2008 by Maurik (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

GRUB

It seems I will never really fully understand the details of how "grub" does it's stuff. This is more a quick reference, look at the real documentation for more.

Installing grub on a disk

To use grub you need to put the boot loader(s) onto the disk you plan to boot from. The following magic will do this:

grub
grub> root (hd0)
grub> setup (hd0)

This will put grub on the first BIOS disk MBR (usually the one the BIOS tries to boot from). If you want to put it on the first partition of that drive instead, use "setup (hd0,0)" instead. Note that it MUST be either on the MBR or on the first partition, unless you are "chain-loading".

You can also use the script "grub-install" to install grub. This may not always work, depending on the details of the system you are working with:

grub-install /dev/sda
or
grub-install hd0

to put grub on the MBR of the first disk.


The grub.conf file

All instruction for grub on what to do are in the file grub.conf, usually in /boot/grub.