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

systemd-firstboot.service prevents system from booting up #23

Closed
ZeroAurora opened this issue Jan 13, 2024 · 5 comments
Closed

systemd-firstboot.service prevents system from booting up #23

ZeroAurora opened this issue Jan 13, 2024 · 5 comments

Comments

@ZeroAurora
Copy link

ZeroAurora commented Jan 13, 2024

Update

dbus.socket is actually being blocked by another service systemd-firstboot. This service stuck on boot and prevents the system from fully booting up. The following original issue is only for referencing.

No journals, no warnings or errors. I can't really find out what's wrong.
图片
I tried to upgrade the system, terminate WSL and "reboot" it but it's of no use. The only way to get it "up and running" magically is to start a Debian (or any other distros that can run DBus/systemd) WSL instance by side with DBus running.
图片
And the magic persists, even if I do wsl --shutdown.
图片

This should be a half upstream problem but I can't determine where is wrong. Posting here for help.
uname -a: Linux ZA-Desktop 5.15.137.3-microsoft-standard-WSL2 #1 SMP Mon Nov 6 23:32:38 UTC 2023 x86_64 GNU/Linux
wsl --version:

WSL 版本: 2.1.0.0
内核版本: 5.15.137.3-1
WSLg 版本: 1.0.59
MSRDC 版本: 1.2.4677
Direct3D 版本: 1.611.1-81528511
DXCore 版本: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows 版本: 10.0.22635.2552

Cause

systemd-firstboot.service sticks on first boot, thus blocking other services from booting up.

I tried to use other distros and they just works, without firstboot sticking.

@ZeroAurora

This comment was marked as outdated.

@ZeroAurora
Copy link
Author

Noticed that actually the system isn't fully booted up. This is the cause for dbus not starting.
Some dev suggested to disable sshd service, but not working for my env.
I discovered that the boot process stuck at systemd-firstboot.service by running sudo systemctl list-jobs.
Killed it and works.
Changing the issue title...

936dbfddca4e5200d9d2e06fb4fe08a0

@ZeroAurora ZeroAurora changed the title DBus is broken in a newly installed system systemd-firstboot.service prevents system from booting up Jan 13, 2024
@ZeroAurora
Copy link
Author

After discovering with that dev, we finally found the cause: /etc/machine-id is mounted RO by WSL.
Last question: why? why not others?

@ZeroAurora
Copy link
Author

ZeroAurora commented Jan 13, 2024

图片
Transferring this issue to bootstrap repo...

@Fearyncess
Copy link
Member

Fearyncess commented Jan 13, 2024

https://github.com/AOSC-Dev/aoscbootstrap/blob/master/assets/cleanup.sh#L43 this line makes /etc/machine-id missing in generated tarball. thus let wsl or the other things hijacked this file, let it become a read-only file.

there is a temporary solution: create a empty file in the tarball.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants