3

I using embedded Linux, I have compiled the kernel without initramfs and kernel is booting fine. But It shows me rcS file is not found I have put it in /etc/init.d/rcS and my rcS file look like

#!/bin/sh
echo "Hello world"

After the file system is mounted by the kernel it prints Hello world.

Can any one tell/explain me why this file is require and how could I start those start up scripts in particular order?

I am using Raspberry Pi with busybox and it works fine but get I got stuck in the startup.

4

/etc/init.d/rcS allows you to run additional programs at boot time. Its typical use is to mount additional filesystems (only the root filesystem is mounted at that point) and launch some daemons.

Usually rcS is a shell script, which can easily be customized on the fly. Typical distributions make rcS a simple script that executes further scripts in /etc/rcS.d (the exact location is distribution-dependent); this allows each daemon to be package with its own init script. The file /etc/rc.local is also executed by rcS if present; it is intended for commands written by the system administrator.

With the traditional SysVinit implementation of init, /etc/init.d/rcS is listed in /etc/inittab (the sysinit setting). With BusyBox, you can also supply an inittab (if the feature is compiled in) but there is a built-in default that makes it read /etc/init.d/rcS (among other things).

1
  • great, Its very helpful to me ... Thanks @Gilles – Shantanu Banerjee Nov 20 '12 at 4:37
1

/etc/init.d/rcS generally kicks off the scripts in /etc/rcS.d/

here's mine:

$ cat /etc/init.d/rcS
#! /bin/sh
#
# rcS
#
# Call all S??* scripts in /etc/rcS.d/ in numerical/alphabetical order
#

exec /etc/init.d/rc S


$ ls /etc/rcS.d/
README  S25brltty  S37apparmor  S55urandom  S70x11-common

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.