Best use of mdev?
Bernhard Fischer
rep.dot.nop at gmail.com
Fri May 2 00:28:44 PDT 2008
On Fri, May 02, 2008 at 12:49:33AM +1000, Michael D. Setzer II wrote:
>-----BEGIN PGP SIGNED MESSAGE-----
>Hash: SHA1
>
>I was just contacted by a user that has 11 partitions on a large hard disk. My
>g4l project currently has the nods setup as being precreated in the /dev
>directory. It had massive number of these for both the hd and sd going all
>the way to sdp but only to the 9th option. I was manually able to create a
>script to create the additional nods, but then started looking at options to
>have it automaticly create the proper nods. I have found the mdev, and
>seem to have figured some of it out, but think there might be some
>additional things to make it work better.
>
>I booted from the g4l cd, and did the following manually.
>
>created the /etc/mdev.conf with these two lines.
>
>hd[a-z][0-9]* 0:3 660
>sd[a-z][0-9]* 0:3 660
>
>Run the commands to create the /dev
>
>mkdir /sys
>mount -t sysfs sysfs /sys
>mdev -s
>
>Below is the original contents of the /dev directory minus all the hd and sd
>files. Not sure which all of these can also be created with the mdev.conf file
>and which have to be manually created. Also, some of the directories were
>for raid systems that users had. Would the mdev create these?
>Unfortunately, I don't have all the hardware to test.
I usually only have /dev/null and /dev/console and create all the rest
via mdev.
$ egrep -v "(^#|^$)" box/root/etc/inittab
::sysinit:/bin/mount -t proc none /proc
::sysinit:/bin/mount -t sysfs none /sys
::sysinit:/bin/mount -t tmpfs -o size=64k,mode=0755 none /dev
::sysinit:/bin/mkdir /dev/pts
::sysinit:/bin/mount -t devpts devpts /dev/pts
::sysinit:/bin/echo /sbin/mdev > /proc/sys/kernel/hotplug
::sysinit:/sbin/mdev -s
::sysinit:/bin/mount -o remount,rw /
::sysinit:/bin/mount -a
::sysinit:/bin/hostname -F /etc/hostname
::sysinit:/etc/init.d/rcS
HTH,
More information about the busybox
mailing list