Le Mercredi 24 Octobre 2001 08:55, Borsenkow Andrej scribit : > And I forgot to say that I removed 'cp /lib/dev-state /dev' from > rc.sysinit long ago because with this line both my systems were hanging > with 2.4.10 already.
There's a very good IBM article concerning devfs and in the last part ( http://www-106.ibm.com/developerworks/linux/library/l-fs6/?open&t=grl,l=252,p=lfs6 ) they talk about the use of /dev-state. The use the new bind ability of mount. but they also make a cp ( from their init wrapper ) : mount -n /dev /dev-state -o bind mount -n -t devfs none /dev if [ -d /dev-state/compat ] then echo Copying devices from /dev-state/compat to /dev cp -ax /dev-state/compat/* /dev fi fi /sbin/devfsd /dev >/dev/null 2>&1; fi exec /sbin/init.system $* --------------- Device persistence However, if everything is OK, we perform the devfs setup that I covered at the end of my last article: /dev is bind-mounted to /dev-state and a devfs filesystem is mounted at /dev. Then, we perform a step that I didn't mention last article; we check for the existence of a /dev-state/compat directory and recursively copy its contents to /dev. While this procedure may seem a bit redundant at first (we're going to be taking advantage of devfsd's device persistence features, aren't we?) it turns out to be necessary and useful. The reason why we need a compat directory is that devfsd's persistence features only work with devfs-enabled drivers. So, if you happen to be using a non-devfs kernel module, you'll need to create a device node in /dev manually. The problem with this approach is that this new device node will be ignored by devfsd, meaning that the next time you reboot, it will disappear. Our solution to this problem is to have the /dev-state/compat directory; if you have a non-devfs module, simply create your old-style device nodes in /dev-state/compat and they will be manually added to the devfs filesystem at boot time, thanks to the considerate steps of our handy init wrapper. Finally, we start up devfsd, and then exit the conditional and exec our real init, /sbin/init.system to begin the standard system boot process. Well, everything's standard except for the fact that we now have a devfs-enabled system! :) -- http://perso.wanadoo.fr/linux_wizard/index.html - L'amour n'est pas aveugle, il est atteint de presbytie. La preuve, c'est qu'il ne commence � distinguer les d�fauts que lorsqu'il s'�loigne. Miguel Zamaco�s
