Installing from USB drive writes boot sector to USB not HDD

Bug #630529 reported by Vince Marsters on 2010-09-04
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
grub-installer (Ubuntu)
High
Unassigned
Maverick
High
Unassigned
ubiquity (Ubuntu)
Critical
Unassigned
Maverick
Critical
Unassigned

Bug Description

Binary package hint: ubiquity

When installing 10.10 beta 1 from a USB pen drive (created using startup disk creator in 10.04) and selecting any of the automatic partition setup modes, the MBR/Boot Sector is written to the USB pen drive (detected as sda) and not the internal HDD (sdb). If the partitions are manually created and the boot sector location set to the HDD then it is written correctly.

Ubiquity version - 2.3.13 (as installed in the beta ISO).

Installer log files from installation attached
---
Architecture: i386
DistroRelease: Ubuntu 10.10
LiveMediaBuild: Ubuntu 10.10 "Maverick Meerkat" - Release Candidate i386 (20100928)
Package: ubiquity 2.4.4
PackageArchitecture: i386
ProcEnviron:
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.35-22.33-generic 2.6.35.4
Tags: maverick
Uname: Linux 2.6.35-22-generic i686
UserGroups: adm admin cdrom dialout lpadmin plugdev sambashare

Vince Marsters (vincemarsters) wrote :

Adding installer logs which do not appear to have uploaded with the initial report

Vince Marsters (vincemarsters) wrote :

Also to add

This is on an Acer Aspire One 533 netbook
USB Pendrive is a Kingston Traveller 8GB which is detected as a USB HDD

Evan (ev) wrote :

Can you please boot into the live environment with that exact hardware configuration, and attach the output of the follow commands to this bug report:

sudo grub-mkdevicemap --no-floppy -m -

cat /proc/mounts

udevadm info --export-db

Thanks!

Changed in ubiquity (Ubuntu):
importance: Undecided → High
status: New → Incomplete
Vince Marsters (vincemarsters) wrote :

I have uploaded the log files requested using the same kit I logged the fault on.

Evan (ev) wrote :

Vincem,

Unfortunately, I'm unable to reproduce this myself using the latest daily-live CDs. However, I think I may have found the root of your bug. Just for my sanity, could I ask that you run through the installer one more time, but in debug mode, using the latest daily-live CD (http://cdimage.ubuntu.com/daily-live )? To get into debug mode, hit "Try Ubuntu", then run `ubiquity -d` from a console window. When the install finishes, run `apport-collect 630529` which will attach /var/log/syslog, /var/log/installer/debug, and /var/log/partman to this bug report automatically.

Thanks!

apport information

tags: added: apport-collected
description: updated

apport information

apport information

apport information

apport information

apport information

 On 29/09/10 17:43, Evan Dandrea wrote:
> Vincem,
>
> Unfortunately, I'm unable to reproduce this myself using the latest
> daily-live CDs. However, I think I may have found the root of your bug.
> Just for my sanity, could I ask that you run through the installer one
> more time, but in debug mode, using the latest daily-live CD
> (http://cdimage.ubuntu.com/daily-live )? To get into debug mode, hit
> "Try Ubuntu", then run `ubiquity -d` from a console window. When the
> install finishes, run `apport-collect 630529` which will attach
> /var/log/syslog, /var/log/installer/debug, and /var/log/partman to this
> bug report automatically.
>
> Thanks!
>
Hi Evan

I have completed a new install and attached the logs as requested. Using
last nights live CD to install from the same pen drive (Kingston 8GB) I
still have the same problem where I have to boot from the pen drive as
the installer appears to install the MBR onto the pen drive and not the
hard drive I installed the OS onto.

Regards

Vince Marsters

Vince Marsters (vincemarsters) wrote :

I have uploaded to logs as requested but can confirm using the live CD from last night I still have the same problem where I need to boot off the pen drive as the boot sector appears to have been written to this and not the hard drive.

Evan (ev) wrote :
Evan (ev) wrote :

Okay, I have a patch that should hopefully at least solve the surface level problem for you. Could you please run the install one last time for me, following these instructions:

Press "Try Ubuntu" at the first screen. When the desktop appears, connect to the Internet, open a terminal window, then run the following commands:
sudo apt-get -y install patch
wget https://bugs.edge.launchpad.net/ubuntu/+source/ubiquity/+bug/630529/+attachment/1672796/+files/630529.patch -O /tmp/patch
cd /usr/lib/ubiquity
sudo patch -p0 < /tmp/patch # Make sure this command completes successfully
sed -i 's/#set -x/set -x/' /usr/share/grub-installer/grub-installer
ubiquity -d

Run through the install again and let me know if the bootloader is still getting installed to the pen drive. If it's not, please attach /var/log/installer/debug and /var/log/syslog from that installation attempt.

Thanks a bunch for all your help in getting to the bottom of this!

Changed in ubiquity (Ubuntu):
importance: High → Critical
milestone: none → ubuntu-10.10
tags: added: patch
Vince Marsters (vincemarsters) wrote :

Unfortunately it still failed and requires the pen drive to boot. I am attaching the log files requested from the install

Vince Marsters (vincemarsters) wrote :

I forgot to add that I had to run sed with sudo as I was getting permission denied errors without this

Vince Marsters (vincemarsters) wrote :

I just tried again and noticed that during the process there was a not running grub install /dev/sda. Since sda is the pen drive (mounted as /cdrom) then this is writing grub to the pen drive and not the internal hdd.

Evan (ev) wrote :

The logs you attached do not appear to be from an install attempt. May I please ask that you try again, being sure to attach /var/log/installer/debug and /var/log/syslog from the install environment, following the directions above as well as the following:

http://wiki.ubuntu.com/DebuggingUbiquity/AttachingLogs

Thanks!

Colin Watson (cjwatson) wrote :

I managed to reproduce this locally by booting with 'break=top', running 'modprobe usb-storage', and then continuing with boot; this forced the USB disk to be /dev/sda. Evan and I then pair-programmed a fix. Uploaded.

Changed in ubiquity (Ubuntu Maverick):
status: Incomplete → In Progress
Vince Marsters (vincemarsters) wrote :

Apologies...I thought I had added the right logs.

If you want me to test the new fix with the hardware configuration mentioned let me know and I will be happy to do so tonight.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubiquity - 2.4.7

---------------
ubiquity (2.4.7) maverick; urgency=low

  [ Evan Dandrea, Colin Watson ]
  * Fix code to ensure that GRUB isn't installed to the installation device
    when it's a USB stick; this was a combination of the installation device
    typically being a partition rather than a disk device, and the fact that
    grub-mkdevicemap now emits /dev/disk/by-id/ names rather than
    traditional device names (LP: #630529).
 -- Colin Watson <email address hidden> Wed, 06 Oct 2010 14:01:53 +0100

Changed in ubiquity (Ubuntu Maverick):
status: In Progress → Fix Released
Colin Watson (cjwatson) wrote :

This affects d-i too, so I've added a grub-installer task. We aren't going to be able to squeeze this into 10.10, but we can deal with it for natty.

Vincem: yes please! We should have fresh daily CD images in a few hours.

Changed in grub-installer (Ubuntu Maverick):
status: New → Triaged
importance: Undecided → High
Vince Marsters (vincemarsters) wrote :

I've just tested and can confirm the new version of ubiquity fixes this problem for me.

Thanks for the work on this - and again apologies for the wrong log files last night

AaronPeterson (alpeterson) wrote :

it appears that the kubuntu 11.10 desktop 32bit iso put onto a cd using startdisk creator in 11.10 has a similar problem.
It just never boots, It dumps me into a busybox shell. Linux Mint 12 also does this to me. (only on my netbook)
The same media works on 2 other computers.

Could it be something to do with the half mini pciExpress ssd not being detected? (I am filing a bug, this just looked similar)

JC Hulce (soaringsky) wrote :

This bug affects Ubuntu 10.10, Maverick Meerkat. Maverick has reached end-of-life and is no longer supported, so I am closing the bugtask for Maverick. Please upgrade to a newer version of Ubuntu.
More information here: https://lists.ubuntu.com/archives/ubuntu-announce/2012-April/000158.html

Changed in grub-installer (Ubuntu Maverick):
status: Triaged → Invalid
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers