Boot device detection is not deterministic
Nobody has claimed this yet.
- Dominant language
- Makefile
- Stars
- 1.6k
- Forks
- 211
- Avg merge
- 4d 21h
- Merged PRs (30d)
- 6
Description
Please identify some basic details to help process the report
A. Provide Hardware Details
- What board are you using? (Choose from the list of boards here)
novacustom-v560tu
B. Identify how the board was flashed
- How was Heads initially flashed?
- External flashing
- Internal-only / 1vyprep+1vyrain / skulls
- Don't know
C. Identify the rom related to this bug report
-
Did you download or build the rom at issue in this bug report?
- [x ] I downloaded it
- I built it
-
If you downloaded your rom, where did you get it from?
- Heads CircleCi
- Purism
- Nitrokey
- Dasharo DTS (Novacustom)
- Somewhere else (please identify)
Please provide the release number or otherwise identify the rom downloaded
-
If you built your rom, which repository:branch did you use?
- Heads:Master
- Other (please identify)
Please describe the problem
Describe the bug
If in you have 2 nvme installed in the v56 laptop: same size and vendor, and both nvme are valid boot devices, heads will be switching between these boot devices every reboot in a random way. This creates a lot of different faulty behaviours which are hard to diagnose.
Expected behavior
Always choose the same boot device, warn at OEM-Factory-Reset that there are 2. valid Boot Devices and ask which one is the correct one.
Additional context
my guess is that this fdisk call https://github.com/linuxboot/heads/blob/d4c4e5699b89365a88d9d49748dbcc11b6394907/initrd/etc/functions#L1142 is to blame not sure if this is also a problem for non nvme setups
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the fdisk call in initrd/etc/functions around line 1142 and reproduce the report with two same-size, same-vendor NVMe devices. Trace how valid boot devices are selected across reboots, then verify that selection is deterministic and that OEM-Factory-Reset warns when two valid devices are present.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- linux, shell
- Domain
- operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100