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

And my /etc/rc script:


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
  • The only thing I can think of is that you built shadow for the wrong architecture? – tink Nov 2 '18 at 20:43
  • 1
    /bin/login probably cannot find its interpreter (dynamic loader) -- it's not a static executable. – mosvy Nov 2 '18 at 21:09
  • Looks like /bin/login isn't a static executable, shadow's configure doesn't allow "--enable-static"? – dangeroushobo Nov 2 '18 at 21:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.