Thursday, February 07, 2008

Grub Config

Example of menu.lst booting a kernel

title Item Title Goes here

# this first root option selects which partition to set GRUB root
root (hd0,0) # name of the partition that grub should look for the kernel image

# the second root option in the kernel statement is the root partition that Linux will mount to
kernel (hd0,4)/boot/vmlinuz ro root=/dev/sda5 # location of read only image.

initrd (hd0,4)/boot/initrd.img # location of initrd image
boot # actually boots the system with the given commands


Example of menu.lst chainloading an OS

title Item Title Goes here
root (hd0,1)
chainloader +1

Installing grub into a boot sector (within the os)

sudo grub
> root (hd0,0)
> setup (hd0)
exit

3 comments:

Louis Ramos said...
This comment has been removed by the author.
Louis Ramos said...
This comment has been removed by the author.
Louis Ramos said...

# grub2 shell (wubi update breaks boot menu)

sh:grub>set root=(loop0)
sh:grub>linux /boot/vmlinuz-2.6.31-14-generic root=/dev/sda2 loop=/ubuntu/disks/root.disk ro
sh:grub>initrd /boot/initrd.img-2.6.31-14-generic
sh:grub>boot

# Reinstall grub-pc

sudo apt-get remove grub-pc
sudo apt-get install grub-pc

That should fix the problem