Comment 38 for bug 46520

Revision history for this message
Ubfan (ubfan1) wrote : Re: Grub installs to wrong drive's MBR in default install. No way to change in standard installer.

This problem is present in Intrepid and easy to duplicate with a laptop and a USB disk.
Installating Ubuntu to a USB disk is likely to be a common scenario.

Set the laptop boot order to be: USB/CDROM/harddisk. Boot the standared live Ubuntu CD-ROM, plug
in the USB disk, and install to the first USB partition. Select the default (not advanced)
option and the result of the "successful" install will boot neither Linux nor Windows, with
or without the USB disk attached.

The Cause:
The Grub files are put on the USB /boot/grub, but the Grub bootloader is put
on the laptop harddisk master boot block. The menu.lst disk identifications are the USB UUID for
the Linux roots and (hd0... for Windows! Without the USB drive attached, the Grub bootloader
cannot find its files, so it fails. With the USB drive attached, the windows disk is wrong in
the menu.lst (It is not hd0, as menu.lst identifies it). Not sure why the Ubuntu boots fail,
unless since there is no bootloader on the USB disk, the disk is not even seen, and the UUID
is not found.

Workarounds:
  1) Windows boot works (only with USB attached) when you change the boot order to hard-disk first, then
the Grub "hd0" is accurate for the Windows sections. I thought I tried editing menu.lst, changing the hd0 to hd1
for the windows sections, and even trying to map (hd0) (hd1) ... all failed (before fixing the USB boot, then just
changing the hd0 to hd1 worked).
  2) Linux boot may be fixed by booting the CD-ROM, and doing the Grub install again to the
USB disk (needed the --recheck and the explicit root-directory flag to get beyond the "disk not
 supported by bios complaint"). Then replace the menu.lst file, which disappeared! (I had a backup called menu.lst~).
  3) To use the laptop without the USB disk, either:
    a) Restore the MBR with the Windows Recovery Console's FIXMBR (good luck, finding the Recovery Console is the hard part!).
    b) Find a (Windows) fdisk on a bootable media, and fdisk /mbr
    c) Do a complete Grub install to a FAT partition (like the recovery partition found on many laptops these days). I
       finally did this, since I have messed up a system before looking for the Recovery Console on the
       vendor supplied recovery disks.

Other (hopefully) irrelevant details:
 * AMD cpu laptop, NTFS primary partition, FAT recovery partition
 * MAXTOR 200G USB disk, 9 partitions, first partition 50G for the Ubuntu install, preformatted ext2. No swap. No boot.
 * Before repair, Grub console found the /ntldr on (hd1,1), but nothing was found on hd0 (?).
 * Visible devices were fd1-fd7, hd0 and hd1. I thought the 7 floppy disks were probably the misidentified usb disk partitions.
 * kernel is whatever the 8.10 live cd installs