-
Notifications
You must be signed in to change notification settings - Fork 400
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(dracut-systemd): systemd-gpt-auto-generator should not run when root is unset #1722
Conversation
…oot is unset systemd-gpt-auto generator runs when `root=<device>` is not set on the kernel cmdline. It doesn't work even if `root=<device>` is set by dracut in the stored command line. For systemd-gpt-auto-generator to not run, one either needs to explicitly set a `root=` parameter or set `rd.systemd.gpt_auto=0` on the kernel cmdline. Since we do not have control over the command line passed to the kernel, the easiest way to bypass this is to delete the generator when the root parameter is set. Fixes #1709 Signed-off-by: Savyasachee Jha <hi@savyasacheejha.com>
@johannbg I am, again, sorry for pinging you but would you wish me to run any more tests on this? I got a friend to do this on Arch Linux and it worked for him too. I've tried this on my Debian box and it works fine. |
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 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. |
@savyajha Can this bug be reproduced with a test case like TEST-04-FULL-SYSTEMD using qemu ? This would help to understand the problem, justify the PR, and guard against future regressions. |
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. |
Related - random-archer/mkinitcpio-systemd-tool#70 |
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. |
Deleting the generator is a workaround not a fix I should probably mention that systemd only uses What does the non working kernel commandline look like? |
It didn't work for me. The stored command line was I should note that I normally have a long grub commandline. The kernel line in my For testing, I changed it to |
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. |
bad bot |
Pretty sure this is a bug in the generator hence closing. File an bug report in upstream systemd if it get's nacked with not our problem re-open this request. |
You mix different things.
No, it is not a bug, generators work as designed. It could be missing feature, then some cooperation between |
systemd-gpt-auto generator runs when
root=<device>
is not set on thekernel cmdline. It doesn't work even if
root=<device>
is set by dracutin the stored command line. For systemd-gpt-auto-generator to not run,
one either needs to explicitly set a
root=
parameter or setrd.systemd.gpt_auto=0
on the kernel cmdline.Since we do not have control over the command line passed to the kernel,
the easiest way to bypass this is to delete the generator when the root
parameter is set.
Fixes #1709
Signed-off-by: Savyasachee Jha hi@savyasacheejha.com
This pull request changes...
Changes
Deletes
systemd-auto-gpt-generator
at runtime if theroot=
parameter is set.Checklist
It has been (extensively) tested on Fedora 35 running systemd 249 (v249.9-1.fc35) and dracut v55.
Fixes #1709