June 2017
Intermediate to advanced
478 pages
13h 14m
English
You will find that on both platforms the ps command doesn't work. This is because the proc filesystem has not been mounted yet. Try mounting it:
# mount -t proc proc /proc
Now, run ps again, and you will see the process listing.
A refinement to this setup would be to write a shell script that mounts proc, and anything else that needs to be done at boot-up. Then, you could run this script instead of /bin/sh at boot. The following snippet gives an idea of how it would work:
#!/bin/sh/bin/mount -t proc proc /proc# Other boot-time commands go here/bin/sh
The last line, /bin/sh, launches a new shell that gives you an interactive root shell prompt. Using a shell as init in this way is very handy for quick hacks, for example, ...
Read now
Unlock full access