partman: needs to ignore entire /cdrom device

Bug #1822743 reported by Rik Shaw on 2019-04-02
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ubiquity (Ubuntu)

Bug Description

In the file /lib/partman/init.d/30parted the $path (which is a partition, NOT a device) is checked to see if it matches the beginning of $line (which contains the list of devices from the command "parted_devices"). Then, if a match is found, it is later checked if this is mounted to "/cdrom", and if so it is later "dropped" IF it is determined that the free space on the drive is less than 16777216.

There are a few problems with this approach, which I attempt to rectify in the attached patch:

1. Since parted_devices lists "/cdrom" to a device (/dev/sdb) not to a partition (/dev/sdb1) but $path is always a partition (/dev/sdb1, /dev/sdb2, etc.) then no match is ever made, and thus /cdrom is never checked to be excluded.

2. I suggest that at any time the device containing "/cdrom" should be excluded, not only if it has more freespace than 16777216. The reason is that newer releases of usb-creator-gtk and other tools such as mkusb will leave the remainder of the disk as "free", meaning that if you write the installer to a 32GB thumbdrive, it will then have enough freespace that makes partman think it is a good candidate for installation. But I don't think it likely that a user will ever want to install to the device containing the livecd (/cdrom) and if they do, then they can go to the "something else" advanced partitioning to specify so.

The real bug may be that on ubiquity's partition selection screen (NOT the advanced "something else") that it sees the MAIN hard drive (/dev/sda), and prompts to install side by side but then when clicking that option the installer USB (/dev/sdb) is selected as the target, it is partitioned, and confusion ensues.

Regardless, the above points are fixed with the attached patch so I hope you will consider including it. This was written against Ubuntu 18.04 ubiquity

I will add /var/log/syslog and /var/log/partman of the problem (using our remastered installer) to hopefully make it more clear.

Rik Shaw (rik-shaw) wrote :
Rik Shaw (rik-shaw) wrote :
Rik Shaw (rik-shaw) wrote :
Rik Shaw (rik-shaw) wrote :
Rik Shaw (rik-shaw) wrote :

The attachment "patch for 30parted" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers