manual partitioner: /dev/sdb (installation media) selected by default as device for boot loader installation

Bug #987418 reported by Jean-Baptiste Lallement on 2012-04-23
98
This bug affects 13 people
Affects Status Importance Assigned to Milestone
ubiquity (Ubuntu)
High
Colin Watson
Precise
High
Colin Watson
Quantal
High
Colin Watson

Bug Description

[Impact] The selected boot device in ubiquity's manual partitioner is sometimes wrong.
[Test Case] See comment #11 for a VM setup that reproduces this bug.
[Regression Potential] This is hairy code that has failed a number of times in the past, so it's worth checking that a few other setups still behave reasonably. It probably still won't be right in all cases (see e.g. bug 1066173 which I think precise may suffer from); this specifically addresses the case when installing from removable USB media onto a fixed disk, and ensuring that the boot loader defaults to the fixed disk.

== If you are affected by this bug ==

You can use Quantal beta or later images.
You can use Precise post 12.04.1 daily images.

Both are available from cdimages.ubuntu.com

=====================================

Precise Desktop 20120423

During a side by side installation with an existing Ubuntu Precise on the system, with the manual partitioner from a usb stick, the selected device for boot loader installation was set to /dev/sdb by default (installation media)
If the user doesn't pay attention to the selected value, the end of the installation will fail.

When grub fails to install on /dev/sdb, it shows a dialog to select another device. I choose /dev/sda, it installs without a failure but I'm dropped to a grub prompt on reboot.

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: ubiquity 2.10.16
ProcVersionSignature: Ubuntu 3.2.0-23.36-generic 3.2.14
Uname: Linux 3.2.0-23-generic x86_64
ApportVersion: 2.0.1-0ubuntu5
Architecture: amd64
CasperVersion: 1.315
Date: Mon Apr 23 19:01:48 2012
InstallCmdLine: file=/cdrom/preseed/ubuntu.seed boot=casper initrd=/casper/initrd.lz quiet splash -- maybe-ubiquity
LiveMediaBuild: Ubuntu 12.04 LTS "Precise Pangolin" - Release amd64+mac (20120423)
ProcEnviron:
 LANGUAGE=fr_FR.UTF-8
 TERM=unknown
 PATH=(custom, no user)
 LANG=fr_FR.UTF-8
 SHELL=/bin/bash
SourcePackage: grub-installer
UpgradeStatus: No upgrade log present (probably fresh install)

Jean-Baptiste Lallement (jibel) wrote :
description: updated
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/987418

tags: added: iso-testing
summary: - precise amd64+mac side by side install: grub installs on /dev/sdb
- (installation media)
+ precise amd64+mac side by side install: grub tries to install on
+ /dev/sdb (installation media)
summary: - precise amd64+mac side by side install: grub tries to install on
- /dev/sdb (installation media)
+ manual partitioner: /dev/sdb (installation media) select by default as
+ device for boot loader installation
description: updated
summary: - manual partitioner: /dev/sdb (installation media) select by default as
+ manual partitioner: /dev/sdb (installation media) selected by default as
device for boot loader installation
affects: grub-installer (Ubuntu) → ubiquity (Ubuntu)

Exception during installation:
Apr 23 17:01:43 ubuntu plugininstall.py: Traceback (most recent call last):
Apr 23 17:01:43 ubuntu plugininstall.py: File "/usr/share/ubiquity/plugininstall.py", line 1735, in <module>
Apr 23 17:01:43 ubuntu plugininstall.py: install.run()
Apr 23 17:01:43 ubuntu plugininstall.py: File "/usr/share/ubiquity/plugininstall.py", line 55, in wrapper
Apr 23 17:01:43 ubuntu plugininstall.py: func(self)
Apr 23 17:01:43 ubuntu plugininstall.py: File "/usr/share/ubiquity/plugininstall.py", line 204, in run
Apr 23 17:01:43 ubuntu plugininstall.py: self.configure_bootloader()
Apr 23 17:01:43 ubuntu plugininstall.py: File "/usr/share/ubiquity/plugininstall.py", line 1002, in configure_bootloader
Apr 23 17:01:43 ubuntu plugininstall.py: old_bootdev = self.db.get('grub-installer/bootdev')
Apr 23 17:01:43 ubuntu plugininstall.py: File "/usr/lib/python2.7/dist-packages/debconf.py", line 60, in <lambda>
Apr 23 17:01:43 ubuntu plugininstall.py: lambda *args, **kw: self.command(command, *args, **kw))
Apr 23 17:01:43 ubuntu plugininstall.py: File "/usr/lib/python2.7/dist-packages/debconf.py", line 65, in command
Apr 23 17:01:43 ubuntu plugininstall.py: self.write.flush()
Apr 23 17:01:43 ubuntu plugininstall.py: IOError: [Errno 32] Broken pipe
Apr 23 17:01:43 ubuntu plugininstall.py:

tags: added: installer-crash
tags: added: rls-mgr-p-tracking
description: updated
Brian Murray (brian-murray) wrote :

We'll track this as two separate bugs - one for choosing where to install the boot loader and the other for the boot failue. This bug will be for the former.

Changed in ubiquity (Ubuntu):
importance: Undecided → Medium
tags: added: ubi-partman
Colin Watson (cjwatson) on 2012-04-26
Changed in ubiquity (Ubuntu):
status: New → Triaged
Colin Watson (cjwatson) on 2012-04-26
Changed in ubiquity (Ubuntu Quantal):
status: New → Triaged
importance: Undecided → Medium
milestone: none → quantal-alpha-1
assignee: nobody → Ubuntu Installer Team (ubuntu-installer)
Changed in ubiquity (Ubuntu Quantal):
milestone: quantal-alpha-1 → quantal-alpha-2
Erick Brunzell (lbsolost) wrote :

This also effects Lubuntu live i386 20120627.

Changed in ubiquity (Ubuntu Quantal):
milestone: quantal-alpha-2 → quantal-alpha-3
Changed in ubiquity (Ubuntu Quantal):
importance: Medium → High
Carla Sella (carla-sella) wrote :

It also affects Ubuntu Quantal Alpha3.

Steve Langasek (vorlon) wrote :

Stéphane, this bug seems to have slipped a couple times now. Can you make sure this gets fixed for beta-1?

Changed in ubiquity (Ubuntu Quantal):
assignee: Ubuntu Installer Team (ubuntu-installer) → Stéphane Graber (stgraber)
milestone: quantal-alpha-3 → ubuntu-12.10-beta-1
Erick Brunzell (lbsolost) wrote :

@ Steve Langasek and Stéphane Graber,

ATM I'm much more concerned about 12.04.1. In order to verify that this is still a problem I created a Precise i386 20120810.1 disc and tried some installation cases on two totally different sets of hardware. This does still exist in the current Precise daily images!

Just as one example my start point was:

ubuntu@ubuntu:~$ sudo parted -l
Model: ATA WDC WD1600BEVS-2 (scsi)
Disk /dev/sda: 160GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number Start End Size Type File system Flags
 1 32.3kB 41.9GB 41.9GB primary ntfs boot

Model: ATA Maxtor 33073U4 (scsi)
Disk /dev/sdb: 30.7GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number Start End Size Type File system Flags
 1 1049kB 29.7GB 29.7GB primary ext4
 2 29.7GB 30.7GB 1003MB extended
 5 29.7GB 30.7GB 1003MB logical linux-swap(v1)

Warning: Unable to open /dev/sr0 read-write (Read-only file system). /dev/sr0
has been opened read-only.
Error: Can't have a partition outside the disk!

But the manual partitioner defaults to /dev/sdb as shown in the attached screenshot.

I'd think we really do need to fix this in 12.04.1.

Erick Brunzell (lbsolost) wrote :

I repeated this Precise test with the internal /dev/sdb disconnected but with a blank 4GB flash drive plugged in which then became /dev/sdb and I get the same result. I'd imagine that if someone were using a live USB and didn't pay attention that they could both end up with a borked grub on the machine and a borked syslinux on the USB drive :^(

I'm truly concerned about 12.04.1, I'd think we should be laser focused on fixing the bugs that slipped into Precise.

Changed in ubiquity (Ubuntu Precise):
status: New → Triaged
importance: Undecided → High
milestone: none → ubuntu-12.04.2

I've run into this issue as well when installing Precise on my brother's and cousin's machines, with both the manual partitioner and when simply picking the automatic "side-by-side" option from the installer. The workaround was to always use the manual partitioner to switch the default device for bootloader installation to /dev/sda, after which the installation proceeds successfully.

Colin Watson (cjwatson) on 2012-09-04
Changed in ubiquity (Ubuntu Quantal):
assignee: Stéphane Graber (stgraber) → Colin Watson (cjwatson)
Colin Watson (cjwatson) wrote :

I've finally managed to reproduce this (with the aid of some fairly arcane kvm options: -hda t.img -usb -drive file=precise-desktop-i386.iso,if=none,id=b,boot=on -device usb-storage,drive=b). Embarrassingly, it's a case of missing parentheses.

Colin Watson (cjwatson) on 2012-09-04
Changed in ubiquity (Ubuntu Quantal):
status: Triaged → Fix Committed
Changed in ubiquity (Ubuntu Precise):
assignee: nobody → Colin Watson (cjwatson)
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubiquity - 2.11.29

---------------
ubiquity (2.11.29) quantal; urgency=low

  [ Colin Watson ]
  * Fix missing parentheses that caused removable installation media
    sometimes to be selected as the default GRUB device (LP: #987418).
  * Update translations from Launchpad (LP: #1045695).

  [ Dmitrijs Ledkovs ]
  * Automatic update of included source packages: partman-auto-lvm
    45ubuntu2. (LP: #1045812)
 -- Dmitrijs Ledkovs <email address hidden> Tue, 04 Sep 2012 18:48:04 +0100

Changed in ubiquity (Ubuntu Quantal):
status: Fix Committed → Fix Released
Colin Watson (cjwatson) on 2012-09-04
Changed in ubiquity (Ubuntu Precise):
status: Triaged → Fix Committed
description: updated
Changed in ubiquity (Ubuntu Precise):
status: Fix Committed → In Progress
Colin Watson (cjwatson) on 2012-11-21
description: updated

Hello Jean-Baptiste, or anyone else affected,

Accepted ubiquity into precise-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/ubiquity/2.10.21 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please change the bug tag from verification-needed to verification-done. If it does not, change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in ubiquity (Ubuntu Precise):
status: In Progress → Fix Committed
tags: added: verification-needed
Adam Conrad (adconrad) wrote :

Hello Jean-Baptiste, or anyone else affected,

Accepted ubiquity into precise-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/ubiquity/2.10.22 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please change the bug tag from verification-needed to verification-done. If it does not, change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

tags: added: verification-done
removed: verification-needed
Erick Brunzell (lbsolost) wrote :

I changed that to verification-done based on testing Ubuntu 12.04.2 LTS "Precise Pangolin" - Release i386 (20121130) which I grabbed from the QA tracker. If other flavors or architectures require testing please change that back to verification-needed with a list of flavors and/or architectures that require testing.

That image does now default to selecting /dev/sda which is certainly more appropriate and less likely to place grub on an external device.

Download full text (3.3 KiB)

Thank you

Sayth

On Saturday, December 1, 2012, Erick Brunzell wrote:

> I changed that to verification-done based on testing Ubuntu 12.04.2 LTS
> "Precise Pangolin" - Release i386 (20121130) which I grabbed from the QA
> tracker. If other flavors or architectures require testing please change
> that back to verification-needed with a list of flavors and/or
> architectures that require testing.
>
> That image does now default to selecting /dev/sda which is certainly
> more appropriate and less likely to place grub on an external device.
>
> --
> You received this bug notification because you are subscribed to a
> duplicate bug report (1065969).
> https://bugs.launchpad.net/bugs/987418
>
> Title:
> manual partitioner: /dev/sdb (installation media) selected by default
> as device for boot loader installation
>
> Status in “ubiquity” package in Ubuntu:
> Fix Released
> Status in “ubiquity” source package in Precise:
> Fix Committed
> Status in “ubiquity” source package in Quantal:
> Fix Released
>
> Bug description:
> [Impact] The selected boot device in ubiquity's manual partitioner is
> sometimes wrong.
> [Test Case] See comment #11 for a VM setup that reproduces this bug.
> [Regression Potential] This is hairy code that has failed a number of
> times in the past, so it's worth checking that a few other setups still
> behave reasonably. It probably still won't be right in all cases (see e.g.
> bug 1066173 which I think precise may suffer from); this specifically
> addresses the case when installing from removable USB media onto a fixed
> disk, and ensuring that the boot loader defaults to the fixed disk.
>
> == If you are affected by this bug ==
>
> You can use Quantal beta or later images.
> You can use Precise post 12.04.1 daily images.
>
> Both are available from cdimages.ubuntu.com
>
> =====================================
>
> Precise Desktop 20120423
>
> During a side by side installation with an existing Ubuntu Precise on
> the system, with the manual partitioner from a usb stick, the selected
> device for boot loader installation was set to /dev/sdb by default
> (installation media)
> If the user doesn't pay attention to the selected value, the end of the
> installation will fail.
>
> When grub fails to install on /dev/sdb, it shows a dialog to select
> another device. I choose /dev/sda, it installs without a failure but
> I'm dropped to a grub prompt on reboot.
>
> ProblemType: Bug
> DistroRelease: Ubuntu 12.04
> Package: ubiquity 2.10.16
> ProcVersionSignature: Ubuntu 3.2.0-23.36-generic 3.2.14
> Uname: Linux 3.2.0-23-generic x86_64
> ApportVersion: 2.0.1-0ubuntu5
> Architecture: amd64
> CasperVersion: 1.315
> Date: Mon Apr 23 19:01:48 2012
> InstallCmdLine: file=/cdrom/preseed/ubuntu.seed boot=casper
> initrd=/casper/initrd.lz quiet splash -- maybe-ubiquity
> LiveMediaBuild: Ubuntu 12.04 LTS "Precise Pangolin" - Release amd64+mac
> (20120423)
> ProcEnviron:
> LANGUAGE=fr_FR.UTF-8
> TERM=unknown
> PATH=(custom, no user)
> LANG=fr_FR.UTF-8
> SHELL=/bin/bash
> SourcePackage: grub-installer
> UpgradeStatus: No upgrade log present (probably fresh install)
>...

Read more...

The verification of this Stable Release Update has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regresssions.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubiquity - 2.10.23

---------------
ubiquity (2.10.23) precise-proposed; urgency=low

  * Honour base-installer/kernel/altmeta when deciding which kernels to
    install or keep installed.

ubiquity (2.10.22) precise-proposed; urgency=low

  [ Dmitrijs Ledkovs ]
  * Make user-setup-encrypted-swap wait until partitioning has finished
    before attempting to adjust /target/etc/fstab. (LP: #1024343)
    (LP: #1068178)

  [ Colin Watson ]
  * Don't remove kernel headers just because we're removing signed kernel
    images of the same flavour (LP: #1070427).

ubiquity (2.10.21) precise-proposed; urgency=low

  [ Colin Watson ]
  * Fix missing parentheses that caused removable installation media
    sometimes to be selected as the default GRUB device (LP: #987418).
  * Support UEFI Secure Boot (LP: #1075181):
    - Try to install a signed kernel if base-installer asks for one, and
      don't leave signed kernels installed if it doesn't.
    - If the SecureBoot EFI variable is set, then ensure that
      grub-efi-amd64-signed and shim-signed remain installed.
    - Copy the signed kernel from /cdrom if it is not in the squashfs. If
      there is a signed kernel there but no unsigned one, then use sbattach
      to remove the signature and construct the unsigned kernel on the fly.
  * Automatic update of included source packages: base-installer
    1.122ubuntu7.2, grub-installer 1.68ubuntu5.1.

  [ Mario Limonciello ]
  * Don't let oem-config crash from an invalid server return on the timezone
    page. (LP: #887879)

  [ Dmitrijs Ledkovs ]
  * Do not preseed grub-install, if we are not proceeding to install. This
    should fix ValueError, I/O operation on closed file (LP: #1027648)
    (LP: #792652)
  * Prevent progress label to expand & shrink the window (LP: #1046241)

  [ Jonathan Riddell ]
  * Change from a KApplication to a QApplication to avoid using DBus, DBus
    as needed by KApplication no longer works with our multiple user changes
    LP: #1055967
 -- Colin Watson <email address hidden> Thu, 06 Dec 2012 17:20:32 +0000

Changed in ubiquity (Ubuntu Precise):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers