-
Notifications
You must be signed in to change notification settings - Fork 401
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
fix(base): do not change the provided UUID #1650
Conversation
@haraldh what's was/is historic? reason to change everything to lower case to begin with? + There should be no need for the second echo if the string is being used as is, as in |
I dig around this issue and found the following: 95rootfs-block: with commit f17c5fa from 24.07.2013 the conversion of the stings was introduced with the following description: In the kernel comments PARTUUID is shown using uppercase A-F: However this assumption is wrong. Looking at the code in However systemd creates the Symlinks using the corresponding value in ENV{ID_PART_ENTRY_UUID} or ENV{ID_PART_ENTRY_UUID} which are both derived from the drive itself and are not touched at all. See https://github.com/systemd/systemd/blob/main/rules.d/60-persistent-storage.rules When dracut parses the provided UUID it calls wait_for_dev() for the device to appear. However this function uses a _name argument that is case sensitive. That’s the point here: the above reasoning for inserting the conversion upper->lower in 95rootfs-block is wrong because the kernel doesn’t expect any specific characters at all: it just doesn’t care about case sensitivity but dracut does. That’s why the reasoning above “However, dracut tries to use the value of PARTUUID directly in /dev/disks/by-partuuid/ which expects the hex to be lowercase. This will cause root to never be found, oops!” is wrong. Dracut doesn’t expect lowercase but what is provided by the device. And since ABCD != abcd we should correctly state the desired UUID on the command line and the dracut will find that device. Otherwise the devices won’t be visible by dracut and then we end with the emergency shell (as in my case right now). That’s why we don’t need to tamper the UUID provided by the device… which my patch corrects. @johannbg I’ll update my PR (hopefully without any more oops, this time). |
During boot dracut parses the provided UUID to lower case and thus starts an endless loop wating for the devise to appear. The device is actually mapped correctly by the kernel (which doesn't tweak the UUID) but because we are waiting for a name with lower charachters the expeted device never appers which drops us at the emergency shell leaving the system unbootable. This happens especially on nfts/fat filesystems because technically those don't have a UUID but searial numbers which are used by the linux tools as UUID.
The correct patch is ready for review. |
Is there any update on this issue? If my reasoning above is wrong I'll amend/edit the comments and/or the proposed fix but this bug still plugs my setup. |
This issue is being marked as stale because it has not had any recent activity. It will be closed if no further activity occurs. If this is still an issue in the latest release of Dracut and you would like to keep it open please comment on this issue within the next 7 days. Thank you for your contributions. |
This was introduced by
d353297
Bugzilla:
https://bugzilla.redhat.com/show_bug.cgi?id=2012496
This pull request changes...
Changes
During boot dracut parses the provided UUID to lower case and thus starts an endless loop wating for the devise to appear. The device is actually mapped correctly by the kernel (which doesn't tweak the UUID) but because we are waiting for a name with lower charachters the expeted device never appers which drops us at the emergency shell leaving the system unbootable.
This happens especially on nfts/fat filesystems because technically those don't have a UUID but searial numbers which are used by the linux tools as UUID.
Checklist
Fixes #
#1635