Grub boot loader

From Edgar BV Wiki
Revision as of 09:50, 4 June 2010 by 192.168.0.39 (talk)
Jump to navigation Jump to search

To install grub do

>> apt-get install grub

Then to activate grub on the MBR do

>> grub-install /dev/hdXX #(device where to put the bootloader - generally the / partition if you run mount)

To create the /boot/grub/menu.lst you do

>> update-grub

around the top is the line

default 0

This sets the option that will be run by default (starts at 0 and goes up). Look at the options and see which one will be run - it seems to want to put 2.4 kernels ahead of 2.6 kernels!

Then you run grub

This puts you in the grub menu.

In the grub menu do:

grub> root (hd0,0)

grub> setup (hd0)

Then reboot and see how it went!


To put grub on a new HD, first create a grub boot floppy with


grub-floppy


then reboot into the grub floppy.


In the grub menu do:

grub> root (hd0,0)

grub> setup (hd0)


and then reboot!


A typical basic /boot/grub/menu.lst

default 0 timeout 5 color cyan/blue white/blue

title Debian GNU/Linux, kernel 2.6.26-2-amd64 root (hd0,0) kernel /vmlinuz-2.6.26-2-amd64 root=/dev/mapper/tripenclosure-root ro q uiet initrd /initrd.img-2.6.26-2-amd64

title Debian GNU/Linux, kernel 2.6.26-2-amd64 (single-user mode) root (hd0,0) kernel /vmlinuz-2.6.26-2-amd64 root=/dev/mapper/tripenclosure-root ro s ingle initrd /initrd.img-2.6.26-2-amd64