Ubuntu installation: GRUB being installed in Dell hidden partition
Q My father in-law recently expressed some interest in GNU/Linux, so I told him to download the brand-new-to-Linux distro du jour, Ubuntu. I really, really, expected the install to go smoothly, but he ran into a problem that has me stumped. The answer is probably simple, but beyond me. He is using a new-ish P4 Dell that came with Windows XP pre-installed. He had about 10GB of free space to use for the installation. The normal installation procedure ran smoothly and instructed him to reboot. Upon reboot, Grub returned an Error 21. After he did a little digging, he found out that Dell places a small, invisible partition on its disks that contains Dell tools and utilities. Apparently, the MBR [Master Boot Record] has been moved somewhere unusual on these machines. After consulting the marvellous Ubuntu forums, I discovered that, a/ yes, this is the problem, and b/ nobody seems to have a good solution. So, how do I configure Grub so that it boots properly? I don't have physical access to the machine, but I know it only has a single hard drive. After install, the partitions should lay out something like:
hda1 Dell super-secret files.
hda3 onwards boot.
A You don't say which model of Dell this is, but the usual layout is to put the Dell utilities partition on hda1 and a bootable Windows partition on hda2. The MBR should be in the usual place, otherwise the BIOS wouldn't be able to find the partitions. Grub Error 21 is a stage 2 error, which tells us that Grub has already loaded from the MBR and found its stage 2 files in /boot to be able to get as far as this error. Error 21 means 'Selected disk does not exist' so this would appear to be an error in the Grub configuration: trying to load a kernel from the wrong place, such as a non-existent partition. This is definitely the case if Grub is able to load Windows (which would atleast prove that Grub itself is working). Press Esc to get to the Grub menu, highlight the Linux entry and press 'e' to see the details. You should see something like this:
kernel /boot/vmlinuz-2.6.15-23-386 root=...
There is a good chance the root setting is wrong. Press 'c' to get the grub command prompt and type
using the full filename specified in the kernel line above. This will return the location of the partition that contains the kernel, which will probably be hd(0,2) or (hd0,4), depending on whether /boot is on a primary or logical partition. Press Esc to get back to the menu entry, highlight the 'root' line and press 'e' to change it to match the output of find. Press Enter to accept the change then 'b' to boot. Once you know it works, you can edit the configuration file to make the change permanent by running this in a terminal:
sudo nano /boot/grub/menu.lst
You'll find the menu details below the line that reads '## ## End Default Options ##' The bad news is that you really need physical access to the computer to do this, or to be able to talk your father-in-law through it.
Follow us on Identi.ca or Twitter