Install boot loader chooses wrong drive

Bug #565189 reported by Jonathan Blackhall
30
This bug affects 6 people
Affects Status Importance Assigned to Milestone
ubiquity (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Binary package hint: ubiquity

I am attempting to install Ubuntu Lucid Beta 2 on my desktop, where I have 2 hard drives installed sda (a junk drive) and sdb. I currently have Ubuntu 9.10 and Windows XP installed on sdb (also my boot drive in BIOS) with GRUB. When the partition manager came up in Ubiquity, I chose to Erase sdb completely and replace the entire drive with a fresh Ubuntu Lucid partition. This all went as planned (although it was odd that my sda drive was selected by default when the partition manager started, instead of sdb, my boot drive). As I finished up everything in Ubiquity, I checked the "Advanced" button on the final "Ready to Install" screen only to see that it was set up to install GRUB on sda, my non-boot, otherwise untouched drive, and not on sdb, where I was installing Ubuntu.

I expected: Ubuntu would install GRUB on the same drive as the rest of the installation or on the drive that's marked as my "boot" drive and leave my sda junk drive alone.

ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: ubiquity 2.2.15
ProcVersionSignature: Ubuntu 2.6.32-19.28-generic 2.6.32.10+drm33.1
Uname: Linux 2.6.32-19-generic x86_64
Architecture: amd64
Date: Fri Apr 16 23:45:50 2010
LiveMediaBuild: Ubuntu 10.04 "Lucid Lynx" - Beta amd64 (20100406.1)
ProcEnviron:
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: ubiquity

Revision history for this message
Jonathan Blackhall (johnny-one-eye) wrote :
Revision history for this message
Peter (jynyl) wrote :

I had a similar problem, attempting to install Kubuntu 10.04 netbook beta from USB to a HP mini 5102.
At that stage of the install sequence, the only option for installing the bootloader was sda, which was the USB stick I was installing off. The distro was installed to sdb, but couldn't boot unless the USB was plugged in.

Revision history for this message
Robert Allegretti (boba1120) wrote :

I have a similar issue, found first in Mint 9 RC and confirmed upstream with Lucid (x64 in both cases). I'm trying to install on my laptop (single-drive). I have 50gigs un-partitioned, I choose the "use largest continuous free space" option to install. This suggests 2 new logical partitions, typically sda5 and sda6 (one ext4 for root and one swap). So far so good. I choose advanced at the end, looking to install grub on sda5 (I dual boot Win7 and try a lot of distros, so it's easier for me to let Windows have the MBR and manage from there with EasyBCD). This setup has worked fine on previous releases. Now however, I don't see any of the proposed new partitions in the dropdown, but there is a mysterious sda-1. Selecting this disables the OK button.

Revision history for this message
Jonathan Blackhall (johnny-one-eye) wrote :

@Peter: I didn't have any trouble picking my correct partition from the dropdown menu. My problem was that it wasn't chosen by default on the same drive as the rest of my system. Agreed that it should've chosen your sdb by default, but it's weird that your only option to install it was sda. Maybe it's something unique to the USB installer? Regardless, you should file a separate bug for that part of the issue.

@Robert: Like I said to Peter, I didn't have any trouble picking my correct partition from the dropdown menu. My problem was that it wasn't chosen by default on the same drive as the rest of my system. Perhaps you should file a separate bug, probably with ubiquity.

Revision history for this message
Mark Weaver (blushingpenguin) wrote :

This is quite similar to #549756

I can reproduce this with Ubuntu 10.10 64-bit, when booting a machine with one SATA drive off a USB key to install, the bootloader was installed to the USB key instead of the SATA drive. No option as to which drive grub should be installed on was offered.

In this case as well as rendering the installed system unbootable, it also broke the USB key (although entertainingly booting the machine off the USB key resulting in the installed copy of ubuntu on the hard drive starting up fine).

Revision history for this message
Mark Weaver (blushingpenguin) wrote :

(it looks somewhat like GRUB is just installed to /dev/sda all the time -- in this case the machine seems to boot with USB key=/dev/sda, SATA disk=/dev/sdb)

Revision history for this message
Manjul Apratim (manzdagratiano) wrote :

Yes that is precisely what happens. My Sony Vaio sees the usb key as /dev/sda too; this therefore makes it a small logical bug in the installer - that the boot loader should by default be installed to the MBR of the drive the system is being installed onto. But maybe this is a Kernel issue regarding how it sees the USB drive?

tags: added: ubiquity-2.2.15
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in grub-installer (Ubuntu):
status: New → Confirmed
Changed in ubiquity (Ubuntu):
status: New → Confirmed
Revision history for this message
Phillip Susi (psusi) wrote :

There is no way to determine which drive you have set your bios to boot from so the assumption is that it is the first disk in the system, which usually comes up as sda.

Changed in ubiquity (Ubuntu):
status: Confirmed → Invalid
no longer affects: grub-installer (Ubuntu)
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Phillip Susi (psusi)
affects: ubuntu-bootloader-manager → ubuntu
Changed in ubuntu:
status: New → Confirmed
Phillip Susi (psusi)
no longer affects: ubuntu
Revision history for this message
Max (nanodeath) wrote :

I know this is an old issue that's been marked as invalid, but please hear me out.

I just ran into this yesterday, and it represents a pretty catastrophic user experience -- perhaps the second worst thing I can think of going wrong during the install process (the first being formatting the wrong drive).

So here's my anecdote, but it's essentially the same as the others so far. I have a primary drive that runs Windows 10. I plugged in an external drive that I wanted to install Ubuntu on. I booted from a USB flash drive that had the Ubuntu live image on it. I specified that I wanted to install to the external drive. Final confirmation dialog confirms that the external drive will be formatted and partitions created. All seems to be going according to plan.

Then I reboot and try to select the external drive from the BIOS-based boot select menu. Nothing -- just a blinking cursor. If I try to boot off my Windows 10 drive, then I get a GRUB bootloader (!?!) that lists Ubuntu and Windows. Not at all what I was expecting.

Even worse, if I try to boot without the external drive plugged in, GRUB falls into a command-line-based recovery mode.

At no point did the installer ask what drive to install the bootloader to.
During the final "point of no return" confirmation dialog, it didn't mention sda anywhere, or where it'd be installing the bootloader to.

Now I need to spend an hour or two tonight figuring out how to a. install GRUB onto the external drive, so I can actually boot it directly, and b. replace GRUB with the original Windows bootloader on the primary drive.

I'd really like *not* to be doing that with my Friday evening, and I'm sure other users will (and have) run into this exact issue -- any time a user wants to install to an external drive. This issue should remain open and actually get a fix.

Revision history for this message
Phillip Susi (psusi) wrote :

There is in fact, a list box where you can choose where to install grub to.

Revision history for this message
Max (nanodeath) wrote :

Hey Phillip. Appreciate your response, but that's only if you go through the "Something else"/Advanced partition editor branch of the installer. If you go through the "Erase disk and install Ubuntu" install mode instead, there's no choice or warning that sda's bootloader will be overwritten. And since I don't want to fiddle with creating partitions, it makes sense to choose the "Erase disk and install Ubuntu" branch.

(As an aside, it's also confusing that the "Install Now" button does not in fact trigger the installation -- it spawns a popup warning about partitions that are about to be written. I'd expect it to be either "Continue" or "Install...")

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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