Hacker News new | past | comments | ask | show | jobs | submit login

Not trying to nit pick but I am among the group who did not realize there is a distinction between sysV init and RC files.

Is it possible to use one without the other?




Sure thing!

/sbin/init is pid=1, the single process that the kernel starts when a system boots. It typically runs a command to kick off bringing up userland to the correct runlevel, maybe something like "/etc/rc.d/rc 3". It doesn't do anything more than just execute this command.

The command is part of the RC system. Typically written in shell, it handles walking /etc/rc.*/ and running the scripts contained therein to configure and invoke the various services for a particular runlevel.

You can boot linux using your own init and skip the rc system. From grub, add "init=/bin/sh" to your kernel parameters and you will get a shell as pid=1 and no other processes -- from there you can run commands as you wish to bring your system the rest of the way up. If you were to run "/etc/rc.d/rc 3" by hand you would invoke the same scripts that normally run on bootup to runlevel 3.

You could also delete all these shell scripts and replace them with your own code for configuring the system.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: