Installation enters wrong UUID for EFI partition in fstab when installing Ubuntu with "ubiquity -b"

Bug #1992297 reported by Daan van Loon
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ubiquity (Ubuntu)
Expired
Medium
Unassigned

Bug Description

Ubuntu wouldn't boot after installing it on my SSD using the "ubiquity -b" command, and instead comes with the recovery menu(terminal).
the reason it didn't boot was because ubiquity assigned the wrong UUID for my EFI partition in fstab.
manually changing the UUID to the correct one fixed the system and it works normally now.
the UUID of the EFI partition did not change relative to the UUID it had before installing Ubuntu, I confirmed this by checking what UUID that partition had in a fstab file of a other distro installation on that SSD using the same EFI partition which I had used before installing ubuntu and didn't change after installing ubuntu.

Basic system information:
1:Dell latitude E6430(this mashine) with old nvidia gpu.
2:lenovo Ideapad 5 14ARE05(other mashine) ryzen 5 16gb ram
3: sharkoon QuickPort XT Duo Clone(device for connecting SSD or HDD to a computer over usb)
4: in device 2 there was a hardware encrypted samsung SSD build in to it(the default one 512gb) this one had the default software and os from lenovo on it(windows) and hadn't been altered since for school and "work" they require one to use that, I didn't select it in the installer and it was hardware encrypted, but perhaps it being there might be part of the bug/cause.

the SSD in question is a "PNY CS900 1TB SSD"
----EAN =751492629964
----Vendorcode=SSD7CS900-1TB-RB
----capacity=1TB
----it has 4 partitions
-first partition is the 300mb EFI partition<--(this is the partition which had the wrong UUID in FSTAB after installation)
-second partition is 100gb ext4 to which a linux mint distro with nvidia drivers is installed
-third partition is 100gb ext4 to which this Ubuntu intallation is installed<--(this is the installation which didn't boot before manually altering the fstab)
-fourth partition is the rest of the space and is used for storing files and programs.

The process which resulted in this bug:
first I installed mint on that SSD for that old dell computer and used it, that Linux mint distro also used a old HDD in that laptop for general file storage, this was done some days ago.

Next we skip to the installation of ubuntu:
first I made sure to put the latest LTS of ubuntu on it, I downloaded it using the torrent and checked the checksum. the usb was using the latest version of RUFUS in uefi mode with secure boot enabled.
The next of the proces was done on device 2 that Lenovo laptop, and the SSD was in device 3 so it was connected to the laptop(2) using USB
my laptop gave problems with the usb due to the security engine so I disables secure boot in the bios, after that I could boot in the live usb(also connected to the computer. I went to try out ubuntu,
logged in to the wifi,
ran ubiquity using the "ubiquity -b" command.
selected "something else" at the install options for installation location.
enebled codecs and third party drivers, and enabled update ubuntu while installing
selected the 100gb partition for mountpoint '/' and selected the option to format it.
selected the 300mb efi partition to be used as efi partition, didn't format or change it.
installed ubuntu.

after that I shut down the computer, connected the usb from the Clone 2 Duo(device 3) to the Dell laptop(1)
the next is in laptop 1
I booted into linux mint and ran update-grub to update grub.

the next is on laptop 2, i switched back to laptop 2. and tried to boot into ubuntu, that didn't work and chrashed with some weird errors which seemed to be grub related as if grub used sd*x (sda1, etc.) mountpoints which prevented it from working on that laptop, that is however not a ubuntu related problem.

so I switched back to laptop 1 the next from here on is all on that laptop, the SSD however is now directly in the system in one of the 2 HDD slots(the one to which the dvd player used to be connected).
I booted into that new Ubunto install and got errors refferencing to that EFI partion could not be found/connected and it showed the UUID it had for that drive. so I ran blkid to check the UUID, I only have one efi partition on that drive and none on the others so there is only one efi partition and I read that UUID.

I then opened fstab and checked the UUID it had in fstab for that efi partition, and the ID it showed did not match the ID of any partition or drive UUID on the system.
note I didn't make any changes to the fstab before fixing this UUID to make it working.
so the values in there should be the values that where put in there by the installer.
the root file system mounted at '/' at that other partiton was mounted right and the UUID was right as well.
I checked the ID of that EFI partition using the fstab file in the linux mint partition which I already had on that ssd. before installing ubuntu, and the EFI partition's real UUID didn't change when comparing the UUID from before the instal and after the install.

so in short:
ubunu lts live usb using rufus, ran ssd using device 3 on device 2 during the installation(so usb connected), went into "try ubuntu", ran installer using "ubiquity -b" to not install a new bootloader. after shutdown connected ssd to device 1 using device 3, just like how it was connected to device 2 during install. I booted into Linux mint and ran "update-grub" to make ubuntu show in the grub menu. I booted into ubuntu, got a error, found out that in the fstab file the UUID of the EFI partiton was wrong despite the UUID not having changed after correcting it to the right one it worked.

type of problem/bug: depends on how likely it is and the type of user, for me it is no problem anymore since I fixed it and to me it was easy to fix and obvious what the fault was. if this problem is something that seems to be hardware speciffic or speciffic and very rare to happen then the chance that it happens to many people who don't know what to do is small. however if this problem turns out to be more common or that it could happen also on normal systems with a new install then that could be a problem if it caused general users from not being able to boot their system directly after install.
My reason for submitting this bug rapport is solely in case it might affect others, simply changing the /etc/fstab to correct it fixes it for me, but doesn't fix whatever caused the UUID to be set wrong during the ununtu installer, and so this report is for the chance that this might be a bigger bug hiding somewhere.

ProblemType: Bug
DistroRelease: Ubuntu 22.04
Package: ubiquity (not installed)
ProcVersionSignature: Ubuntu 5.15.0-48.54-generic 5.15.53
Uname: Linux 5.15.0-48-generic x86_64
ApportVersion: 2.20.11-0ubuntu82.1
Architecture: amd64
CasperMD5CheckResult: pass
CurrentDesktop: ubuntu:GNOME
Date: Sun Oct 9 14:48:50 2022
InstallCmdLine: BOOT_IMAGE=/casper/vmlinuz file=/cdrom/preseed/ubuntu.seed maybe-ubiquity quiet splash ---
InstallationDate: Installed on 2022-10-09 (0 days ago)
InstallationMedia: Ubuntu 22.04.1 LTS "Jammy Jellyfish" - Release amd64 (20220809.1)
SourcePackage: ubiquity
Symptom: installation
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Daan van Loon (ellesar-dragon) wrote :
tags: added: foundations-triage-discuss
summary: - Instalation enters wrong UUID for EFI partition in fstab when installing
- Ubuntu with "ubiquity -b"
+ Installation enters wrong UUID for EFI partition in fstab when
+ installing Ubuntu with "ubiquity -b"
Revision history for this message
Julian Andres Klode (juliank) wrote :

We need to figure out where the UUID came from - is it perhaps the UUID of the file system on the USB stick you installed from?

Note that filesystem UUID != partition UUID

Have a look at lsblk -o UUID,path or something like that to see where the UUID comes from, with the stick attached.

Changed in ubiquity (Ubuntu):
status: New → Incomplete
importance: Undecided → Medium
tags: removed: foundations-triage-discuss
Revision history for this message
Daan van Loon (ellesar-dragon) wrote : Re: [Bug 1992297] Re: Installation enters wrong UUID for EFI partition in fstab when installing Ubuntu with "ubiquity -b"
Download full text (3.5 KiB)

Hello Julian,
I redid the steps I did during the install, and checking for the UUIDs
which show up it indeed shows one extra UUID which seems like it might have
been that other UUID.
it is a UUID of a EFI partition on the encrypted SSD which I didn't
manually tell to use in the installation.
I ran the installer again and skipped with default settings until the point
where I selected "something else" for instal location/option, and I checked
what it did.
that same partition from that UUID showed up in there, but since I didn't
manually select it I didn't expect it to be used.

however I noticed it was used by default/enabled by default by the
installer when in that manual partitioning selection, this however does
mean that it somehow didn't use the EFI partition I told it to use and just
used the first appearing EFI partition over the partition on the drive
itself.
I can see why it might be useful to automatically select such a partition
even if manual partitioning is selected, but in a case like here where 2
drives have their own EFI partition it might sometimes be confusing or
dangerous if it is automatically selected.
that said it seems like this would be something that would only ocur in
very rare cases, and so likely won't be something most users would
encounter. meaning that it would be doubtfull weather to see it as a bug
or as a feauture. since it only used one of them and not the one I checked
to make sure it was set to be used, it might be a possible solution to
display some kind of message or error if it finds and automatically
selects(for use) 2 or more EFI partitions, that way one can be certain it
uses the right one.
since for me It showed as using that EFI partition I wanted it to use in
the installer, so I didn't check for possible other partitions in use, and
since the fstab only showed one partition I asumed there to have been no
other selected, however it had automatically selected both of them and only
used 1.

again it would be rare for something like this to happen, in my case it was
purely because I used a external SSD to avoid touching the SSD with os and
data for work and school, that way I could use that SSD to still boot into
and run ubuntu on that computer without any performance issues(since even
when used external that SSD is more than fast enough), that way I could
just use it for productivity and gaming when at home using ubuntu from that
external drive, and I could still use that other os and data on school and
work. so again a really rare thing to happen, but it might happen for
people installing it on a ssd or such using it as a portable installation
so they can use it anywhere(live usb can do so to, but has some obvious
problems, mostly speed, but sometimes also with persistency if not set up
right and with storage size typically).
but if it is easily doable a warning text or such when more than one
partition of a type from which the installer and os will only use one is
selected, will work fine as a solution, I don't think disabling the
autoselecting of EFI partitions will be great since that will affect a much
larger group, so a warning text would seem like the most easy and effective
fix right now.

so t...

Read more...

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for ubiquity (Ubuntu) because there has been no activity for 60 days.]

Changed in ubiquity (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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