GuidesTip of the Trade: GRUB2

Tip of the Trade: GRUB2

ServerWatch content and product recommendations are editorially independent. We may make money when you click on links to our partners. Learn More.

GRUB, the GRand Unified Bootloader for Linux and Unix, has served ably and well for many years. It’s a flexible, powerful bootloader that can boot virtually any operating system, and it has a powerful command line. In fact, its command shell can be dangerously powerful, as it allows access to all files on the system regardless of ownership and permissions because GRUB operates outside of the filesystem. It’s great for a multiboot system — set up a stand-alone boot partition, then add or remove all the operating systems you want without worrying about having an executable to manage the bootloader. You don’t need one; once GRUB is installed to the MBR, all you need to do is edit its configuration file, /boot/grub/menu.lst every time you make a change.

With GRUB2, the venerable GRand Unified Bootloader for Linux and Unix has finally entered the new millennium.

But GRUB has been showing its age: It can’t handle RAID and LVM volumes; it’s stuck in ASCII; it can’t boot to a CD or DVD; and the underlying code is messy. So the fine folks at GNU spent the past few years writing a totally new GRUB. This new GRUB is called GRUB2, and it is based on the old PUPA project. GRUB Legacy is version 0.9x, and GRUB2 is version 1.9x.

GRUB2 runs on a wide range of hardware and software platforms. x86 and PowerPC users can go ahead and give it a test-drive now. You can download builds from CVS. Linux users should check their distributions for the grub-pc package. It is in Debian Testing and Unstable, Fedora, and several other distributions. The new version has many modern features: a built-in rescue mode, a graphical interface, support for 24-bit color graphics, network support, UTF-8 for internationalization, scripting and an even more powerful command shell. It even handles RAID and LVM.

Debian users have the easiest path to try it out — just run aptitude install grub-pc, then run dpkg-reconfigure grub-pc to remove legacy GRUB and configure GRUB2. Be sure to back up your old /boot/grub/menu.lst and have a bootable rescue disk on hand just in case. The new version still has a few rough edges, so try it out on a test machine first. You can also contribute to its development by reporting your experiences and problems to the development team.

Get the Free Newsletter!

Subscribe to Daily Tech Insider for top news, trends & analysis

Latest Posts

Related Stories