From: Alex Smith <alex@alex-smith.me.uk>
To: linux-hotplug@vger.kernel.org
Subject: Re: udev on real Linux from scratch
Date: Sun, 06 May 2007 08:34:58 +0000 [thread overview]
Message-ID: <463D9332.6020509@alex-smith.me.uk> (raw)
In-Reply-To: <x63b2av12d@gzp>
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 mode\a55 -t tmpfs tmpfs /dev
>
> mkdir -p /dev/pts
>
> mount -n -o mode\x0620 -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
next prev parent reply other threads:[~2007-05-06 8:34 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-06 7:55 udev on real Linux from scratch Gabor Z. Papp
2007-05-06 8:34 ` Alex Smith [this message]
2007-05-06 11:57 ` Bryan Kadzban
2007-05-06 15:39 ` Gabor Z. Papp
2007-05-06 19:23 ` Alex Smith
2007-05-07 1:48 ` Bryan Kadzban
2007-05-07 7:34 ` Gabor Z. Papp
2007-05-07 8:11 ` Alex Smith
2007-05-07 12:26 ` Gabor Z. Papp
2007-05-07 12:39 ` Gabor Z. Papp
2007-05-07 15:00 ` Dan Nicholson
2007-05-07 16:30 ` Leisner, Martin
2007-05-07 17:28 ` Alex Smith
2007-06-03 19:22 ` DervishD
2007-06-04 6:47 ` Alexander E. Patrakov
2007-06-04 8:21 ` DervishD
2007-06-05 18:54 ` Matthew Burgess
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=463D9332.6020509@alex-smith.me.uk \
--to=alex@alex-smith.me.uk \
--cc=linux-hotplug@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).