Skip to content
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

mkosi-mainline "Failed to start initrd-switch-root.service - Switch Root." #287

Closed
solardiz opened this issue Sep 13, 2023 · 7 comments · Fixed by #288
Closed

mkosi-mainline "Failed to start initrd-switch-root.service - Switch Root." #287

solardiz opened this issue Sep 13, 2023 · 7 comments · Fixed by #288
Labels
testing A testing task or issue (e.g., with CI)

Comments

@solardiz
Copy link
Contributor

@vt-alt mkosi-mainline is failing for 2 days with:

 [  OK  ] Reached target initrd-switch-root.target - Switch Root.
         Starting initrd-switch-root.service - Switch Root...
[FAILED] Failed to start initrd-switch-root.service - Switch Root.
See 'systemctl status initrd-switch-root.service' for details.

Generating "/run/initramfs/rdsosreport.txt"
@solardiz solardiz added the testing A testing task or issue (e.g., with CI) label Sep 13, 2023
@vt-alt
Copy link
Contributor

vt-alt commented Sep 13, 2023

Looks like boot failure. Ubuntu seems diverging more and more from that old mkosi we use.

@vt-alt
Copy link
Contributor

vt-alt commented Sep 18, 2023

It seems that GitHub does not even plan to add Ubuntu newer than 22.04 on runners in foreseeable future, so we still cannot start to use latest mkosi again.

@solardiz
Copy link
Contributor Author

@vt-alt So we need to use mkosi v14 tag, right? Will you please make this change? Thanks!

@vt-alt
Copy link
Contributor

vt-alt commented Sep 18, 2023

We already using v14.

I thought - maybe we finally can switch to a newer mkosi to fix the issue, but it's not time yet.

@solardiz
Copy link
Contributor Author

@vt-alt Ah, so since we have to stay with v14, we should also stay with older Ubuntu? Can we?

@vt-alt
Copy link
Contributor

vt-alt commented Sep 18, 2023

Cannot, because (the) mainline kernels are for bleeding edge Ubuntu-s by design.

@vt-alt
Copy link
Contributor

vt-alt commented Sep 20, 2023

I debugged the boot process and found that the immediate cause of the boot failure is Dracut not mounting the root filesystem even though all devices are present.

Dracut does not say why but with debug enabled (rd.debug rd.debugverbose) it says too much and it's still unclear why.

Instead of delving deeper and becoming Dracut expert, it occurs to me that we can simply pass root=LABEL=root into cmdline, as mkosi creates root fs with the label root. And the experiment shows that this works.

ps. When failure first occurred dracut version is unchanged being dracut-059-4ubuntu2.
pps. What is changed:

-Preparing to unpack .../systemd_253.5-1ubuntu4_amd64.deb ...
+Preparing to unpack .../systemd_253.5-1ubuntu5_amd64.deb ...

Perhaps we are affected by this change backporting https://git.launchpad.net/~ubuntu-core-dev/ubuntu/+source/systemd/commit/?id=a366279a84730e92ed734710560ea833709f359d deleting systemd-gpt-auto-generator for unspecified reasons.

vt-alt added a commit to vt-alt/lkrg that referenced this issue Sep 20, 2023
Ubuntu removed 'systemd-gpt-auto-generator' from systemd_253.5-1ubuntu5,
causing dracut to be unable to find the root partition without
assistance. It appears that specifying the root label could be a good
solution.

Fixes: lkrg-org#287
Signed-off-by: Vitaly Chikunov <[email protected]>
solardiz pushed a commit that referenced this issue Sep 20, 2023
Ubuntu removed 'systemd-gpt-auto-generator' from systemd_253.5-1ubuntu5,
causing dracut to be unable to find the root partition without
assistance. It appears that specifying the root label could be a good
solution.

Fixes: #287
Signed-off-by: Vitaly Chikunov <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
testing A testing task or issue (e.g., with CI)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants