November 26, 2014
 
 
RSSRSS feed

Getting Some GRUB For Linux

Preparation

  • April 26, 2004
  • By Carla Schroder

"I was going to go off on a cute riff about "Lilo and Stitch," but after enduring a rant from a friend about how the movie had NOTHING to do with bootloaders, I reckon I'll just stick to the point. Darned over-literal geeks anyway.

"If you're still lumbering along with the antique Linux Loader LILO, you really ought to consider migrating to GRUB, the Grand Unified Bootloader. LILO is quite good, and, as the saying goes, if it ain't broke... But GRUB has some advantages that make it, in my opinion, the Bootloader of today's generation. Here's why:

  • There's no need to reinstall GRUB with every kernel change
  • GRUB does not need to be restarted after making configuration changes
  • GRUB has its own command shell, for making changes on the fly
  • GRUB reads file systems and kernel executables, rather than inflexibly restricting the
  • user to disk geometry You can boot from a GRUB floppy disk
  • You can boot bare kernels, passing in modules and parameters from the command line
  • You can download OS images over the network

First, you'll need to know a few things about your system:

  • Partition table
  • Location of Linux kernel (usually /boot/something) and the partition it is on
  • As always, back up your data and have a rescue disk, like Knoppix, at hand
  • Take a look in your /boot directory--this is where much of the GRUB action happens, so take a minute to look at what files are in here. This will remove much mystery later.

Make a hard copy of your lilo.conf, it contains information you need. For extra insurance in case things go majorly haywire, backup your existing MBR:

# dd if=/dev/hda of=/archive/hda.mbr bs=512 count=1

"The output file (of=) can be anywhere you like. It is perfectly safe to copy it to a file on the same system, as long as you have a bootable rescue disk. Except don't copy it into /tmp- on most systems, this is cleaned out at reboot.

Sitemap | Contact Us