Sample Header Ad - 728x90

How to debug systemd "init" freeze during boot?

4 votes
1 answer
4277 views
I'm trying to get my own init script running on [some ARM hardware](http://www.acmesystems.it/terra) and Debian Jessie with systemd. The overall boot concept and init script is almost identical to a x86 variant, which works fine. For both hardwares the whole SD card image is pre-built on a x86 host. When running on the ARM hardware, having **serial console access** I see that my init script runs fine up to the point where switch_root is called:
exec switch_root -c /dev/console /newroot /sbin/init
Nothing happens after that. No error message is printed - which makes it difficult to find the problem. The kernel command line is...
ro root=LABEL=IM_BOOT1 panic=10 mem=256M console=ttyS0,115200 systemd.log_level=debug
...and AFAIK this should make systemd print maximum debug messages. Unfortunately nothing is printed. **Any idea/hint what I could do to understand what could be causing the freeze, or with other words - understand what is going on?** ---- The only strange detail are some warnings in the kernel log *before* calling switch_root:
ext4: Unknown symbol jbd2_journal_errno (err 0)
ext4: Unknown symbol jbd2_journal_begin_ordered_truncate (err 0)
ext4: Unknown symbol jbd2_journal_flush (err 0)
ext4: Unknown symbol mb_cache_entry_find_next (err 0)
squashfs: version 4.0 (2009/01/31) Phillip Lougher
aufs 3.16-20150928
usbhid: Unknown symbol hid_output_report (err 0)
usbhid: Unknown symbol hidinput_count_leds (err 0)
usbhid: Unknown symbol hid_allocate_device (err 0)
usbhid: Unknown symbol hid_destroy_device (err 0)
usbhid: Unknown symbol hid_alloc_report_buf (err 0)
usbhid: Unknown symbol hid_set_field (err 0)
usbhid: Unknown symbol hid_check_keys_pressed (err 0)
usbhid: Unknown symbol hid_input_report (err 0)
usbhid: Unknown symbol hid_debug (err 0)
usbhid: Unknown symbol __hid_request (err 0)
usbhid: Unknown symbol hid_parse_report (err 0)
usbhid: Unknown symbol hid_add_device (err 0)
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
usb_storage: Unknown symbol scsi_report_device_reset (err 0)
usb_storage: Unknown symbol scsi_remove_host (err 0)
usb_storage: Unknown symbol scsi_report_bus_reset (err 0)
usb_storage: Unknown symbol scsi_sense_desc_find (err 0)
usb_storage: Unknown symbol scsi_eh_prep_cmnd (err 0)
usb_storage: Unknown symbol scsi_host_put (err 0)
usb_storage: Unknown symbol scsi_scan_host (err 0)
usb_storage: Unknown symbol scsi_is_host_device (err 0)
...however these modules *appear* to work fine anyway. I don't know if that is related. Some additional details: - Debian installation is prepared using debootstrap (same method works perfectly with x86) - Custom built Kernel: Linux (none) 3.16.7 #1 Mon Nov 16 08:32:55 UTC 2015 armv5tejl GNU/Linux, patched with AUFS and hardware-specific device tree - both Kernel and root fs are built with help of QEMU on a x86 host - initramfs boots with **BusyBox**, sets up the AUFS final root fs and finally invokes switch_root. The same method (nearly 100% identical init script) works fine on x86 - I can run an interactive shell just before running switch_root and I can't find anything that isn't working as expected at that point
Asked by Udo G (1143 rep)
Nov 16, 2015, 11:00 AM
Last activity: Jul 4, 2025, 08:04 AM