2

I'm building an OpenWRT image (Chaos Calmer) that needs BusyBox to be configured to use init. So, in the busybox configuration, I enter the Init Utilities menu, then enable init, as well as support for reading an inittab file.

When my image finishes building, it contains the following /etc/inittab file:

::sysinit:/etc/init.d/rcS S boot
::shutdown:/etc/init.d/rcS K shutdown
::askconsole:/bin/ash --login

This looks fine to me, except that /etc/init.d/rcS does not exist. If I load this image onto the router, it obviously fails to boot with the following messages:

init started: BusyBox v1.23.2 (2019-08-29 09:26:36 CDT)
Bad inittab entry at line 3
can't run '/etc/init.d/rcS': No such file or directory

How should this be resolved? Am I supposed to add my own /etc/init.d/rcS? If so, how should that be done (i.e., as its own OpenWRT package)? Is there a standard/default rcS script I can use as a template? Is there a configuration option to include this file that I may have missed? And why does it think the inittab entry on line 3 is wrong?

-1

It is said , openWrt is using procd for init work. So there is no /etc/init.d/rcS anymore.

1

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.