-
-
Notifications
You must be signed in to change notification settings - Fork 191
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Boot device detection is not deterministic #1919
Comments
@nestire I guess the fix would be to mount /boot by partition uuid and not by /dev/ convenient naming scheme, which is the one being deterministic? |
@tlaurion the naming of the device is not changing, so at one boot it is /dev/nvme1 and on the next boot it is /dev/nvme0 . The problem here seems to be that the order fdisk list the devices in this moment seems to be not fix, so whatever device is at top will be choosen since the function stops with the first boot device. So a simple "sort" in the pipe should probably fix this. |
This doesn't make sense to me.
Grub works like that nowadays, so that dev passed is per uuid, same for fstab. blkid does the mapping between covenient device name and uuid. Not sure how to properly refactor codebase to use uuid instead of convenient device names though. Lines 1129 to 1170 in d4c4e56
Somewhat, #903 proposed something similar, using labels instead of UUID, where afba8f7 being associated commit suggest UUID. Thoughts @nestire ? |
Hi, I think there is a misunderstanding. What happen was that the Boot device changed from /dev/nvme0 to /dev/nvme1 in between the boots, the content of /dev/nvme0 of /dev/nvme1 was always the same so the kernel always assigned the same hardware to these names. Unfortunately the device where we have seen this is gone now but I will try to reproduce this on another device, to be 100% sure. |
@nestire this will need replication. busybox fdisk will report /dev/nvme0 before /dev/nvme1, output is ordered alphanumerically. If the order unstable between reboots, we would need to get away of friendly devices names in codebase and replace with UUID. |
Please identify some basic details to help process the report
A. Provide Hardware Details
novacustom-v560tu
B. Identify how the board was flashed
C. Identify the rom related to this bug report
Did you download or build the rom at issue in this bug report?
If you downloaded your rom, where did you get it from?
Please provide the release number or otherwise identify the rom downloaded
If you built your rom, which repository:branch did you use?
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
heads/initrd/etc/functions
Line 1142 in d4c4e56
The text was updated successfully, but these errors were encountered: