Sample Header Ad - 728x90

File not found when running a simple busybox system

1 vote
0 answers
2022 views
I'm running Linux 4.1 and booting into a simple busybox environment. Busybox and shadow packages have been built as static and installed in my rootFS. Busybox is used for the /sbin/init and shadow's login is used for the /bin/login. I used makedevs to create /dev, and created /etc/{group,shadow,passwd,inittab,rc}. I installed this on my board and it boots up and seems okay until I press Enter to login. I get that the file /bin/login is not found. Adding to my /etc/rc script I can see that /bin/login exist and is executable. So why can't the system find it? [ 3.875852] devtmpfs: mounted [ 3.880023] Freeing unused kernel memory: 464K (c0994000 - c0a08000) init started: BusyBox v1.26.2 (2018-08-16 15:09:07 EDT) Got the init message -rwxr-xr-x 1 0 0 43752 Nov 2 2018 /bin/login Please press Enter to activate this console. can't run '/bin/login': No such file or directory Please press Enter to activate this console. This is what my /etc/inittab looks like: ::sysinit:/etc/rc init ::askfirst:/bin/login And my /etc/rc script: #!/bin/sh export PATH=/usr/sbin:/usr/bin:/sbin:/bin echo "Got the init message" mount -n -t proc proc /proc 2>/dev/null mount -n -t sysfs sysfs /sys 2>/dev/null mount -o remount,rw,sync / ls -l /bin/login
Asked by dangeroushobo (707 rep)
Nov 2, 2018, 08:30 PM