GRUB2 for GRUB1 Users (201003)

These are very rough notes and unlikely to be useful to people other than me. Sorry.

In late 2009 Debian testing rolled out GRUB2. It's much more complex and more automated than GRUB1. This is probably a blessing to new users and people who've never touched GRUB as the auto-detection is better, but to those of us who have been editing the GRUB1 config for years it's a real problem. Here are my notes so far.

GRUB2's config file is /boot/grub/grub.cfg . You should look at this when you have problems with GRUB: but keep in mind that the message at the top is correct. Don't edit the file, or at least if you do, realize it will be regenerated/replaced the next time you install a kernel or run update-grub . The "proper" way to change GRUB2's behaviour is to edit these files:

/etc/default/grub - (as an example of the thrash GRUB2 has seen in Debian testing, this used to be /boot/default/grub) this includes the basics, like the time-out and which kernel is the default.

/etc/grub.d/40_custom - adding grub kernel or OS entries that GRUB2 doesn't auto-detect. Kernel entries are essentially the same as GRUB1: if unsure, check the auto-detected entries in /boot/grub/grub.cfg .

There are several other files in /etc/grub.d/ but these appear to be scripts that I at least wouldn't want to modify.

I have a bootable external USB drive that I connect to one of my laptops: whenever there's a GRUB2 or kernel update, it pretty reliably toasts the MBR on the external drive. So ...

Installing the boot loader when it gets corrupted:


http://gilesorr.org/code/grub2.html (3.3Kb)
Last modified 20100612 by giles