View Issue Details

IDProjectCategoryView StatusLast Update
0002641Rocky-Linux-9systemdpublic2023-03-20 06:18
ReporterYanfei Xu Assigned To 
PriorityurgentSeverityblockReproducibilityalways
Status newResolutionopen 
Platformaarch64OSRockyLinuxOS Version9.1
Summary0002641: initrd can't boot and failed at switch-root of systemd
DescriptionWhen using initrd to boot RockyLinux, it always failed at switch-root service of systemd, then hung and can't boot into the real rootfs.
Steps To Reproduce1. Set up a iscsi target to store the rootfs for iscsiboot.
2. Use dracut to create an initrd from rootfs directory.
    /usr/bin/dracut -v -m "base network iscsi nfs systemd-initrd systemd-networkd systemd-udevd systemd-modules-load systemd-journald systemd-integritysetup" --hostonly-mode "strict" --hostonly-nics "virtio-net" --no-early-microcode --install "/usr/bin/ping" --add-drivers "nfs nfsv4" --force-drivers "mfd-core configfs" --filesystem "ext4 xfs" ./initrd.img 5.10.45_xxx
3. Boot system with initrd. and Kernel command line is "systemd.log_level=debug systemd.log_target=console ip=192.168.0.2::192.168.0.1:255.255.255.0::eth0:off root=iscsi:192.168.0.1::::iqn.e2000:acx in
itrdmem=0x440c000000,0x8000000 acpi=force rd.neednet=1"
4. boot failed and showed log:
-------------------------
[ OK ] Reached target Switch Root.
initrd-switch-root.service: AssertPathExists=/etc/initrd-release succeeded.
Failed to read pids.max attribute of root cgroup, ignoring: No data available
initrd-switch-root.service: Passing 0 fds to service
initrd-switch-root.service: About to execute systemctl --no-block switch-root /sysroot
initrd-switch-root.service: Forked systemctl as 305
initrd-switch-root.service: Changed dead -> start
         Starting Switch Root...
systemd-journald.service: Got notification message from PID 261 (FDSTORE=1)
initrd-switch-root.service: Executing: systemctl --no-block switch-root /sysroot
systemd-journald.service: Added fd 12 (n/a) to fd store.
Bus private-bus-connection: changing state UNSET → OPENING
sd-bus: starting bus private-bus-connection on fds 27/27 (socket:[11846], socket:[11846])...
Bus private-bus-connection: changing state OPENING → AUTHENTICATING
Registering bus object implementation for path=/org/freedesktop/systemd1 iface=org.freedesktop.systemd1.Manager
Registering bus object implementation for path=/org/freedesktop/systemd1/job iface=org.freedesktop.systemd1.Job
Registering bus object implementation for path=/org/freedesktop/systemd1/unit iface=org.freedesktop.systemd1.Unit
Registering bus object implementation for path=/org/freedesktop/systemd1/unit iface=org.freedesktop.systemd1.Automount
Registering bus object implementation for path=/org/freedesktop/systemd1/unit iface=org.freedesktop.systemd1.Device
Registering bus object implementation for path=/org/freedesktop/systemd1/unit iface=org.freedesktop.systemd1.Mount
Registering bus object implementation for path=/org/freedesktop/systemd1/unit iface=org.freedesktop.systemd1.Path
Registering bus object implementation for path=/org/freedesktop/systemd1/unit iface=org.freedesktop.systemd1.Scope
Registering bus object implementation for path=/org/freedesktop/systemd1/unit iface=org.freedesktop.systemd1.Service
Registering bus object implementation for path=/org/freedesktop/systemd1/unit iface=org.freedesktop.systemd1.Slice
Registering bus object implementation for path=/org/freedesktop/systemd1/unit iface=org.freedesktop.systemd1.Socket
Registering bus object implementation for path=/org/freedesktop/systemd1/unit iface=org.freedesktop.systemd1.Swap
Registering bus object implementation for path=/org/freedesktop/systemd1/unit iface=org.freedesktop.systemd1.Target
Registering bus object implementation for path=/org/freedesktop/systemd1/unit iface=org.freedesktop.systemd1.Timer
Registering bus object implementation for path=/org/freedesktop/LogControl1 iface=org.freedesktop.LogControl1
Accepted new private connection.
Bus private-bus-connection: changing state AUTHENTICATING → RUNNING
Got message type=method_call sender=n/a destination=org.freedesktop.systemd1 path=/org/freedesktop/systemd1 interface=org.freedesktop.systemd1.Manager member=SwitchRoot cookie=1 repl
y_cookie=0 signature=ss error-name=n/a error-message=n/a
Sent message type=error sender=org.freedesktop.systemd1 destination=n/a path=n/a interface=n/a member=n/a cookie=1 reply_cookie=1 signature=s error-name=org.freedesktop.DBus.Error.In
validArgs error-message=Specified switch root path '/sysroot' does not seem to be an OS tree. os-release file is missing.
Failed to process message type=method_call sender=n/a destination=org.freedesktop.systemd1 path=/org/freedesktop/systemd1 interface=org.freedesktop.systemd1.Manager member=SwitchRoot
 cookie=1 reply_cookie=0 signature=ss error-name=n/a error-message=n/a: Specified switch root path '/sysroot' does not seem to be an OS tree. os-release file is missing.
Received SIGCHLD from PID 305 (systemctl).
Child 305 (systemctl) died (code=exited, status=1/FAILURE)
initrd-switch-root.service: Child 305 belongs to initrd-switch-root.service.
initrd-switch-root.service: Main process exited, code=exited, status=1/FAILURE
initrd-switch-root.service: Failed with result 'exit-code'.
initrd-switch-root.service: Service will not restart (restart setting)
initrd-switch-root.service: Changed start -> failed
Bus private-bus-connection: changing state RUNNING → CLOSING
Failed to send manager change signal: Connection reset by peer
initrd-switch-root.service: Job 54 initrd-switch-root.service/start finished, result=failed
[FAILED] Failed to start Switch Root.
See 'systemctl status initrd-switch-root.service' for details.
Startup finished in 3.536s (kernel) + 0 (initrd) + 17.843s (userspace) = 21.380s.
initrd-switch-root.service: Unit entered failed state.
initrd-switch-root.service: Triggering OnFailure= dependencies.
emergency.target: Trying to enqueue job emergency.target/start/replace-irreversibly
emergency.target: Installed new job emergency.target/start as 96
emergency.service: Installed new job emergency.service/start as 97
systemd-vconsole-setup.service: Installed new job systemd-vconsole-setup.service/start as 110
emergency.target: Enqueued job emergency.target/start as 96
initrd-switch-root.service: Triggering OnFailure= dependencies done.
initrd-switch-root.service: Consumed 3ms CPU time.
initrd-switch-root.service: Control group is empty.
systemd-journald.service: Received EPOLLHUP on stored fd 12 (stored), closing.
Bus private-bus-connection: changing state CLOSING → CLOSED
Got disconnect on private connection.
emergency.target: starting held back, waiting for: emergency.service
Failed to read pids.max attribute of root cgroup, ignoring: No data available
emergency.service: About to execute /usr/bin/plymouth --wait quit
emergency.service: Forked /usr/bin/plymouth as 306
emergency.service: Changed dead -> start-pre
emergency.service: Job 97 emergency.service/start finished, result=done
emergency.target changed dead -> active
emergency.target: Job 96 emergency.target/start finished, result=done
systemd-vconsole-setup.service: ConditionPathExists=/dev/tty0 succeeded.
Failed to read pids.max attribute of root cgroup, ignoring: No data available
systemd-vconsole-setup.service: Passing 0 fds to service
systemd-vconsole-setup.service: About to execute /usr/lib/systemd/systemd-vconsole-setup
systemd-vconsole-setup.service: Forked /usr/lib/systemd/systemd-vcoReceived SIGCHLD from PID 308 ((in-shell)).
Child 308 ((in-shell)) died (code=exited, status=0/SUCCESS)
emergency.service: Child 308 belongs to emergency.service.
emergency.service: Main process exited, code=exited, status=0/SUCCESS (success)
emergency.service: Deactivated successfully.
emergency.service: Service will not restart (restart setting)
emergency.service: Changed running -> dead
emergency.service: Consumed 873us CPU time.
systemd-journald.service: Got notification message from PID 261 (WATCHDOG=1)
systemd-journald.service: Got notification message from PID 261 (WATCHDOG=1)
systemd-journald.service: Got notification message from PID 261 (WATCHDOG=1)
systemd-journald.service: Got notification message from PID 261 (WATCHDOG=1)
 
TagsNo tags attached.

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2023-03-20 06:18 Yanfei Xu New Issue