Init Scripts

Bruce Dubbs bruce.dubbs at
Fri Feb 5 11:29:13 PST 2010

Hops Error, Line 21, alcoholi.c wrote:

> But there are two parts of the Linux OS that have always eluded me:
> init scripts, and device drivers. 

Google for 'writing linux device drivers'.  It's not arcane magic, but 
you do need assembly language and to know the hardware.

For initi scripts, just read  /etc/rc.d/init.d/rc.  It's only about 100 
lines long.  It's initiated by init and specifed in /etc/inittab.  For 

l3:3:wait:/etc/rc.d/init.d/rc 3

Just read the man page for inittab to undeerstand that.

> udev works great for me :D That's the problem, though- it's a mysterious
> black box that performs miracles flawlessly and endlessly. I hate
> those.

To really understand what is going on here, you need to dive into the 
internals of the kernel.  Basically, when a device generates an 
interrupt at the hardware level, the kernel needs to deal with it.  udev 
looks at anything the kernel doesn't know explicitly how to deal with 
and sets up devices in user space (/dev) according to rules. This is 
integrated with the /sys tree and is pretty complicated.

   -- Bruce

More information about the blfs-support mailing list