I damaged my grub2 config. I can still easily launch my otherwise healthy Ubuntu 10.10 64 bit system using Partition Magic's Super Grub Disk 2's "detect any OS" utility, but when I try to boot from the system drive via it's grub2 installation, I get:
error: out of disk. error: symbol not found: 'grub_os_area_addr'. error: symbol not found: 'grub_os_area_addr'. Failed to boot both default and fallback entries. Press any key to continue...
Per some advice I saw on the web, I booted the system back up using PM's utility, completely uninstalled grub2, grub-common, etc., made sure my /etc/grub.d directory was empty, reinstalled grub2 from synaptic, and ran update-grub, at which point it found my linux install and completed with no errors.
When I reboot now, I get the correct grub menu (there's only one linux install on the system - I don't have other disks/partitions with OSes), but when it tries to launch it, it fails as described above.
When I look at the grub command that partition magic's utility generates that actually works (generated from the grub2 "edit command" option you can use before launch), it says:
set root=hd5,1 linux /boot/vmlinuz-2.6.35-28-generic root=<the correct UUID> ro initrd /boot/initrd.img-2.6.35-28-generic
However when I look at (from the grub boot menu) the command generated by "update-grub", I see:
recordfail insmod part_msdos insmod ext2 set root='(hd4,msdos1)' search --no-floppy --fs-uuid --set <the correct UUID> linux /boot/vmlinuz-2.6.35-28-generic root=<the correct UUID> ro quiet splash initrd /boot/initrd.img-2.6.35-28-generic
So the working command says "set root=hd5,1" and the failing one "set root='(hd4,msdos1)'".
As you might expect, after I boot (using PM), when I look at the /etc/grub.d/00_header section of /boot/grub/grub.cfg, I see
set root='(hd4, msdos1)'
in several places. But it sure seems like it should be (hd5, msdos1) or (hd5, 1) or something with a 5 somewhere. So why might update-grub be pointing to the wrong disk?
I have 4 bulk storage disks (mounted as sda/b/c/d) before this one - none of them are marked bootable (according to gparted). My OS drive/partition is mounted as sde/sde1, and the Partition Magic usb stick (when it's attached) is sdf/sdf1. So I don't believe my system drive is changing locations from hd4 to hd5 depending on whether or not my usb stick is inserted - the drive locations seem stable.
Any help appreciated!