Merge ~juliank/ubiquity:ignore-small-esps into ubiquity:master

Proposed by Julian Andres Klode
Status: Merged
Merged at revision: f89454e5b5f0ed32d8f5ef6b82404ca4152c6cfd
Proposed branch: ~juliank/ubiquity:ignore-small-esps
Merge into: ubiquity:master
Diff against target: 38 lines (+11/-1)
2 files modified
d-i/source/partman-efi/init.d/efi (+4/-1)
debian/changelog (+7/-0)
Reviewer Review Type Date Requested Status
Dimitri John Ledkov Approve
Ubuntu Release Team Pending
Review via email: mp+401370@code.launchpad.net

Description of the change

Only auto-configure ESP larger than 50 MB (workaround for LP 1924823)

Workaround for ESP on install medium (5 MB) being configured as the
system's ESP - require a minimum size of 50 MB. We should fix this
properly post-hirsute by checking that the ESP is not on the same disk
as the install medium.

To post a comment you must log in.
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

"We should fix this properly post-hirsute by checking that the ESP is not on the same disk
as the install medium."

That's not quite right, because we do support "in-place" install where we boot installer from the disk that we install things onto, and in such scenarios we do reuse the ESP.

I would be more interested in a check that is "reuse ESP that is on the same disk as /target/boot", otherwise create new ESP.

Revision history for this message
Dimitri John Ledkov (xnox) :
review: Approve
Revision history for this message
Steve Langasek (vorlon) wrote :

On Mon, Apr 19, 2021 at 10:56:56AM -0000, Dimitri John Ledkov wrote:

> That's not quite right, because we do support "in-place" install where we
> boot installer from the disk that we install things onto, and in such
> scenarios we do reuse the ESP.

In what context does this occur? Are you referring to ubiquity use on a
"recovery partition"?

Mostly, in-place installs with ubiquity are the result of bugs and the cause
of install failures.

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

On Tue, Apr 20, 2021 at 12:09 AM Steve Langasek
<email address hidden> wrote:
>
> On Mon, Apr 19, 2021 at 10:56:56AM -0000, Dimitri John Ledkov wrote:
>
> > That's not quite right, because we do support "in-place" install where we
> > boot installer from the disk that we install things onto, and in such
> > scenarios we do reuse the ESP.
>
> In what context does this occur? Are you referring to ubiquity use on a
> "recovery partition"?

I know of two scenarios when this is used.

1) is dell-recovery / ubuntu-recovery aka "reinstall from recovery"
that you mention

2) is factory provisioning. At some point in time, preinstalled images
were blasted onto the disk, booted to automatically install from the
internal drive to create preinstalled machine. If i recall correctly
this method also at different points in time used "to=ram" or kept the
boot partition and convert into a recovery one.

>
> Mostly, in-place installs with ubiquity are the result of bugs and the cause
> of install failures.

In general yes.

--
Regards,

Dimitri.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/d-i/source/partman-efi/init.d/efi b/d-i/source/partman-efi/init.d/efi
2index fe36192..3c6b516 100755
3--- a/d-i/source/partman-efi/init.d/efi
4+++ b/d-i/source/partman-efi/init.d/efi
5@@ -10,6 +10,7 @@
6
7 gpt_efi_type=c12a7328-f81f-11d2-ba4b-00a0c93ec93b
8 msdos_efi_type=0xef
9+esp_minimum_size=$((50 * 1024 * 1024))
10
11 NUM_ESP=0
12 NUM_NO=0
13@@ -25,7 +26,9 @@ for dev in /var/lib/partman/devices/*; do
14 partitions=
15 open_dialog PARTITIONS
16 while { read_line num id size type fs path name; [ "$id" ]; }; do
17- if [ "$fs" = fat16 ]; then
18+ if [ $size -lt $esp_minimum_size ]; then
19+ :
20+ elif [ "$fs" = fat16 ]; then
21 partitions="$partitions $id"
22 elif [ "$fs" = fat32 ] && echo "$name" |
23 grep -i "^EFI System Partition" >/dev/null; then
24diff --git a/debian/changelog b/debian/changelog
25index 2c1de23..b77fa11 100644
26--- a/debian/changelog
27+++ b/debian/changelog
28@@ -1,3 +1,10 @@
29+ubiquity (21.04.18) hirsute; urgency=medium
30+
31+ * Only auto-configure ESP larger than 50 MiB - this works around LP 1924823,
32+ where the 5 MB ESP on the install medium was configured as /boot/efi.
33+
34+ -- Julian Andres Klode <juliank@ubuntu.com> Mon, 19 Apr 2021 13:01:53 +0200
35+
36 ubiquity (21.04.17) hirsute; urgency=medium
37
38 [ Rik Mills ]

Subscribers

People subscribed via source and target branches