2009-08-05 19:00:24 +00:00
|
|
|
[[!meta title="About init dependencies"]]
|
2009-07-23 17:21:39 +00:00
|
|
|
|
|
|
|
|
2009-08-05 19:12:28 +00:00
|
|
|
As i started to hack on [cinit](http://unix.schottelius.org/cinit/) again,
|
2009-07-23 17:21:39 +00:00
|
|
|
I tried to get it running on Debian in a VM.
|
|
|
|
|
|
|
|
I took the old configuration from my last computer and tried to boot
|
|
|
|
with cinit, which failed, because the udev stuff changed.
|
|
|
|
|
2009-08-05 19:12:28 +00:00
|
|
|
So I added a udev service, which uses /etc/init.d/udev for switching on.
|
2009-07-23 17:21:39 +00:00
|
|
|
|
|
|
|
After booting the VM, I recognized, that the service
|
|
|
|
***mount/proc*** (which mounts /proc...) fails. Mount claims that
|
|
|
|
/proc it is already mounted!
|
|
|
|
|
2009-08-05 19:00:24 +00:00
|
|
|
This is caused by the udev script, which contains:
|
2009-07-23 17:21:39 +00:00
|
|
|
|
2009-08-05 19:00:24 +00:00
|
|
|
237 [ -d /proc/1 ] || mount -n /proc
|
2009-07-23 17:21:39 +00:00
|
|
|
|
2009-08-05 19:00:24 +00:00
|
|
|
Besides the problematic of using a sys-v-init script with an
|
|
|
|
intelligent init system, it's interesting to see, **why**
|
|
|
|
this happens:
|
2009-07-23 17:21:39 +00:00
|
|
|
|
2009-08-05 19:12:28 +00:00
|
|
|
The service mount/root needs the device files in /dev
|
2009-08-05 19:00:24 +00:00
|
|
|
to be able to run mount/root/fsck (the filesystem check).
|
2009-07-23 17:21:39 +00:00
|
|
|
|
2009-08-05 19:12:28 +00:00
|
|
|
Thus mount/root requires the service udev to be started before.
|
2009-07-23 17:21:39 +00:00
|
|
|
|
2009-08-05 19:12:28 +00:00
|
|
|
The service mount/proc needs the root filesystems writable,
|
|
|
|
to write into /etc/mtab and thus needs mount/root.
|
2009-07-23 17:21:39 +00:00
|
|
|
|
2009-08-05 19:00:24 +00:00
|
|
|
This also demonstrates the problematic of the historical grown
|
|
|
|
init scripts, which do way more than one job and their lack of
|
|
|
|
real dependencies.
|
2009-07-23 17:21:39 +00:00
|
|
|
|
2009-08-05 19:00:24 +00:00
|
|
|
[[!tag unix]]
|