Bug #16731
Partitioning on boot sometimes aborts because of partprobe failing
100%
Description
We received a WB report (da054cb0246450ddda6657a8a9999d70) about a failure on second boot.
Apprently due to the execution of partprobe from init-premount script.
Related issues
Associated revisions
Only probe for partitions on the boot device.
Without arguments partprobe will scan all devices, and if it
encounters a device it doesn't support (e.g. fake raid-0 arrays) it
will return non-zero, thus aborting Tails' partitioning script,
resulting in an unbootable install.
Will-fix: #16731
Merge branch 'bugfix/16731-explicit-partprobe' into stable (Fix-committed: #16731)
History
#1 Updated by segfault 7 months ago
So, the bug report is about a USB image booted on a non-UEFI computer, where the partitioning script fails at the partprobe command and thus doesn't execute the sgdisk command which sets legacy BIOS bootable.
The error message of the partprobe command is "Error: Can't have a partition outside the disk!". I didn't yet look into what could have caused this error.
I think that this could be the cause of some of the issues reported on #16389.
#2 Updated by segfault 7 months ago
I started investigating what the cause for "Can't have a partition outside the disk" could be.
partprobe fails with this error if (part->geom.end >= disk->dev->length)
. So I see these possible causes:
- We use a too big partition size in the sgdisk command to create the partition.
- partprobe gets an incorrect partition geometry, which has a too big
geom.end
value. - partprobe compares with a different device size (
disk->dev->length
) than what we used to calculate the partition size for the sgdisk command.
#3 Updated by segfault 7 months ago
Just saw #16389#note-71. I assume that the user reporting this same issue on XMPP is the same user who sent the bug report, because they describe exactly the same issue and both already did some investigation on their own.
anonym found out that the partprobe error was caused by a fake raid array and is unrelated to the partition we create. Therefore I will now stop investigating and prepare the fix anonym suggested.
#5 Updated by segfault 7 months ago
anonym already pushed a commit to bugfix/16389-explicit-partprobe.
I don't see how this issue could be solved by sgdisk --recompute-chs
, which did fix the second boot issue for at least one user. So I don't want to hijack #16389 for this and will restore the old feature branch there and use the partprobe related branch here.
#7 Updated by intrigeri 7 months ago
- Related to Bug #16389: Some USB sticks become unbootable in legacy BIOS mode after first boot added
#12 Updated by segfault 7 months ago
- Status changed from In Progress to 11
- % Done changed from 0 to 100
Applied in changeset tails|14fdf238b08a686c75028e09a5cb90c45ad14972.
#16 Updated by CyrilBrulebois 5 months ago
I'm not sure what to do here (if anything) as this ticket has target version Tails_3.15
so shows up on the RM view for 3.15, while the fix was actually merged into 3.14.1
. Should the target version have been changed to Tails_3.14
? Or is it considered fine/OK/unimportant to have a few tickets fixed in emergency releases show up on the RM view for the next bugfix/major release?
#17 Updated by intrigeri 5 months ago
I'm not sure what to do here (if anything) as this ticket has target version
Tails_3.15
so shows up on the RM view for 3.15, while the fix was actually merged into3.14.1
. Should the target version have been changed toTails_3.14
? Or is it considered fine/OK/unimportant to have a few tickets fixed in emergency releases show up on the RM view for the next bugfix/major release?
In general I prefer having tickets closed with the correct version. This avoids mistakes in the changelog, release notes, and makes future analysis easier.
I've already corrected a bunch of these mistakes from the 3.14.X release process. I missed this one. Whatever, close with version = 3.15.
#18 Updated by CyrilBrulebois 5 months ago
- Status changed from 11 to Resolved
#19 Updated by CyrilBrulebois 5 months ago
Alright, thanks.