Edgy: install to USB drive leaves system unbootable

Bug #68070 reported by Mark Lord
10
Affects Status Importance Assigned to Milestone
ubiquity (Ubuntu)
Invalid
Undecided
Unassigned
Nominated for Gutsy by Boris Burtin
Nominated for Hardy by Boris Burtin

Bug Description

Installed Edgy Kubuntu from RC CD, to a USB hard drive.

All went well, until installing the bootloader. Edgy installer did NOT ask my permission to rewrite MBR on the internal hard drive (rather than the USB drive??? bug!), and totally messed up the booting.

Now the system can boot from NEITHER drive.

Sure, Grub comes up with a prompt, but none of the boot menu items actually works, failing with "Error 15: File not found" messages.

Grrr... time to boot from KNOPPIX and repair the mess now.

Revision history for this message
Net Venture (netventure) wrote :

The "File not found" error is probably due to an incorrect "root=" parameter. maybe you should try editing the grub configuration by typing 'e' and set teh root to /dev/sda1 or whatever (USB drives start with sda).

Also, the ability to choose where GRUB is installed is not available in the "normal" CD. You need to use the alternate CD for this, IMO.

--NV

Revision history for this message
Mark Lord (launchpad-rtr) wrote :

No, actually the "File not found" error in this instance is due to the installer using the wrong device.map parameters. Nothing at run time could recover from this (I know Grub inside and out), short of redoing grub-install with a fixed device.map.

The Edgy installer put grub onto the wrong (internal) hard drive, rather than the correct (USB external) drive.

To do it properly, rather than toasting *both* drives as it did, it should have (1) asked for permission since it had a choice of drives (no need to ask if only one drive), and (2) the device.map should have looked like this:

    (hd0) /dev/sda

Instead of what it used:

   (hd1) /dev/sda

Or this (internal drive):

  (hd0) /dev/hda

This was a very fatal mistake by the installer -- it rendered both disks completely unbootable, even the internal drive which I had never given the installer permission to modify at any point. Bad bad BAD.

Cheers

Cheers

Revision history for this message
Mark Lord (launchpad-rtr) wrote :

Oh, I should add though, that apart from this one rather serious kink with the installer, everything else is fantastic on the external drive!

Edge can suspend to RAM, hibernate, resume etc.. all just perfectly, without me having to tweak anything else (other than fixing the GRUB install).

Very well done everywhere else, folks!

Revision history for this message
Boris Burtin (boris-burtin) wrote :

I hit this same problem with 7.1. The only way I found to avoid overwriting the original MBR was to remove the internal drive in my laptop while installing Ubuntu. I think this is a pretty serious bug, especially because the user doesn't know his system won't boot until it's too late.

If anyone else hits this problem with Windows, the workaround is to restore your original MBR with either the "fixmbr" or "fdisk /mbr" command:

http://www.ambience.sk/fdisk-master-boot-record-windows-linux-lilo-fixmbr.php

Revision history for this message
Tormod Volden (tormodvolden) wrote :

Isn't there an option now under Advanced on the last page of the Ubiquity desktop installer to choose where grub should be installed?

BTW, don't nominate for Hardy as long as the current development version is Hardy. If the bug is open, it means it has not been fixed yet.

Revision history for this message
Boris Burtin (boris-burtin) wrote :

I don't remember seeing that option. Possible that I missed it. Even if it's there, the installer should warn the user that he's about to overwrite his boot loader, rendering the existing Windows installation unable to boot.

Revision history for this message
Tormod Volden (tormodvolden) wrote :

IMHO, the default disk for writing the boot loader should be the disk that you are installing to. Can you please check if this is the case with Hardy?

Revision history for this message
Boris Burtin (boris-burtin) wrote :

Oops, I just realized that the terminology I used in my previous comment might not be correct. I think what's being written is the master boot record (MBR), not the boot loader. The Ubuntu installer most likely does write the boot loader to the USB drive, but it overwrites the MBR on the internal drive. When I removed the internal drive and reinstalled Gutsy, it did the right thing. I then put the internal drive back into the box and am able to boot into either Windows or Ubuntu.

Revision history for this message
Tormod Volden (tormodvolden) wrote :

Ok. I think it should not install MBR to (or touch in any way) any other disk than the one you're installing to, by default.

Revision history for this message
Parthan SR (parth-technofreak) wrote :

Thank you for your bug reports. As the bug seems to have been reported on Edgy and Feisty and we are now with a new release, can you confirm this bug with Ubuntu Hardy (beta)? Thanks in advance.

Changed in ubiquity:
status: New → Incomplete
Revision history for this message
Pamela Fong (katsiki) wrote :

I'm a n00b to Ubuntu and ASUS EEE PC. I tried booting Hardy 8.04 Beta CDROM to install Linux to an external WD 250 GB USB hard drive from a brand new ASUS EEE 2GB Surf PC. When I boot the USB drive, I get the grub boot menu, then the error, "Error 15: File not found". At least on Ubuntu 7.10, on this ASUS EEE, even though I disabled the primary internal Flash Drive of the PC, it is still recognized by Ubuntu, so I get the same error trying to install with that older version.

Revision history for this message
Tormod Volden (tormodvolden) wrote :

katsiki, your problem is slightly different. I guess you installed with the internal drive enabled and then disabled it? The numbering of the drives changed and if grub tries to boot Ubuntu from (hd1) it is probably (hd0) now that the internal drive is disabled. Try modifing the "root (hdX,Y)" line in the grub menu entry.

Revision history for this message
Parthan SR (parth-technofreak) wrote :

We are closing this bug report because it lacks the information we need to investigate the problem, as described in the previous comments. Also you reported this bug a while ago and there hasn't been any activity in it recently. Please reopen it if you can give us the missing information, and don't hesitate to submit bug reports in the future. To reopen the bug report you can click on the current status, under the Status column, and change the Status back to "New". Thanks again!

Changed in ubiquity:
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.