linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* udev on real Linux from scratch
@ 2007-05-06  7:55 Gabor Z. Papp
  2007-05-06  8:34 ` Alex Smith
                   ` (15 more replies)
  0 siblings, 16 replies; 17+ messages in thread
From: Gabor Z. Papp @ 2007-05-06  7:55 UTC (permalink / raw)
  To: linux-hotplug

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

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/?

Thanks for the help.

-------------------------------------------------------------------------
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

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: udev on real Linux from scratch
  2007-05-06  7:55 udev on real Linux from scratch Gabor Z. Papp
@ 2007-05-06  8:34 ` Alex Smith
  2007-05-06 11:57 ` Bryan Kadzban
                   ` (14 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Alex Smith @ 2007-05-06  8:34 UTC (permalink / raw)
  To: linux-hotplug

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

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: udev on real Linux from scratch
  2007-05-06  7:55 udev on real Linux from scratch Gabor Z. Papp
  2007-05-06  8:34 ` Alex Smith
@ 2007-05-06 11:57 ` Bryan Kadzban
  2007-05-06 15:39 ` Gabor Z. Papp
                   ` (13 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Bryan Kadzban @ 2007-05-06 11:57 UTC (permalink / raw)
  To: linux-hotplug


[-- Attachment #1.1: Type: text/plain, Size: 683 bytes --]

Gabor Z. Papp wrote:
> mount -n -t proc proc /proc
> 
> mount -n -t sysfs sysfs /sys
> 
> echo "" > /proc/sys/kernel/hotplug
> 
> mount -n -o mode=0755 -t tmpfs tmpfs /dev

At this point, the "standard" udev setup is to copy everything from
/lib/udev/devices to /dev.  That way you get the console and null
devices, the pts and shm directories, and the std{in,out,err} symlinks
automatically (assuming they're in /lib/udev/devices).

Non-udev-aware drivers can also tell their users to create static device
nodes that they will service in this directory (though I don't know if
there are any non-udev-aware drivers anywhere anymore; certainly not in
the kernel).


[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 252 bytes --]

[-- Attachment #2: Type: text/plain, Size: 286 bytes --]

-------------------------------------------------------------------------
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/

[-- Attachment #3: Type: text/plain, Size: 226 bytes --]

_______________________________________________
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

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: udev on real Linux from scratch
  2007-05-06  7:55 udev on real Linux from scratch Gabor Z. Papp
  2007-05-06  8:34 ` Alex Smith
  2007-05-06 11:57 ` Bryan Kadzban
@ 2007-05-06 15:39 ` Gabor Z. Papp
  2007-05-06 19:23 ` Alex Smith
                   ` (12 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Gabor Z. Papp @ 2007-05-06 15:39 UTC (permalink / raw)
  To: linux-hotplug

* Alex Smith <alex@alex-smith.me.uk>:

| IMO it would be wiser to use udevtrigger and udevsettle here rather
| than udevstart because AFAIK udevstart is deprecated and will be
| removed soon.

Thanks, replaced, works fine, except I'm getting 2 errors that was
hidden before the change. udevd complaining about these lines stolen
from slackware config:

ACTION="add", DEVPATH="/devices/*", ENV{PHYSDEVBUS}="?*", WAIT_FOR_SYSFS="bus"

# permissions for IDE CD devices (without symbolic link creation)
BUS="ide", KERNEL="*[!0-9]", ENV{PHYSDEVDRIVER}="ide-cdrom", NAME="%k", GROUP="disk", MODE="0660"

# permissions for IDE floppy devices
BUS="ide", KERNEL="*[!0-9]", ENV{PHYSDEVDRIVER}="ide-floppy*", NAME="%k", GROUP="disk", MODE="0660"

Saying something like PHYSDEV* deprecated and will be removed?

| that udevd needs and does not create. This is what I do on
| Frugalware:

[...]

Thank you Alex.

Two questions left, mounting tmpfs on /dev is ok, or should I use ramdisk?
No need to set (limit) the size of /dev?

Another error I'm getting from udevd:

"the kernel does not support inotify, udevd can't monitor configuration file changes"

-------------------------------------------------------------------------
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

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: udev on real Linux from scratch
  2007-05-06  7:55 udev on real Linux from scratch Gabor Z. Papp
                   ` (2 preceding siblings ...)
  2007-05-06 15:39 ` Gabor Z. Papp
@ 2007-05-06 19:23 ` Alex Smith
  2007-05-07  1:48 ` Bryan Kadzban
                   ` (11 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Alex Smith @ 2007-05-06 19:23 UTC (permalink / raw)
  To: linux-hotplug

Gabor Z. Papp wrote:
> * Alex Smith <alex@alex-smith.me.uk>:
> 
> | IMO it would be wiser to use udevtrigger and udevsettle here rather
> | than udevstart because AFAIK udevstart is deprecated and will be
> | removed soon.
> 
> Thanks, replaced, works fine, except I'm getting 2 errors that was
> hidden before the change. udevd complaining about these lines stolen
> from slackware config:
> 
> ACTION="add", DEVPATH="/devices/*", ENV{PHYSDEVBUS}="?*", WAIT_FOR_SYSFS="bus"
> 
> # permissions for IDE CD devices (without symbolic link creation)
> BUS="ide", KERNEL="*[!0-9]", ENV{PHYSDEVDRIVER}="ide-cdrom", NAME="%k", GROUP="disk", MODE="0660"
> 
> # permissions for IDE floppy devices
> BUS="ide", KERNEL="*[!0-9]", ENV{PHYSDEVDRIVER}="ide-floppy*", NAME="%k", GROUP="disk", MODE="0660"
> 
> Saying something like PHYSDEV* deprecated and will be removed?

Yes, you'll need to replace these sometime. I'm not sure what you should 
replace them with though.

> 
> | that udevd needs and does not create. This is what I do on
> | Frugalware:
> 
> [...]
> 
> Thank you Alex.
> 
> Two questions left, mounting tmpfs on /dev is ok, or should I use ramdisk?
> No need to set (limit) the size of /dev?

mount -n -t ramfs none /dev

I use ramfs ^^

> 
> Another error I'm getting from udevd:
> 
> "the kernel does not support inotify, udevd can't monitor configuration file changes"

Just rebuild your kernel with inotify support - it's under the File 
systems menu in menuconfig IIRC.

-- 
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

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: udev on real Linux from scratch
  2007-05-06  7:55 udev on real Linux from scratch Gabor Z. Papp
                   ` (3 preceding siblings ...)
  2007-05-06 19:23 ` Alex Smith
@ 2007-05-07  1:48 ` Bryan Kadzban
  2007-05-07  7:34 ` Gabor Z. Papp
                   ` (10 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Bryan Kadzban @ 2007-05-07  1:48 UTC (permalink / raw)
  To: linux-hotplug

-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160

Gabor Z. Papp wrote:
> Two questions left, mounting tmpfs on /dev is ok, or should I use 
> ramdisk?

tmpfs works fine for me, and actually I think it should use less RAM
too.  IIUC, ramdisks use RAM for both the block device and the FS cache,
where tmpfs uses only the FS cache.  Plus ramdisks waste any unused
memory, since I don't believe the ramdisk is swappable (where tmpfs is).
:-)

> No need to set (limit) the size of /dev?

No need to, no.  (But if you want to for some reason, I believe tmpfs
gives you that option.)  Files in /dev take up almost no space.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGPoVrS5vET1Wea5wRA5H1AKC1ZkoFCpS7rUAurclr09KbFVaX9ACfaKqa
8eDwu+QB+YxH/wfQu2UhOzc=DszE
-----END PGP SIGNATURE-----

-------------------------------------------------------------------------
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

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: udev on real Linux from scratch
  2007-05-06  7:55 udev on real Linux from scratch Gabor Z. Papp
                   ` (4 preceding siblings ...)
  2007-05-07  1:48 ` Bryan Kadzban
@ 2007-05-07  7:34 ` Gabor Z. Papp
  2007-05-07  8:11 ` Alex Smith
                   ` (9 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Gabor Z. Papp @ 2007-05-07  7:34 UTC (permalink / raw)
  To: linux-hotplug

* Bryan Kadzban <bryan@kadzban.is-a-geek.net>:

| > No need to set (limit) the size of /dev?

| No need to, no.  (But if you want to for some reason, I believe tmpfs
| gives you that option.)  Files in /dev take up almost no space.

And tmpfs reserves the size dinamically?

What about the hotplug part? At the very beginning I'm echoing "" to
the /proc/.../hotplug file. Should I restore that setting to something?

-------------------------------------------------------------------------
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

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: udev on real Linux from scratch
  2007-05-06  7:55 udev on real Linux from scratch Gabor Z. Papp
                   ` (5 preceding siblings ...)
  2007-05-07  7:34 ` Gabor Z. Papp
@ 2007-05-07  8:11 ` Alex Smith
  2007-05-07 12:26 ` Gabor Z. Papp
                   ` (8 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Alex Smith @ 2007-05-07  8:11 UTC (permalink / raw)
  To: linux-hotplug

Gabor Z. Papp wrote:
> * Bryan Kadzban <bryan@kadzban.is-a-geek.net>:
> 
> | > No need to set (limit) the size of /dev?
> 
> | No need to, no.  (But if you want to for some reason, I believe tmpfs
> | gives you that option.)  Files in /dev take up almost no space.
> 
> And tmpfs reserves the size dinamically?
> 
> What about the hotplug part? At the very beginning I'm echoing "" to
> the /proc/.../hotplug file. Should I restore that setting to something?
> 

Yes, doing that is fine since udevd handles events itself so there's no 
need for a separate binary to be called.

-- 
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

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: udev on real Linux from scratch
  2007-05-06  7:55 udev on real Linux from scratch Gabor Z. Papp
                   ` (6 preceding siblings ...)
  2007-05-07  8:11 ` Alex Smith
@ 2007-05-07 12:26 ` Gabor Z. Papp
  2007-05-07 12:39 ` Gabor Z. Papp
                   ` (7 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Gabor Z. Papp @ 2007-05-07 12:26 UTC (permalink / raw)
  To: linux-hotplug

* Alex Smith <alex@alex-smith.me.uk>:

| > What about the hotplug part? At the very beginning I'm echoing "" to
| > the /proc/.../hotplug file. Should I restore that setting to something?

| Yes, doing that is fine since udevd handles events itself so there's
| no need for a separate binary to be called.

Does this mean I should add echo "/sbin/udev" > /proc/sys/kernel/hotplug
or should I leave it as ""?

-------------------------------------------------------------------------
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

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: udev on real Linux from scratch
  2007-05-06  7:55 udev on real Linux from scratch Gabor Z. Papp
                   ` (7 preceding siblings ...)
  2007-05-07 12:26 ` Gabor Z. Papp
@ 2007-05-07 12:39 ` Gabor Z. Papp
  2007-05-07 15:00 ` Dan Nicholson
                   ` (6 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Gabor Z. Papp @ 2007-05-07 12:39 UTC (permalink / raw)
  To: linux-hotplug

* Alex Smith <alex@alex-smith.me.uk>:

| > ACTION="add", DEVPATH="/devices/*", ENV{PHYSDEVBUS}="?*", WAIT_FOR_SYSFS="bus"
| >
| > # permissions for IDE CD devices (without symbolic link creation)
| > BUS="ide", KERNEL="*[!0-9]", ENV{PHYSDEVDRIVER}="ide-cdrom", NAME="%k", GROUP="disk", MODE="0660"
| >
| > # permissions for IDE floppy devices
| > BUS="ide", KERNEL="*[!0-9]", ENV{PHYSDEVDRIVER}="ide-floppy*", NAME="%k", GROUP="disk", MODE="0660"
| >
| > Saying something like PHYSDEV* deprecated and will be removed?

| Yes, you'll need to replace these sometime. I'm not sure what you
| should replace them with though.

Anyone?

-------------------------------------------------------------------------
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

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: udev on real Linux from scratch
  2007-05-06  7:55 udev on real Linux from scratch Gabor Z. Papp
                   ` (8 preceding siblings ...)
  2007-05-07 12:39 ` Gabor Z. Papp
@ 2007-05-07 15:00 ` Dan Nicholson
  2007-05-07 16:30 ` Leisner, Martin
                   ` (5 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Dan Nicholson @ 2007-05-07 15:00 UTC (permalink / raw)
  To: linux-hotplug

On 5/7/07, Gabor Z. Papp <gzp@papp.hu> wrote:
> * Alex Smith <alex@alex-smith.me.uk>:
>
> | > What about the hotplug part? At the very beginning I'm echoing "" to
> | > the /proc/.../hotplug file. Should I restore that setting to something?
>
> | Yes, doing that is fine since udevd handles events itself so there's
> | no need for a separate binary to be called.
>
> Does this mean I should add echo "/sbin/udev" > /proc/sys/kernel/hotplug
> or should I leave it as ""?

Just leave it empty. Then the kernel won't call out to any binary when
uevents are processed. This is fine since all uevents get handled by
udevd anyway.

--
Dan

-------------------------------------------------------------------------
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

^ permalink raw reply	[flat|nested] 17+ messages in thread

* RE: udev on real Linux from scratch
  2007-05-06  7:55 udev on real Linux from scratch Gabor Z. Papp
                   ` (9 preceding siblings ...)
  2007-05-07 15:00 ` Dan Nicholson
@ 2007-05-07 16:30 ` Leisner, Martin
  2007-05-07 17:28 ` Alex Smith
                   ` (4 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Leisner, Martin @ 2007-05-07 16:30 UTC (permalink / raw)
  To: linux-hotplug

I just got udev running on an embedded ppc with kernels 2.6.10 and
2.6.19...

It was somewhat of a nightmare since different udev versions work on
different kernels,
and they have different programs...(like you mention).

I ended up using udev-082...but mixing and matching, I found you're on
your own...

I found the later versions have more options/programs which I found
useful...

marty 

> -----Original Message-----
> From: linux-hotplug-devel-bounces@lists.sourceforge.net 
> [mailto:linux-hotplug-devel-bounces@lists.sourceforge.net] On 
> Behalf Of Alex Smith
> Sent: Sunday, May 06, 2007 4:35 AM
> To: Gabor Z. Papp
> Cc: linux-hotplug-devel@lists.sourceforge.net
> Subject: Re: udev on real Linux from scratch
> 
> 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
> 

-------------------------------------------------------------------------
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

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: udev on real Linux from scratch
  2007-05-06  7:55 udev on real Linux from scratch Gabor Z. Papp
                   ` (10 preceding siblings ...)
  2007-05-07 16:30 ` Leisner, Martin
@ 2007-05-07 17:28 ` Alex Smith
  2007-06-03 19:22 ` DervishD
                   ` (3 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Alex Smith @ 2007-05-07 17:28 UTC (permalink / raw)
  To: linux-hotplug

Leisner, Martin wrote:
> I just got udev running on an embedded ppc with kernels 2.6.10 and
> 2.6.19...
> 
> It was somewhat of a nightmare since different udev versions work on
> different kernels,
> and they have different programs...(like you mention).
> 
> I ended up using udev-082...but mixing and matching, I found you're on
> your own...
> 
> I found the later versions have more options/programs which I found
> useful...
> 
> marty 

Yes, newer udev version rely on the uevent system which was introduced 
in kernel 2.6.15 (IIRC)
-- 
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

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: udev on real Linux from scratch
  2007-05-06  7:55 udev on real Linux from scratch Gabor Z. Papp
                   ` (11 preceding siblings ...)
  2007-05-07 17:28 ` Alex Smith
@ 2007-06-03 19:22 ` DervishD
  2007-06-04  6:47 ` Alexander E. Patrakov
                   ` (2 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: DervishD @ 2007-06-03 19:22 UTC (permalink / raw)
  To: linux-hotplug

    Hi Alex :)

 * Alex Smith <alex@alex-smith.me.uk> dixit:
> > 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.

    Sorry for entering the thread SO late, but I have one question: is
there any (comprehensive?) list out there of the static devices that
must be present so udev can work? Currently I have a bunch of them
created, more or less randomly (probably out of fear that udev won't
work without them but without the need of carrying real tests...).

    I have a do-it-yourself Linux box and I've set up udev by hand. I
just wanted do know if there are a canonical way of choosing which
devices should go to the static /dev.

    Thanks :))

    Raúl Núñez de Arenas Coronado

-- 
Linux Registered User 88736 | http://www.dervishd.net
It's my PC and I'll cry if I want to... RAmen!

-------------------------------------------------------------------------
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

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: udev on real Linux from scratch
  2007-05-06  7:55 udev on real Linux from scratch Gabor Z. Papp
                   ` (12 preceding siblings ...)
  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
  15 siblings, 0 replies; 17+ messages in thread
From: Alexander E. Patrakov @ 2007-06-04  6:47 UTC (permalink / raw)
  To: linux-hotplug

DervishD wrote:
>     Sorry for entering the thread SO late, but I have one question: is
> there any (comprehensive?) list out there of the static devices that
> must be present so udev can work? Currently I have a bunch of them
> created, more or less randomly (probably out of fear that udev won't
> work without them but without the need of carrying real tests...).

Yes, there is. Only /dev/console and /dev/null must be present on real /dev 
(hidden under tmpfs). See 
http://www.linuxfromscratch.org/lfs/view/development/chapter06/udev.html for 
a list of devices and directories to be copied from /lib/udev/devices to 
/dev (tmpfs) on each boot. Note, however, that udev in LFS is slightly 
misconfigured (wrong names for DVB cards, and the create_floppy_devices 
script is never called).

-- 
Alexander E. Patrakov

-------------------------------------------------------------------------
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

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: udev on real Linux from scratch
  2007-05-06  7:55 udev on real Linux from scratch Gabor Z. Papp
                   ` (13 preceding siblings ...)
  2007-06-04  6:47 ` Alexander E. Patrakov
@ 2007-06-04  8:21 ` DervishD
  2007-06-05 18:54 ` Matthew Burgess
  15 siblings, 0 replies; 17+ messages in thread
From: DervishD @ 2007-06-04  8:21 UTC (permalink / raw)
  To: linux-hotplug

    Hi Alexander :)

    It's been a surprise to see you here too, but since you're so
involved with LFS, it was an obvious move ;))

 * Alexander E. Patrakov <patrakov@ums.usu.ru> dixit:
> DervishD wrote:
> >    Sorry for entering the thread SO late, but I have one question: is
> >there any (comprehensive?) list out there of the static devices that
> >must be present so udev can work? Currently I have a bunch of them
> >created, more or less randomly (probably out of fear that udev won't
> >work without them but without the need of carrying real tests...).
> 
> Yes, there is. Only /dev/console and /dev/null must be present on real /dev 
> (hidden under tmpfs).

    Cool, I'll modify my system for that, thanks a lot :)

> See
> http://www.linuxfromscratch.org/lfs/view/development/chapter06/udev.html
> for a list of devices and directories to be copied from
> /lib/udev/devices to /dev (tmpfs) on each boot.

    So, /dev/console, /dev/null and the symlinks for core, stdin/out/err
and fd, right?

> Note, however, that udev in LFS is slightly misconfigured (wrong names
> for DVB cards, and the create_floppy_devices script is never called).

    That's not a problem, I have my own rules already written and
working.

    Thanks a lot, dude :)) BTW, I've downloaded the ISO's you told me
and I'll test as soon as I can reboot my system.

    Raúl Núñez de Arenas Coronado

-- 
Linux Registered User 88736 | http://www.dervishd.net
It's my PC and I'll cry if I want to... RAmen!

-------------------------------------------------------------------------
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

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: udev on real Linux from scratch
  2007-05-06  7:55 udev on real Linux from scratch Gabor Z. Papp
                   ` (14 preceding siblings ...)
  2007-06-04  8:21 ` DervishD
@ 2007-06-05 18:54 ` Matthew Burgess
  15 siblings, 0 replies; 17+ messages in thread
From: Matthew Burgess @ 2007-06-05 18:54 UTC (permalink / raw)
  To: linux-hotplug

On Monday 04 June 2007 07:47:46 Alexander E. Patrakov wrote:
> Note, however, that udev in LFS is slightly
> misconfigured (wrong names for DVB cards, and the create_floppy_devices
> script is never called).

Alexander, I'd guess these are easy enough to fix in LFS?  Would you mind 
creating a bug in LFS' Trac database so we can deal with this?

Thanks,

Matt.


-------------------------------------------------------------------------
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

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2007-06-05 18:54 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-06  7:55 udev on real Linux from scratch Gabor Z. Papp
2007-05-06  8:34 ` Alex Smith
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

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).