Marketplace:

 
Cheap web hosting provider with extensive free web hosting features
Register or buy domain name, include free email and domain forwarding services
Cheap and affordable domain name registration and domain name transfer from $2.95/yr

 

   

GRUB: The Grand Unified Boot Loader

next up previous contents index

Debian Packages: grub

Grub (the GRand Unified Bootloader) is a boot loader designed to address the limitations of lilo. It makes up for numerous deficiencies in many PC BIOSs while providing full-featured command line and graphical interfaces. Grub recognises fdisk partitions, can dynamically read Linux ext2fs, and MSDOS FAT16 and FAT32 filesystems, and can boot multiboot-compliant kernels (such as GNU Mach), as well as standard Linux and MSWindows kernels.

A good introduction to grub is available from http://www.gnu.org/software/grub/grub.html and a good guide to multi-boot setup is http://www.tldp.org/HOWTO/Multiboot-with-GRUB.html. This latter resource looks at multi-booting four operating systems although the information is still useful if all you want is to multiboot just two.

To switch from lilo to grub simply install it with:

  # wajig install grub
  # grub-install /dev/hda
  # update-grub


This creates a /boot/grub/menu.lst file which you might like to review just to make sure it looks okay. For most simple situations it should be fine.

For a dual boot with MSWindows/NT on the first partition and Linux on the second (like Mint), you may need to change the default locations of Linux. Look at /boot/grub/menu.lst to see if the following two lines have been changed:

# kopt=root=/dev/hda1 ro
# groot=(hd0,0)


to

# kopt=root=/dev/hda2 ro
# groot=(hd0,1)


Also, add to the end of the file:

title           Windows NT
rootnoverify    (hd0,0)
makeactive
chainloader     +1


Once it looks okay, run update-grub then reboot!

When installing new kernels you can have the new kernel automatically added to the menu by adding the following lines to /etc/kernel-img.conf (and in fact making the file look the same as) :

  # Turn off Lilo stuff
  do_symlinks = no
  do_bootloader = no

  # Initrds are OK for GRUB
  do_initrd = yes

  # Run cool GRUB stuff
  postinst_hook = /sbin/update-grub
  postrm_hook = /sbin/update-grub


If you start having problems booting, at the grub menu type c to get the command line. Try:

  root (hd0,4)     (/dev/hda5)
  kernel /boot/vmlinuz-2.4.18-bf2.4 root=/dev/hda5 ro
  boot


More information on using grub is available from the Linux Journal.


next up previous contents index


Copyright (c) 1995-2004

 

      

Marketplace:
Facts: " If you give someone a program, you will frustrate them for a day; if you teach them how to program, you will frustrate them for a lifetime.   "  

Monday 1 December 2008 21:06:17 1228165577