partman-efi should follow partman-auto/disk to reuse the ESP.

Bug #1512589 reported by Shih-Yuan Lee on 2015-11-03
18
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OEM Priority Project
High
Unassigned
Trusty
High
Unassigned
partman-efi (Debian)
New
Unknown
partman-efi (Ubuntu)
Medium
Mathieu Trudel-Lapierre
Nominated for Xenial by Shih-Yuan Lee
Trusty
Medium
Mathieu Trudel-Lapierre
Wily
Medium
Mathieu Trudel-Lapierre

Bug Description

[Impact]

 * It may cause the installation failed when the users use https://wiki.debian.org/DebianInstaller/Preseed under some conditions.

[Test Case]

 * Prepare a computer with UEFI secure boot enabled that has two system storage drives, such as /dev/nvme0n1 and /dev/sda.
 * Install the general Ubuntu system on /dev/nvme0n1 first.
 * Use debian-installer netboot images with the following d-i preseeds to install another Ubuntu on /dev/sda.
 * During the installation on /dev/sda, it will use /dev/nvme0n1p1 instead of /dev/sda1 as the EFI System Partition.

[Regression Potential]

 * None

[Other Info]

 * This issue is found in Ubuntu OEM projects that used dell-recovery/ubuntu-recovery on the platforms that have more than one system storage drive.

----
   Current implementation in partman-efi/fstab.d/efi is to find the
   first EFI System Partition (abbr. ESP) to use when we provided
   some kind of partman-auto/expert_recipe.

   However if the system has more than two ESPs, partman-efi will still
   use the first ESP it found even when we specify what we want in
   partman-auto/disk.

   For example, when the system has /dev/nvme0n1 and /dev/sda and we
   specified partman-auto/disk and partman-auto/expert_recipe as the following.

       d-i partman-auto/disk string /dev/sda
       d-i partman-auto/expert_recipe string \
                                             \
         ubuntu :: \
             100 150 200 free \
             $iflabel{ gpt } \
             $reusemethod{ } \
             method{ efi } \
             format{ } . \
                                             \
             500 10000 4000000 ext4 \
             $primary{ } \
             method{ format } \
             format{ } \
             use_filesystem{ } \
             filesystem{ ext4 } \
             mountpoint{ / } . \
                                             \
             105% 150% 200% linux-swap \
             method{ swap } \
             format{ } \
             .

   If there is already another Linux system installed in /dev/nvme0n1,
   partman-efi will reuse /dev/nvme0n1p1 and mount it at
   /target/boot/efi instead of reusing /dev/sda1 that we specify in
   partman-auto/disk.

   This should not be the behavior that we expected it will be.

Related branches

description: updated
Changed in partman-efi:
status: Unknown → New
Sebastien Bacher (seb128) wrote :

(unsubscribing sponsors from the bug, the merge requests are already in the sponsoring queue)

affects: partman-efi → ubuntu
no longer affects: ubuntu
Changed in partman-efi (Ubuntu):
importance: Undecided → Medium
Changed in debian-installer (Ubuntu):
importance: Undecided → Medium
Changed in partman-efi (Debian):
status: Unknown → New
Shih-Yuan Lee (fourdollars) wrote :

The patch for xenial.

tags: added: patch
Changed in partman-efi (Ubuntu Trusty):
importance: Undecided → Medium
Changed in partman-efi (Ubuntu Wily):
importance: Undecided → Medium
Changed in debian-installer (Ubuntu Trusty):
importance: Undecided → Medium
Changed in debian-installer (Ubuntu Wily):
importance: Undecided → Medium
Changed in partman-efi (Ubuntu):
status: New → Triaged
Changed in partman-efi (Ubuntu Wily):
status: New → Triaged
Changed in partman-efi (Ubuntu Trusty):
status: New → Triaged

Thanks. At first glance this looks correct (though I'll give it a spin here before sponsoring).

However, we don't ship partman-efi in d-i images, so this doesn't need to affect debian-installer -- marking those tasks as Invalid.

Changed in debian-installer (Ubuntu):
status: New → Invalid
Changed in debian-installer (Ubuntu Trusty):
status: New → Invalid
Changed in debian-installer (Ubuntu Wily):
status: New → Invalid
Changed in partman-efi (Ubuntu):
assignee: nobody → Mathieu Trudel-Lapierre (mathieu-tl)
status: Triaged → In Progress

This will also require an SRU / upload of ubiquity to apply for the graphical installer. We'll do the update when the package is available in the archive (I have some other changes in progress for ubiquity, too!)

Thanks!

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package partman-efi - 62ubuntu3

---------------
partman-efi (62ubuntu3) xenial; urgency=medium

  * Follow partman-auto/disk to reuse the ESP. (LP: #1512589)

 -- Shih-Yuan Lee (FourDollars) <email address hidden> Tue, 03 Nov 2015 14:51:37 +0800

Changed in partman-efi (Ubuntu):
status: In Progress → Fix Released
no longer affects: debian-installer (Ubuntu Wily)
no longer affects: debian-installer (Ubuntu Trusty)
no longer affects: debian-installer (Ubuntu)
Changed in partman-efi (Ubuntu Trusty):
status: Triaged → In Progress
Changed in partman-efi (Ubuntu Wily):
status: Triaged → In Progress
Changed in partman-efi (Ubuntu Trusty):
assignee: nobody → Mathieu Trudel-Lapierre (mathieu-tl)
Changed in partman-efi (Ubuntu Wily):
assignee: nobody → Mathieu Trudel-Lapierre (mathieu-tl)

I'm uploading the partman-efi SRU to wily/trusty now, for the SRU team to review.

Ara Pulido (ara) on 2016-01-18
Changed in oem-priority:
importance: Undecided → High
status: New → Triaged

Hello Shih-Yuan, or anyone else affected,

Accepted partman-efi into trusty-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/partman-efi/25ubuntu6.14.04.2 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 add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and 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 partman-efi (Ubuntu Trusty):
status: In Progress → Fix Committed
tags: added: verification-needed
Shih-Yuan Lee (fourdollars) wrote :

I have verified https://launchpad.net/ubuntu/+source/partman-efi/25ubuntu6.14.04.2 and it does fix this issue.
Please also upgrade partman-efi in ubiquity for trusty.

tags: added: verification-done
removed: verification-needed
Chris J Arges (arges) wrote :

Hello Shih-Yuan, or anyone else affected,

Accepted partman-efi into wily-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/partman-efi/62ubuntu2.1 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 add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and 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 partman-efi (Ubuntu Wily):
status: In Progress → Fix Committed
tags: removed: verification-done
tags: added: verification-needed
Shih-Yuan Lee (fourdollars) wrote :

I have verified https://launchpad.net/ubuntu/+source/partman-efi/62ubuntu2.1 and it does fix this issue.

tags: added: verification-done
removed: verification-needed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package partman-efi - 25ubuntu6.14.04.2

---------------
partman-efi (25ubuntu6.14.04.2) trusty; urgency=medium

  * Follow partman-auto/disk to reuse the ESP. (LP: #1512589)

 -- Shih-Yuan Lee (FourDollars) <email address hidden> Tue, 03 Nov 2015 14:47:58 +0800

Changed in partman-efi (Ubuntu Trusty):
status: Fix Committed → Fix Released

The verification of the Stable Release Update for partman-efi 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 regressions.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package partman-efi - 62ubuntu2.1

---------------
partman-efi (62ubuntu2.1) wily; urgency=medium

  * Follow partman-auto/disk to reuse the ESP. (LP: #1512589)

 -- Shih-Yuan Lee (FourDollars) <email address hidden> Tue, 03 Nov 2015 14:51:37 +0800

Changed in partman-efi (Ubuntu Wily):
status: Fix Committed → Fix Released
Changed in oem-priority:
status: Triaged → Fix Released
no longer affects: ubiquity (Ubuntu)
Shih-Yuan Lee (fourdollars) wrote :

In xenial, 71ubuntu1 overwrote my patch in 62ubuntu3.

Changed in partman-efi (Ubuntu):
status: Fix Released → New
Changed in oem-priority:
status: Fix Released → New
Shih-Yuan Lee (fourdollars) wrote :

Sorry, that's my fault.
partman-efi 71ubuntu1 didn't overwrite my patch in 62ubuntu3.
It just didn't mention this in "Remaining changes".

Changed in partman-efi (Ubuntu):
status: New → Fix Released
Changed in oem-priority:
status: New → Fix Released
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

Remote bug watches

Bug watches keep track of this bug in other bug trackers.