From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alex Smith Date: Sun, 06 May 2007 08:34:58 +0000 Subject: Re: udev on real Linux from scratch Message-Id: <463D9332.6020509@alex-smith.me.uk> List-Id: References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org Gabor Z. Papp wrote: > Hello, > > the udev FAQ pointed me to this list. > > Time hit me too, and started to migrating from 2.4 kernels to 2.6. :-P > > I have some questions that not really clear to me, I think this part > of documentation could be expanded too. :-) > > First of all, someone could take a look at this init process and > confirm me its ok, or something still wrong. Finally got working /dev > directory with this setup, but I'm not sure its correct: > > mount -n -t proc proc /proc > > mount -n -t sysfs sysfs /sys > > echo "" > /proc/sys/kernel/hotplug > > mount -n -o mode55 -t tmpfs tmpfs /dev > > mkdir -p /dev/pts > > mount -n -o mode20 -t devpts devpts /dev/pts > > udevd --daemon > > udevstart IMO it would be wiser to use udevtrigger and udevsettle here rather than udevstart because AFAIK udevstart is deprecated and will be removed soon. > > My /etc/udev dir is mostly empty (only the default udev.conf exist) > and will fill up the rules.d/ dir depending on my needs. > I'm not starting any other udev* related program. > The original /dev/ directory has only console device. > > Well, my another important question is, that starting udevd --daemon > gives me a "cannot open /dev/null" error message. > > I have found this message in the udevd.c file around line 1018: > > /* make sure std{in,out,err} fd's are in a sane state */ > fd = open("/dev/null", O_RDWR); > if (fd < 0) { > fprintf(stderr, "cannot open /dev/null\n"); > err("cannot open /dev/null"); > } > > Should I create /dev/null after mounting tmpfs on /dev/? Yes, after mounting tmpfs you should create some initial device nodes that udevd needs and does not create. This is what I do on Frugalware: # Create initial device nodes. mknod -m 600 /dev/console c 5 1 mknod -m 666 /dev/null c 1 3 # Create extra links that Udev does not create for us ln -snf /proc/self/fd /dev/fd ln -snf /proc/self/fd/0 /dev/stdin ln -snf /proc/self/fd/1 /dev/stdout ln -snf /proc/self/fd/2 /dev/stderr ln -snf /proc/kcore /dev/core HTH, Alex -- Alex Smith Frugalware Linux developer - http://www.frugalware.org ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net Linux-hotplug-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel