partman-auto 134ubuntu11 prevents installation from recovery partition

Bug #1847944 reported by Mario Limonciello on 2019-10-14
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
partman-auto (Ubuntu)
Critical
Dimitri John Ledkov
Eoan
Critical
Dimitri John Ledkov
partman-base (Ubuntu)
Undecided
Unassigned
Eoan
Undecided
Unassigned

Bug Description

Partman-auto 134ubuntu11 added a new check to try to resolve bug 1845571 but in doing so, broke OEM installation from hard disk.

OEM installation from hard disk will place the ubuntu ISO image into a recovery partition and boot from that to install. It is preseeded such that the free space will use an expert recipe to install into.

Reverting changes from 134ubuntu11 back to 134ubuntu10 fixes OEM installation again.

Changed in partman-auto (Ubuntu):
importance: Undecided → Critical
status: New → Triaged
Changed in partman-auto (Ubuntu Eoan):
assignee: nobody → Dimitri John Ledkov (xnox)
tags: added: regression-release
Dimitri John Ledkov (xnox) wrote :

In Disco:
- .iso from a CD-ROM or USB stick is mounted as whole block device, i.e. /dev/sr0 /dev/sda
- .iso from a partition on disk (i.e. recovery partition) is mounted as a partition, i.e. /dev/sda1
- in partman-auto black-list is set on whole block device mounts, i.e. /dev/sr0 /dev/sda

In Eoan:
- .iso from a CD-ROM or USB stick is mounted as a partition, i.e. /dev/sr01 (?!) /dev/sda1
- .iso from a partition on disk (i.e. recovery partition) is mounted as a partition, i.e. /dev/sda1
- in partman-auto blacklist is set on either whole block device or partition mounts, i.e. /dev/sda /dev/sda1 etc.

So, that's where we are at.

Dimitri John Ledkov (xnox) wrote :

So,

I think we should be sensitive to whether or not the device is RO or not. I.e. if one uses RO actual CDROM it should always be skipped.

Also we should be sensitive to disk size and not offer tiny devices for install.

And ideally, somehow, we shouldn't offer devices with /cdrom mount for "whole disk" installs but do offer them for "use-free install"

Dimitri John Ledkov (xnox) wrote :

# If there's only one disk, then preseeding partman-auto/disk is
# unnecessary, and sometimes inconvenient in heterogeneous environments
if [ "$method" ] && [ -z "$disks" ]; then
        DEVS="$(get_auto_disks)"
        if [ "$(echo "$DEVS" | wc -l)" -eq 1 ]; then
                disks="$(cat "${DEVS%$TAB*}"/device)"
        fi
fi

I wonder if disks is preseeded or not.

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/1847944

tags: added: iso-testing
Dimitri John Ledkov (xnox) wrote :
tags: added: patch
tags: added: id-5da41f29b1518a547641eae0
Dimitri John Ledkov (xnox) wrote :
Łukasz Zemczak (sil2100) wrote :

Looks good, let's just make sure to test it. My only nitpick was not break'ing after we find the partition, but as we discussed it anyway doesn't matter, since in most cases it will only expand to one thing.

Dimitri John Ledkov (xnox) wrote :

Staging a PPA at

https://launchpad.net/~ci-train-ppa-service/+archive/ubuntu/3821/+packages

It would be nice if one could boot the recovery, upgrade ubiquity, from that ppa, and see if the autoinstall stuff still works correctly.

Dimitri John Ledkov (xnox) wrote :

And I assume that one has called:

echo ubiquity partman/filter_mounted boolean false | sudo debconf-set-selections

or preseeded that key in any other supported way.

Mario Limonciello (superm1) wrote :

>I wonder if disks is preseeded or not.

Yes, a script detects the disk to install to, but it essentially ended up as:
d-i partman-auto/disk string /dev/sda

>It would be nice if one could boot the recovery, upgrade ubiquity, from that ppa, and see if the autoinstall stuff still works correctly.

This will take a little effort to get slipstreamed into the test environment. I'll let you know.

>And I assume that one has called:
>echo ubiquity partman/filter_mounted boolean false | sudo debconf-set-selections
> or preseeded that key in any other supported way.

Yes:
d-i partman/filter_mounted boolean false

has been preseeded.

Mario Limonciello (superm1) wrote :

> It would be nice if one could boot the recovery, upgrade ubiquity, from that ppa, and see if the autoinstall stuff still works correctly.

Yes confirmed that upgrading to ubiquity 19.10.20 from that PPA before running installation works correctly now.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package partman-auto - 134ubuntu12

---------------
partman-auto (134ubuntu12) eoan; urgency=medium

  * lib/auto-shared.sh: drop /cdrom check completely, and instead rely on
    partman-base/init.d/parted to correctly detect installation_medium
    devices, even when parted fails to parse the block device partition
    table. LP: #1847944

 -- Dimitri John Ledkov <email address hidden> Mon, 14 Oct 2019 12:25:11 +0100

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

This bug was fixed in the package partman-base - 206ubuntu6

---------------
partman-base (206ubuntu6) eoan; urgency=medium

  * init.d/parted: even if parsing partitions fails, ensure that the block
    device that has /cdrom mounted is marked as
    installation_medium. Unless of course partman/filter_mounted is
    preseeded to false. Currently our isos are built such that partman
    fails to detect partititions, but blkid/sfdisk/kernel can. LP:
    #1847944

 -- Dimitri John Ledkov <email address hidden> Mon, 14 Oct 2019 12:26:06 +0100

Changed in partman-base (Ubuntu Eoan):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers