Skip to contentSkip to conversation

udev for /dev

DISCUSSION Jon Smirl 7 participants 16 messages Feb 20, 2004 – Feb 28, 2004

lore
Share & tools
lore

Jon Smirl

author
#0 lore raw

I managed to get it running on Fedora but not without a lot of trouble.

First question, isn't there a script for rebuilding the /dev directory? I need to rebuild mine since I stopped udev when it was pointing at /dev and it deleted half the nodes. This is an easy accident to happen, I edited my system for the new config and rebooted. I forgot that udev was running. It picked up /dev instead of /udev from the newly edited config and deleted the nodes out of the wrong directory on shutdown.

Second issue, I was forced to put a single device, /dev/console into /dev to make this work. I discovered this because I had deleted all of the common nodes out of /dev. Apparently it needs to be there in the transition from initrd to the boot device. Can this be avoided? This is a real mess if you delete /dev/console. I spent a couple of hours with my rescue disk before I figured out what happened.

Third issue, make install does not install a decent set of default permissions. It took me a while to figure out that X wouldn't start because it didn't have permissions on /dev/null and /dev/random.

==Jon Smirl
[email protected]

__________________________________
Do you Yahoo!?
Yahoo! Mail SpamGuard - Read only the mail you want.
http://antispam.yahoo.com/tools

-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id56&alloc_id438&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

author
#1 lore raw

I'm also getting errors about fd0 and sit0 that I'll track down tomorrow.

==Jon Smirl
[email protected]

__________________________________
Do you Yahoo!?
Yahoo! Mail SpamGuard - Read only the mail you want.
http://antispam.yahoo.com/tools

-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id56&alloc_id438&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

author
#2 lore raw
In reply to Jon Smirl

More missing devices, /dev/aumix, /dev/dsp. These are from the OSS compatibility layer in ALSA.

==Jon Smirl
[email protected]

__________________________________
Do you Yahoo!?
Yahoo! Mail SpamGuard - Read only the mail you want.
http://antispam.yahoo.com/tools

-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id56&alloc_id438&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

#3 lore raw
In reply to Jon Smirl
Quoted 6 lines · Jon Smirl

First question, isn't there a script for rebuilding the /dev directory? I need to rebuild mine since I stopped udev when it was pointing at /dev and it deleted half the nodes. This is an easy accident to happen, I edited my system for the new config and rebooted. I forgot that udev was running. It picked up /dev instead of /udev from the newly edited config and deleted the nodes out of the wrong directory on shutdown.

I think MAKEDEV generic will recreate your /dev nodes

Signature · 2 lines
John L. Fjellstad
web: http://www.fjellstad.org/          Quis custodiet ipsos custodes
#4 lore raw
In reply to Jon Smirl
Quoted 2 lines · Jon Smirl

More missing devices, /dev/aumix, /dev/dsp. These are from the OSS compatibility layer in ALSA.

They're here with 2.6.3.

Signature · 12 lines
http://www.pervalidus.net/contact.html


-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id56&alloc_id438&op=click
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
#5 lore raw
In reply to Jon Smirl
Quoted 3 lines · Jon Smirl

I managed to get it running on Fedora but not without a lot of trouble.

First question, isn't there a script for rebuilding the /dev directory?

If it's to rebuild the static /dev that came with your distribution, reinstall the appropriate package. Probably dev-*.

Quoted 6 lines

I need to rebuild mine since I stopped udev when it was pointing at /dev and it deleted half the nodes. This is an easy accident to happen, I edited my system for the new config and rebooted. I forgot that udev was running. It picked up /dev instead of /udev from the newly edited config and deleted the nodes out of the wrong directory on shutdown.

This is silly. If I understand, you had udev in /udev, edited /etc/udev/udev.conf, pointed it to /dev, and rebooted. I did it several times, but probably didn't notice anything because was using devfs.

Quoted 7 lines

Second issue, I was forced to put a single device, /dev/console into /dev to make this work. I discovered this because I had deleted all of the common nodes out of /dev. Apparently it needs to be there in the transition from initrd to the boot device. Can this be avoided? This is a real mess if you delete /dev/console. I spent a couple of hours with my rescue disk before I figured out what happened.

The same here. init needs it.

Quoted 4 lines

Third issue, make install does not install a decent set of default permissions. It took me a while to figure out that X wouldn't start because it didn't have permissions on /dev/null and /dev/random.

Check the etc/udev in the sources. It has some examples.

Signature · 12 lines
http://www.pervalidus.net/contact.html


-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id56&alloc_id438&op=click
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
#6 lore raw
In reply to Jon Smirl
Quoted 2 lines · Jon Smirl

More missing devices, /dev/aumix, /dev/dsp. These are from the OSS compatibility layer in ALSA.

You need to configure module-init-tools to automatically load snd_{pcm,mixer}_oss after snd_{pcm,mixer} are loaded.

Signature · 13 lines
ciao, |
Marco | [4689 diLhsz2ewWBf2]


-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id56&alloc_id438&op=click
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
author
#7 lore raw
In reply to Jon Smirl
Quoted 8 lines · --- Marco d'Itri
Quoted 1 line · Jon Smirl

More missing devices, /dev/aumix, /dev/dsp. These are from the OSS

compatibility

Quoted 1 line

layer in ALSA.

You need to configure module-init-tools to automatically load snd_{pcm,mixer}_oss after snd_{pcm,mixer} are loaded.

I have these modules loaded. OSS compatibily was working before I switched to udev for /dev. The problem is that these modules don't export their devices under /sys so udev doesn't make device nodes for them.

I'm missing three classes of devices so far:
1) ALSA OSS compatibilty
2) floppies
3) sitX, network tunnel

The script for recreating /dev is in /dev called MAKEDEV. I couldn't find it because udev was masking /dev.

I used the gentoo permission file. It has enough permissions in it that Fedora will work. There probably needs to be a specific one built for Fedora.

I've also checked that you can boot with a single console device in /dev. mknod /dev/console c 5 1

==Jon Smirl
[email protected]

__________________________________
Do you Yahoo!?
Yahoo! Mail SpamGuard - Read only the mail you want.
http://antispam.yahoo.com/tools

-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id56&alloc_id438&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

#8 lore raw
In reply to Jon Smirl
Quoted 3 lines · Jon Smirl

I have these modules loaded. OSS compatibily was working before I switched to udev for /dev. The problem is that these modules don't export their devices under /sys so udev doesn't make device nodes for them.

No, they do (at least on my system).

Signature · 13 lines
ciao, |
Marco | [4690 trpLapDhPnVLA]


-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id56&alloc_id438&op=click
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
author
#9 lore raw
In reply to Jon Smirl

I see the problem now, the OSS modules are not loading in the right order for udev to work. Now I just need to figure out how to fix it.

Loading them manually works.

Quoted 22 lines · --- Marco d'Itri
Quoted 1 line · Jon Smirl

I have these modules loaded. OSS compatibily was working before I switched

to

Quoted 2 lines

udev for /dev. The problem is that these modules don't export their devices under /sys so udev doesn't make device nodes for them.

No, they do (at least on my system).

Signature · 13 lines
ciao, |
Marco | [4690 trpLapDhPnVLA]


-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id56&alloc_id438&op=click
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

==Jon Smirl
[email protected]

__________________________________
Do you Yahoo!?
Yahoo! Mail SpamGuard - Read only the mail you want.
http://antispam.yahoo.com/tools

-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id56&alloc_id438&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

#10 lore raw
In reply to Jon Smirl
Quoted 6 lines · Frédéric L. W. Meunier
Quoted 1 line · Jon Smirl

First question, isn't there a script for rebuilding the /dev directory?

If it's to rebuild the static /dev that came with your distribution, reinstall the appropriate package. Probably dev-*.

or just run MAKEDEV generic-i386 in /dev/

Quoted 9 lines
Quoted 7 lines

Second issue, I was forced to put a single device, /dev/console into /dev to make this work. I discovered this because I had deleted all of the common nodes out of /dev. Apparently it needs to be there in the transition from initrd to the boot device. Can this be avoided? This is a real mess if you delete /dev/console. I spent a couple of hours with my rescue disk before I figured out what happened.

The same here. init needs it.

no, no one *needs* it ... i think i posted an e-mail here about it before but it's only 'needed' if you want to see output before the *getty apps are started. the kernel will open that device node before executing init so that init will have the proper stdout file descriptor to write to. if you dont have /dev/console, the kernel prints the warning about not being able to open it, and then just runs init which works *fine* without the node. -mike

author
#11 lore raw
In reply to Jon Smirl

Any ideas on why alsactl is working and gnome-alsamixer isn't? I open up gnome-alsamixer and the screen is blank. That's the way it behaves when alsa is not loaded.

I fixed the OSS problem by modprobing in snd_mixer_oss earlier.

Quoted 22 lines · --- Marco d'Itri
Quoted 1 line · Jon Smirl

I have these modules loaded. OSS compatibily was working before I switched

to

Quoted 2 lines

udev for /dev. The problem is that these modules don't export their devices under /sys so udev doesn't make device nodes for them.

No, they do (at least on my system).

Signature · 13 lines
ciao, |
Marco | [4690 trpLapDhPnVLA]


-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id56&alloc_id438&op=click
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

==Jon Smirl
[email protected]

__________________________________
Do you Yahoo!?
Yahoo! Mail SpamGuard - Read only the mail you want.
http://antispam.yahoo.com/tools

-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id56&alloc_id438&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

author
#12 lore raw
In reply to Jon Smirl
Quoted 3 lines · --- Jon Smirl

Any ideas on why alsactl is working and gnome-alsamixer isn't? I open up gnome-alsamixer and the screen is blank. That's the way it behaves when alsa is not loaded.

This one is caused by a normal user not being able to write to /dev/snd/controlC?
The permissions file needs to be changed to allow this on Fedora.

==Jon Smirl
[email protected]

__________________________________
Do you Yahoo!?
Yahoo! Mail SpamGuard - Read only the mail you want.
http://antispam.yahoo.com/tools

-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id56&alloc_id438&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

#13 lore raw
In reply to Jon Smirl

this worked fine on the first attempt on sorcerer..... this is GREAT
thanks a lot for this
JLM

-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id56&alloc_id438&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

author
#14 lore raw
In reply to Jon Smirl
Quoted 10 lines · --- Mike Frysinger
Quoted 1 line

The same here. init needs it.

no, no one *needs* it ... i think i posted an e-mail here about it before but it's only 'needed' if you want to see output before the *getty apps are started. the kernel will open that device node before executing init so that init will have the proper stdout file descriptor to write to. if you dont have /dev/console, the kernel prints the warning about not being able to open it, and then just runs init which works *fine* without the node. -mike

Redhat stops the boot process with an error if /dev/console can't be opened. Only choice is to reboot the system. Maybe they adjust this in FC2 if they integrate udev.

==Jon Smirl
[email protected]

__________________________________
Do you Yahoo!?
Get better spam protection with Yahoo! Mail.
http://antispam.yahoo.com/tools

-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id56&alloc_id438&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

#15 lore raw
In reply to Jon Smirl
Quoted 11 lines · Jon Smirl
Quoted 10 lines · --- Mike Frysinger
Quoted 1 line

The same here. init needs it.

no, no one *needs* it ... i think i posted an e-mail here about it before but it's only 'needed' if you want to see output before the *getty apps are started. the kernel will open that device node before executing init so that init will have the proper stdout file descriptor to write to. if you dont have /dev/console, the kernel prints the warning about not being able to open it, and then just runs init which works *fine* without the node. -mike

Quoted 3 lines

Redhat stops the boot process with an error if /dev/console can't be opened. Only choice is to reboot the system. Maybe they adjust this in FC2 if they integrate udev.

Works for me here without that node, running rawhide (which is almost FC2).

thanks,

greg k-h

-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id56&alloc_id438&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel