Der erste Start schlägt beim Einhängen von Partitionen fehl

606
Benjamin T

Ich baue ein System mit buildroot. Es verwendet systemd.

Wenn ich das System zum ersten Mal flashe und starte, meldet systemd nur einen Fehler:

[FAILED] Failed to start File System Check on Root Device. 

Dann startet das System 1 Mal neu. Danach gibt es keine Fehler mehr und das System startet ordnungsgemäß.

Dann habe ich versucht, einen Eintrag hinzuzufügen in /etc/fstab:

/dev/root / auto ro 0 1 tmpfs /var tmpfs mode=1777 0 0  # My line: /dev/mmcblk0p5 /opt/foo ext4 auto,exec,ro,noatime,nodiratime 0 2  

Dann baue ich das Bild neu auf und flche es neu. Aber dieses Mal meldet Systemd beim Booten viele Fehler und schlägt fehl. Kein Neustart, keine Recovery-Shell, nichts.

systemd-reboot.service: Failed to load configuration: No such file or directory reboot.target: Trying to enqueue job reboot.target/start/replace-irreversibly Sent message type=error sender=org.freedesktop.systemd1 destination=n/a path=n/a interface=n/a member=n/a cookie=9 reply_cookie=1 signature=s error-name=org.freedesktop.systemd1.NoSuchUnit error-message=Unit systemd-reboot.service not found. Failed to process message type=method_call sender=n/a destination=org.freedesktop.systemd1 path=/org/freedesktop/systemd1 interface=org.freedesktop.systemd1.[ 6.306396] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null) Manager member=StartUnitReplace cookie=1 reply_cookie=0 signature=sss error-name=n/a error-message=n/a: Unit systemd-reboot.service not found. systemd-reboot.service: Collecting. reboot.target: Collecting. Bus n/a: changing state RUNNING → CLOSING systemd-reboot.service: Failed to send unit change signal for systemd-reboot.service: Connection reset by peer systemd-reboot.service: Failed to send unit remove signal for systemd-reboot.service: Transport endpoint is not connected reboot.target: Failed to send unit change signal for reboot.target: Transport endpoint is not connected reboot.target: Failed to send unit remove signal for reboot.target: Transport endpoint is not connected Received SIGCHLD from PID 115 (systemd-fsck). Child 115 (systemd-fsck) died (code=exited, status=1/FAILURE) systemd-fsck-root.service: Child 115 belongs to systemd-fsck-root.service. systemd-fsck-root.service: Main process exited, code=exited, status=1/FAILURE systemd-fsck-root.service: Failed with result 'exit-code'. systemd-fsck-root.service: Changed start -> failed Failed to send manager change signal: Transport endpoint is not connected systemd-fsck-root.service: Job systemd-fsck-root.service/start finished, result=failed [FAILED] Failed to start File System Check on Root Device. .... var.mount: Executing: /usr/bin/mount tmpfs /var -t tmpfs -o mode=1777 systemd-udevd.service: Failed to execute command: No such file or directory systemd-udevd.service: Failed at step EXEC spawning /usr/lib/systemd/systemd-udevd: No such file or directory var.mount: Failed to execute command: No such file or directory var.mount: Failed at step EXEC spawning /usr/bin/mount: No such file or directory Received SIGCHLD from PID 134 ((mount)). Child 134 ((mount)) died (code=exited, status=203/EXEC) var.mount: Child 134 belongs to var.mount. var.mount: Mount process exited, code=exited status=203 var.mount: Failed with result 'exit-code'. var.mount: Changed mounting -> failed var.mount: Job var.mount/start finished, result=failed [FAILED] Failed to mount /var. See 'systemctl status var.mount' for details. systemd-update-utmp.service: Job systemd-update-utmp.service/start finished, result=dependency [DEPEND] Dependency failed for Update UTMP about System Boot/Shutdown.  systemd-update-utmp-runlevel.service: Job systemd-update-utmp-runlevel.service/start finished, result=dependency [DEPEND] Dependency failed for Update UTMP about System Runlevel Changes. systemd-update-utmp-runlevel.service: Job systemd-update-utmp-runlevel.service/start failed with result 'dependency'. systemd-update-utmp.service: Job systemd-update-utmp.service/start failed with result 'dependency'. systemd-journal-flush.service: Job systemd-journal-flush.service/start finished, result=dependency [DEPEND] Dependency failed for Flush Journal to Persistent Storage. systemd-journal-flush.service: Job systemd-journal-flush.service/start failed with result 'dependency'. basic.target: Job basic.target/start finished, result=dependency [DEPEND] Dependency failed for Basic System. multi-user.target: Job multi-user.target/start finished, result=dependency [DEPEND] Dependency failed for Multi-User System. multi-user.target: Job multi-user.target/start failed with result 'dependency'. basic.target: Job basic.target/start failed with result 'dependency'. systemd-resolved.service: Job systemd-resolved.service/start finished, result=dependency [DEPEND] Dependency failed for Network Name Resolution. systemd-resolved.service: Job systemd-resolved.service/start failed with result 'dependency'. systemd-timesyncd.service: Job systemd-timesyncd.service/start finished, result=dependency [DEPEND] Dependency failed for Network Time Synchronization. systemd-timesyncd.service: Job systemd-timesyncd.service/start failed with result 'dependency'. dbus.socket: Job dbus.socket/start finished, result=dependency [DEPEND] Dependency failed for D-Bus System Message Bus Socket. dbus.service: Job dbus.service/start finished, result=dependency [DEPEND] Dependency failed for D-Bus System Message Bus. dbus.service: Job dbus.service/start failed with result 'dependency'. dbus.socket: Job dbus.socket/start failed with result 'dependency'. local-fs.target: Job local-fs.target/start finished, result=dependency  [DEPEND] Dependency failed for Local File Systems. .... [FAILED] Failed to start udev Kernel Device Manager. .... [ OK ] Reached target Login Prompts. BPF firewalling not supported on this systemd, proceeding without. systemd-udevd.service: Executing: /usr/lib/systemd/systemd-udevd systemd-tmpfiles-setup.service: Passing 0 fds to service systemd-tmpfiles-setup.service: About to execute: /usr/bin/systemd-tmpfiles --create --remove --boot --exclude-prefix=/dev systemd-udevd.service: Failed to execute command: No such file or directory systemd-udevd.service: Failed at step EXEC spawning /usr/lib/systemd/systemd-udevd: No such file or directory systemd-tmpfiles-setup.service: Forked /usr/bin/systemd-tmpfiles as 137 systemd-tmpfiles-setup.service: Changed dead -> start systemd-tmpfiles-setup.service: Executing: /usr/bin/systemd-tmpfiles --create --remove --boot --exclude-prefix=/dev systemd-tmpfiles-setup.service: Failed to execute command: No such file or directory systemd-tmpfiles-setup.service: Failed at step EXEC spawning /usr/bin/systemd-tmpfiles: No such file or directory Starting Create Volatile Files and Directories... systemd-journald.service: Got notification message from PID 121 (FDSTORE=1) systemd-journald.service: Added fd 33 (n/a) to fd store. systemd-journald.service: Got notification message from PID 121 (FDSTORE=1) systemd-journald.service: Added fd 34 (n/a) to fd store. Received SIGCHLD from PID 136 ((md-udevd)). Child 136 ((md-udevd)) died (code=exited, status=203/EXEC) systemd-udevd.service: Child 136 belongs to systemd-udevd.service. systemd-udevd.service: Main process exited, code=exited, status=203/EXEC systemd-udevd.service: Failed with result 'exit-code'. systemd-udevd.service: Changed start -> failed systemd-udevd.service: Job systemd-udevd.service/start finished, result=failed [FAILED] Failed to start udev Kernel Device Manager. See 'systemctl status systemd-udevd.service' for details. systemd-udevd-kernel.socket: Changed running -> listening systemd-udevd.service: Unit entered failed state. systemd-udevd.service: Changed failed -> auto-restart Child 137 ((tmpfiles)) died (code=exited, status=203/EXEC) systemd-tmpfiles-setup.service: Child 137 belongs to systemd-tmpfiles-setup.service. systemd-tmpfiles-setup.service: Main process exited, code=exited, status=203/EXEC systemd-tmpfiles-setup.service: Failed with result 'exit-code'. systemd-tmpfiles-setup.service: Changed start -> failed systemd-tmpfiles-setup.service: Job systemd-tmpfiles-setup.service/start finished, result=failed [FAILED] Failed to start Create Volatile Files and Directories. .... [FAILED] Failed to start Network Service. See 'systemctl status systemd-networkd.service' for details. systemd-networkd.socket: Failed with result 'service-start-limit-hit'.  systemd-networkd.socket: Changed listening -> failed systemd-networkd.socket: Unit entered failed state. systemd-networkd.service: Unit entered failed state. network.target changed dead -> active network.target: Job network.target/start finished, result=done [ OK ] Reached target Network. [ *** ] A start job is running for dev-mmcblk0p5.device (16s / 1min 31s) dev-mmcblk0p5.device: Job dev-mmcblk0p5.device/start finished, result=timeout [ TIME ] Timed out waiting for device dev-mmcblk0p5.device. systemd-fsck@dev-mmcblk0p5.service: Job systemd-fsck@dev-mmcblk0p5.service/start finished, result=dependency [DEPEND] Dependency failed for File System Check on /dev/mmcblk0p5. opt-foo.mount: Job opt-foo.mount/start finished, result=dependency [DEPEND] Dependency failed for /opt/foo. opt-foo.mount: Job opt-foo.mount/start failed with result 'dependency'. Startup finished in 2.520s (kernel) + 1min 32.920s (userspace) = 1min 35.441s. System is tainted: var-run-bad systemd-fsck@dev-mmcblk0p5.service: Job systemd-fsck@dev-mmcblk0p5.service/start failed with result 'dependency'. dev-mmcblk0p5.device: Job dev-mmcblk0p5.device/start failed with result 'timeout'. 

Wenn ich das System dann manuell durch Entfernen der Stromquelle neu starte, wird es ohne Fehler gestartet und alles ist ordnungsgemäß eingehängt.

Ich habe auch versucht, fstab nicht zu verwenden und ein Skript zu verwenden, das von einem Dienst ausgeführt wird, um die Partition einzuhängen, aber das Ergebnis ist ähnlich. Der einzige Unterschied, den ich sah, war, dass ich in diesem Fall /dev/mmcblk0p5am Ende keinen Wartejob habe .

Es ist wirklich komisch, ohne meinen Eintrag in fstab startet das System nach dem ersten Booten schnell neu. Mit meinem Eintrag scheint es, oder es versucht zumindest, weitere Dienste zu starten.

Irgendeine Idee von was könnte passieren?

0
Ich habe versucht, BusyBox vom System zu entfernen. Es scheint zu funktionieren, ich habe jetzt andere Probleme wie das hier dokumentierte: http://lists.busybox.net/pipermail/buildroot/2014-October/109716.html Benjamin T vor 6 Jahren 0

0 Antworten auf die Frage