whole disk install puts grub in wrong place

Bug #1066173 reported by Len Ovens
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ubiquity (Ubuntu)
Fix Released
High
Stéphane Graber
Quantal
Fix Released
High
Stéphane Graber

Bug Description

For test case "Install (entire disk) in Ubuntu Studio DVD i386 for Quantal Final " Oct12.1. When installing onto a second drive (removable in this case) The boot information goes on the internal drive instead of the install drive. When the second drive is removed the internal drive can no longer be booted because grub is looking for the external drive.

One of two things should happen (in my opinion):

a) grub should be installed on the same drive as the new install.

b) when choosing drive to install to, a place to select where grub is to be installed should be provided.

and now to go repair grub on my machine...

Tags: iso-testing
Revision history for this message
Ubuntu QA Website (ubuntuqa) wrote :

This bug has been reported on the Ubuntu ISO testing tracker.

A list of all reports related to this bug can be found here:
http://iso.qa.ubuntu.com/qatracker/reports/bugs/1066173

tags: added: iso-testing
Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

I did the following test:
1. Plugged an external drive on a system with an existing installation of Ubuntu
2. In partman I selected 'Entire drive'
3. On the confirmation page, I selected the external drive (sdc) and proceeded with installation
4. Proceeded with installation and rebooted
=> Boot ok with external drive plugged
5. Unplug external drive and boot
=> Dropped to grub rescue mode

So, I confirm the report here, but I don't know what is the expected behaviour in this situation.

Changed in ubiquity (Ubuntu):
status: New → Confirmed
Revision history for this message
Len Ovens (len-ovenwerks) wrote : Re: [Bug 1066173] Re: whole disk install puts grub in wrong place

On Sat, October 13, 2012 8:11 am, Jean-Baptiste Lallement wrote:
> I did the following test:
> 1. Plugged an external drive on a system with an existing installation of
> Ubuntu
> 2. In partman I selected 'Entire drive'
> 3. On the confirmation page, I selected the external drive (sdc) and
> proceeded with installation
> 4. Proceeded with installation and rebooted
> => Boot ok with external drive plugged
> 5. Unplug external drive and boot
> => Dropped to grub rescue mode

The problem is with removable drives. May of todays systems will boot from
the external drive by default because they have no floppy or cd/dvd drive.
So in my case even with the external drive plugged in it failed to reboot
because the BIOS was looking for a bootable external drive. The only way I
could reboot was to tell the bios to select the internal drive even though
the external drive was plugged in, but that was only good for one boot. I
had to reset the bios at every boot. So in the case of a USB drive Grub
has to go on the external drive to boot correctly at all with a netbook
for example. (both of the ones I have here Acer and HP show the same
thing)

Revision history for this message
Erick Brunzell (lbsolost) wrote :

This may be a duplicate of bug 684292.

AFAIK this behavior dates back to changes in ubiquity circa Maverick. Prior to that the final installation screen allowed the user to select where they wished to install grub but beginning with Maverick a user may only change where grub is going to be installed using the advanced partitioning option.

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

We recently changed the logic as to which drive is preffered for the installation.
There are two things at play here: what devices BIOS/(U)EFI are looking for boot loaders and in what order.
I do not think it's ever wise by default to install bootloader into MBR or a different device.

As a workaround you can enter advanced paritioner, select boot loader device, then go back & finish the install. That should work.

Changed in ubiquity (Ubuntu):
importance: Undecided → High
Revision history for this message
Len Ovens (len-ovenwerks) wrote :

On Sat, October 13, 2012 10:15 am, Dmitrijs Ledkovs wrote:
> We recently changed the logic as to which drive is preffered for the
> installation.
> There are two things at play here: what devices BIOS/(U)EFI are looking
> for boot loaders and in what order.
> I do not think it's ever wise by default to install bootloader into MBR or
> a different device.
>
> As a workaround you can enter advanced paritioner, select boot loader
> device, then go back & finish the install. That should work.

I understand the work around (and normally use manual for my own use) but
am more worried about the first time user who is not trusting of shrinking
their windows partition and wants this separate to learn on/try out. It is
not clear from the use whole disk text that ubiquity will do anything to
the internal drive. Even a "do not use this option for an external drive"
warning would be better than what is there now. I have had to help a
newbys with unbootable systems and it seems maybe this is one of the
reasons why. Once "use whole disk" is chosen, the option to choose which
disk is given. This makes this method a comfortable idea for someone with
this setup. It is possible to detect if a drive is external, maybe
separate options should be given for that case. Maybe stronger language
like "this will modify your main (C: or /dev/sda) drive even if you choose
to install on another drive" before this option is chosen would help.
Ubuntu is an out of the box distro and if it is easy for an inexperienced
user to make their machine unbootable, something needs to change.

--
Len Ovens
www.OvenWerks.net

Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

Logs in debug mode with the following disk layout:
sda: internal ssd drive
sdb: usb stick
sdc: external sata drive

On first boot after installation and removing the usb stick I'm dropped to grub rescue mode with the following error message:
error: file '/boot/grub/i386-pc/normal.mod' not found

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

debconf (developer): <-- GET partman-auto/init_automatically_partition
debconf (developer): --> 1 10resize_use_free__________/var/lib/partman/devices/=dev=sdc//1048576-244699889663
debconf (developer): <-- SET partman-auto/init_automatically_partition 20some_device__________regular
debconf (developer): <-- GET partman-auto/select_disk
debconf (developer): --> 1 /var/lib/partman/devices/=dev=sdc

Oct 15 16:59:35 ubuntu grub-installer: info: Running chroot /target grub-install --force "/dev/sda"

I think ubiquity's automatic partitioning recipes should also update grub-device on_clicked_next / confirm, or upon even changing the device.

Changed in ubiquity (Ubuntu Quantal):
assignee: nobody → Stéphane Graber (stgraber)
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubiquity - 2.12.13

---------------
ubiquity (2.12.13) quantal-proposed; urgency=low

  [ Dmitrijs Ledkovs ]
  * Do not allow to edit locked partitions via double click in the Gtk
    Treeview. (LP: #1057690)

  [ Colin Watson ]
  * Fix "Mangement" typo (thanks, Yuri Chornoivan; LP: #1067228).
  * Update translations from Launchpad.

  [ Stéphane Graber ]
  * Add an extra parameter to grub_default so that the UI can force it to use a
    specific device rather than scan for / and /boot.
    Update Gtk and Kde code to pass that parameter when in auto mode.
    (LP: #1066173)
  * Automatic update of included source packages: base-installer
    1.122ubuntu13, partman-auto 103ubuntu4.
 -- Stephane Graber <email address hidden> Tue, 16 Oct 2012 19:12:03 +0200

Changed in ubiquity (Ubuntu Quantal):
status: Confirmed → Fix Released
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.