Ubuntu 9.10 will use GRUB 2 as its default bootloader, replacing GRUB legacy.  In this post, we take a look at some of the new features offered by this change.

Most of the enhancements of GRUB 2 will benefit only power users, since normal people are unlikely to want to boot to the grub command line to play with the features below (although StartUp Manager offers a GUI for configuring some of these options).  Nonetheless, the updated version of GRUB is a complete rewrite of its deprecated predecessor, and Ubuntu follows other leading Linux distributions, like Fedora, in switching to it.

Scripting

With support for variables, conditional statements and functions, GRUB 2 offers rich scripting opportunities.  This opens a wide range of new possibilities, like checking to see that a given kernel image exists before trying to boot it, making the boot experience a bit more user-friendly.

Rescue mode

When GRUB legacy has a problem that prevents it from booting the operating system, it usually just hangs, forcing users to hard-reboot the system.  In contrast, GRUB 2 fails to a command prompt where users can attempt to rescue a half-booted system.  Granted, this feature will be of help only to geeks who can work from the command line, but it's still an improvement over the vague error messages that GRUB legacy likes to throw.

Graphical boot

GRUB 2 makes it possible to create graphical boot menus like these, which represent a major aesthetic improvement over the ugly text-based menu of GRUB legacy.  Although Ubuntu currently doesn't plan to take advantage of this feature, preferring instead to make the boot process so fast that aethestics don't matter, users can still enable it manually in Karmic.

Boot ISO images

GRUB 2 can boot directly to ISO images stored on a local disk, meaning among other things that testing a Linux live CD is as simple as saving its image to hard disk and passing GRUB the commands to boot to it.  No longer having to burn a CD or create a bootable USB drive in order to play with a new Linux distribution is a great improvement.  This feature could also come in handy for rescuing broken systems using live CDs.

On a closing note, I should point out that systems upgraded to Ubuntu 9.10 from an earlier release will not have their bootloaders replaced, because that would be an inherently risky operation.  Only fresh installs of Karmic will use GRUB 2.  However, the ambitious can upgrade their bootloaders manually following these instructions.