No /proc in a Busybox-based embedded Linux distribution
After initialising and mounting the root file system, Linux starts /sbin/init
which carries on with the user space initialisations including mounting /proc
Most likely your rcS
or whatever configuration init
reads doesn't do that, and you need to tell it to.
If you've got a shell prompt, you can mount /proc
manually with:
mount -t proc p /proc
Note that the /proc
directory must exist before you can mount something there. You should include it in your root image.
2) is very likely because of 1) - ps
uses /proc
to get information about running processes.
1) is either because the initialisation isn't expected to do that or because it fails to do it. Check what the distribution is supposed to do on boot - how the system is to be brought up.
Things you can try:
mount
/proc
, e.g.:mount -t proc proc /proc
- the second argument is arbitrary (it's what shows as the source of the mount). Check what is running with PID=1check in
/proc/cmdline
what parameters your kernel receives on boot. If it containsinit=...
you might need to change it to e.g./sbin/init
or remove it to let kernel try to resolve the init to be run itself. You have to do this in bootloader configuration (for R-Pi this is in some text file on the SD card IIRC).Check that the desired init executable exists - Busybox normaly has tons of symlinks pointing to its binary so that one can use
command [args]
rather thanbusybox command [args]
. Your might be missing those.