Warns user about the fact that the installation medium is mounted

Bug #347916 reported by Matt Zimmerman on 2009-03-24
12
Affects Status Importance Assigned to Milestone
Release Notes for Ubuntu
Undecided
Colin Watson
partman-auto (Ubuntu)
High
Colin Watson
Jaunty
High
Colin Watson
partman-base (Ubuntu)
High
Colin Watson
Jaunty
High
Colin Watson
ubiquity (Ubuntu)
High
Colin Watson
Jaunty
High
Colin Watson

Bug Description

Binary package hint: ubiquity

During a standard UNR installation (typically done from a USB stick), ubiquity displays a dialog with a warning about the fact that /dev/sdb is mounted. This warning is unnecessary, because the fact that it is mounted is completely normal, and does not interfere with the user's ability to install the system

(unless, of course, they are trying to install it back onto the USB key, in which case we can't help them).

I think the dialog should be suppressed for at least this case.

Matt Zimmerman (mdz) on 2009-03-24
Changed in ubiquity (Ubuntu):
importance: Undecided → High
status: New → Triaged
Colin Watson (cjwatson) wrote :

Quoting my comments in bug 346589:

When /cdrom is mounted from a physically-read-only device or something that supports the CD capability ioctl (of course, a real CD-ROM will be both), it's already excluded. Therefore the remaining interesting cases are:

  * CD contents written to the entirety of a writeable medium and used as the installation medium (common case: usb-creator when told to use the whole disk)
  * CD contents written to one partition of a writeable medium and used as the installation medium (common case: recovery partition, such as that used by Dell)

In the former case, I agree that it is unnecessary and confusing to show a dialog. You can't use the installation medium as an installation target, and you're reasonably unlikely to want to.

However, the latter case is quite different. Consider the case where the CD contents have been written to a partition as a recovery image, which is then booted. Since the containing disk is considered busy in the kernel, we aren't going to be able to reread the partition table in the event that it is changed, which may cause problems; on the other hand, it may well be useful to use that disk as an installation target, particularly if the recovery image uses careful preseeding to ensure that it only uses existing partitions, so the disk should not simply be excluded. In the event that such an image is used without preseeding, it is more helpful to inform the user that the full range of partitioning operations are not available on this disk than it is to simply ignore the disk.

Perhaps an improved interface would be as follows:

  * If a filesystem that is not the installation medium is mounted from a disk that would otherwise be a candidate for partitioning, then issue a warning as we do today.
  * If the installation medium is mounted from a disk that would otherwise be a candidate for partitioning, and it occupies the whole disk (i.e. either it fills the entire device, or it occupies the only partition on the device and there is no more than a trivial amount (say, 16MB) of unpartitioned space available), then silently exclude that disk.
  * If the installation medium is mounted from a disk that would otherwise be a candidate for partitioning, and it does not occupy the whole disk as defined above, then the disk may be useful for partitioning but should be considered "locked": only changes that do not modify the partition table should be allowed.

partman-base/lib/base.sh:partman_lock_unit() is approximately the interface we'd want to use to implement the last point; this is used by partman-crypto and partman-lvm. However, it isn't quite perfect, because it locks all partitions on the device against *any* changes, not just ones that would modify the partition table. We should look into this in a bit more detail when addressing this bug.

Matt Zimmerman (mdz) on 2009-03-25
tags: added: ubuntu-unr
Colin Watson (cjwatson) wrote :

We'll need to release-note this for beta.

Colin Watson (cjwatson) wrote :

Errata text added for beta:

 * On desktop installations from USB disks, such as typical Ubuntu Netbook Remix installations, the installer displays a warning about the fact that the installation medium itself (often `/dev/sdb`) is mounted. This warning is unnecessary, because the fact that it is mounted is completely normal, and does not interfere with the user's ability to install the system to devices other than the USB disk itself. You should ignore this warning; note that in order to do so you will need to select "Go Back", due to the issue above. Bug:347916

I'll leave this bug just Fix Committed on ubuntu-release-notes for now just in case, but we really ought to get this fixed properly for final in which case the release notes task can be closed.

Changed in ubuntu-release-notes:
assignee: nobody → cjwatson
status: New → Fix Committed
Mathieu Marquer (slasher-fun) wrote :

Workaround : mount any other partition on your hard disk. You will be prompted for unmounting these partition (it will be done), and you won't hear again about /dev/sdb.

jtholmes (jtholmes) wrote :

Mathieu
The work around did not work for me but np

Another little twist to this problem is the following

I dont burn a CD unless I have some really weird installation problems
I use two different hard drives, one partition from each
sda5
sdb6

If I loop mount and copy ISO image to /dev/sda5 and then boot
/dev/sda5 and install OS on /dev/sdb6 then the MBR on /dev/sdb
is overwritten not the MBR on /dev/sda which is the boot device.
So, I never see the menu.lst file containing the boot changes for the New OS.
This is not a problem for me
as I know what to do to boot the New OS on /dev/sdb6 but using
two hard drives this way will cause some to have problems and
file a bug.

I say simplify the installer code to allow any partition to be used
but warn the user if they are about to overwrite their
1. USB stick
2. the hard drive partition containing the Installer
3. any partition that currently has a valid file system (win, ext...)
and also mod the installer to overwrite the MBR on /dev/sda regardless
of what sdX the OS was installed on, or give an advanced option
to allow MBR overwrite on any other hard drive.

Colin Watson (cjwatson) wrote :

I will not be considering grub's installation location as part of this bug. It is a very complex issue already more than adequately covered in other bugs; there is no need to hijack this bug for that purpose.

affects: ubiquity (Ubuntu Jaunty) → partman-base (Ubuntu Jaunty)
Colin Watson (cjwatson) on 2009-04-01
Changed in partman-base (Ubuntu Jaunty):
assignee: nobody → cjwatson
jtholmes (jtholmes) wrote :

I am in agreement with not considering grub's installation location as part of this bug.
Your first comment on 3/24/09 addresses the main issue.

Colin Watson (cjwatson) on 2009-04-01
Changed in partman-base (Ubuntu Jaunty):
status: Triaged → In Progress
Colin Watson (cjwatson) wrote :

partman-auto needs to be changed as well, to exclude devices containing the installation medium from automatic partitioning.

Changed in partman-auto (Ubuntu Jaunty):
importance: Undecided → High
status: New → In Progress
Colin Watson (cjwatson) wrote :

... and ubiquity needs to be adjusted to display a warning if the installation medium is mounted but only filling part of the disk, to reduce confusion if the user attempts to modify that disk in non-trivial ways.

Changed in ubiquity (Ubuntu Jaunty):
assignee: nobody → cjwatson
importance: Undecided → High
status: New → In Progress
Changed in partman-base (Ubuntu Jaunty):
status: In Progress → Fix Committed
Changed in partman-auto (Ubuntu Jaunty):
assignee: nobody → cjwatson
status: In Progress → Fix Committed
Colin Watson (cjwatson) on 2009-04-02
Changed in ubiquity (Ubuntu Jaunty):
status: In Progress → Fix Committed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package partman-auto - 84ubuntu2

---------------
partman-auto (84ubuntu2) jaunty; urgency=low

  * Exclude devices containing the installation medium from automatic
    partitioning (LP: #347916). Requires partman-base 129ubuntu5 for this
    change to work properly.

 -- Colin Watson <email address hidden> Thu, 02 Apr 2009 19:01:12 +0100

Changed in partman-auto (Ubuntu Jaunty):
status: Fix Committed → Fix Released
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package partman-base - 129ubuntu5

---------------
partman-base (129ubuntu5) jaunty; urgency=low

  * init.d/parted: Use more concise syntax for building up lists.
  * Rewrite handling of mounted partitions. If the only thing mounted on a
    disk is the installation medium and it uses more or less the whole disk,
    then silently exclude that disk (LP: #347916); if the installation
    medium is mounted but doesn't use the whole disk, issue a warning that
    partitioning may be difficult; if anything else is mounted, offer to
    unmount it.
  * Note that partman/filter_mounted preseeding is no longer supported, as
    its main use was to cope with the case of the installation medium being
    mounted and that's now handled explicitly. If you need to stop questions
    being asked, preseed partman/unmount_active and/or
    partman/installation_medium_mounted as appropriate.
  * I had to break the string freeze. Sorry.

 -- Colin Watson <email address hidden> Thu, 02 Apr 2009 18:59:02 +0100

Changed in partman-base (Ubuntu Jaunty):
status: Fix Committed → Fix Released
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubiquity - 1.12.2

---------------
ubiquity (1.12.2) jaunty; urgency=low

  [ Colin Watson ]
  * Add a comment to partman/commit.d/01unmount_busy to explain why this
    script is still here despite similar code in partman-base.
  * Using "Yes" and "No" buttons for the weak-password question turns out to
    be more confusing than I'd hoped. Instead, use "Continue" and "Choose
    another password" (breaking the string freeze, but at least for only one
    string).
  * Suppress unnecessary exception if find_in_os_prober fails.
  * GTK frontend:
    - Don't bother calling find_in_os_prober for partitions without real
      devices (e.g. free space).
    - Fix spacing on timezone page (LP: #336745).
  * Fix handling of "yes" response to partman/unmount_active.
  * Display a warning on the advanced partitioning screen if the
    installation medium is mounted but not filling the whole disk, so that
    the disk containing it is still offered for partitioning (LP: #347916).
  * On armel, DEB_HOST_ARCH=armel but DEB_HOST_ARCH_CPU=arm. Check
    DEB_HOST_ARCH rather than DEB_HOST_ARCH_CPU.
  * Use the full size of the underlying images for the timezone map if the
    screen is big enough.
  * Install chroot-setup.sh and in-target from debian-installer-utils
    (LP: #353941).
  * Move bootloader dependencies to recommendations, to make it easier to
    cope with grub and grub-pc conflicting (LP: #353273).
  * Automatic update of included source packages: partman-auto 84ubuntu2,
    partman-base 129ubuntu5, partman-ext3 56ubuntu1, user-setup
    1.23ubuntu16.

  [ Mario Limonciello ]
  * Make sure mythbuntu installs have users installed into the 'video'
    group. (LP: #351773)

 -- Colin Watson <email address hidden> Thu, 02 Apr 2009 23:12:54 +0100

Changed in ubiquity (Ubuntu Jaunty):
status: Fix Committed → Fix Released
Steve Langasek (vorlon) wrote :

packages are fixed, so no need to document in the release notes.

Changed in ubuntu-release-notes:
status: Fix Committed → Invalid
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers