Troubleshooting: Capstone Project Issues

Updated

October 30, 2026

Troubleshooting: Capstone Project Issues

During the assembly and boot testing of your custom distribution, you may encounter subtle integration bugs. Here is the field guide to diagnosing and fixing the most common issues:

1. Initramfs Dropping into Shell: Media not found

Symptom:

[initramfs] Locating installation media...
[initramfs] FATAL: Media with label BYOL_LIVE not found!

Diagnostic Flow: 1. In the rescue shell, run: sh # cat /proc/partitions # blkid 2. If blkid outputs nothing: the kernel lacks the driver for the storage bus. Verify that CONFIG_ISO9660_FS=y, CONFIG_BLK_DEV_SR=y (SCSI CD-ROM), and CONFIG_VIRTIO_BLK=y are enabled in your kernel .config. 3. If blkid lists /dev/sr0 without a label: re-run xorriso with -volid "BYOL_LIVE" explicitly set.

2. Kernel Panic: Attempted to kill init! exitcode=0x0000007f

Symptom:

[    2.100120] Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000007f

Root Cause: Exit code 0x7f in POSIX corresponds to 127 (Command Not Found). - The dynamic linker (/lib/ld-musl-x86_64.so.1 or /lib64/ld-linux-x86-64.so.2) is missing from the SquashFS rootfs. - Or /sbin/init is a symlink pointing to a relative path that does not exist.

Remedy: Unpack your rootfs.squashfs with unsquashfs and inspect /sbin/init:

$ readelf -l squashfs-root/bin/busybox | grep interpreter
      [Requesting program interpreter: /lib/ld-musl-x86_64.so.1]
$ ls -l squashfs-root/lib/ld-musl-x86_64.so.1

Ensure the dynamic linker exists at the exact path requested by the binary.

3. BusyBox Login Prompt Re-Spawning in Infinite Loop

Symptom: The console floods continuously with:

byol-box login: 
byol-box login: 
byol-box login: 

Root Cause: In /etc/inittab, tty1::respawn:/sbin/getty 38400 tty1 was spawned, but the device node /dev/tty1 does not exist or cannot be opened as a controlling terminal.

Remedy: - Ensure CONFIG_DEVTMPFS=y and CONFIG_DEVTMPFS_MOUNT=y are compiled into the kernel. - In your initramfs /init script, ensure /dev is mounted before pivot, or ensure /newroot/dev has essential static device nodes: bash # mknod -m 600 /mnt/target/dev/console c 5 1 # mknod -m 666 /mnt/target/dev/null c 1 3 # mknod -m 666 /mnt/target/dev/tty1 c 4 1