Slackware This Forum is for the discussion of Slackware Linux.
|
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
08-12-2006, 07:14 PM
|
#1
|
|
Member
Registered: Oct 2004
Location: Norway
Distribution: Slackware, CentOS
Posts: 633
Rep:
|
udev: /dev/ directory over-populated - why?
Just had a diskcrash and did a clean install of -current (Saturday) on a laptop.
For some reason, the /dev directory looks just like pre-udev days, with hda1,hda2,hda3 etc, hdb*, hdc*, hdd* and so on.
Why does udev fully populate my /dev directory?
And also, when I boot the system complains that root file system is of wrong format etc, but still mounts it well. Also complains about tmpfs and swap, even though top reports that swap is present (though never used)
My fstab:
Code:
/dev/hda2 swap swap defaults 0 0
/dev/hda1 / reiserfs defaults 1 1
/dev/hda3 /export reiserfs defaults 1 2
/dev/cdrom /mnt/cdrom auto noauto,owner,users,ro 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
proc /proc proc defaults 0 0
scanner /proc/bus/usb usbfs auto,devmode=0666 0 0
majestix:/files /files nfs defaults 0 0
/dev/ipod30gb /mnt/ipod30gb vfat noauto,owner,users 0 0
/dev/ipodnano /mnt/ipodnano vfat noauto,owner,users 0 0
/dev/mem_red /mnt/mem_red vfat noauto,owner,users 0 0
/dev/mem_big /mnt/mem_big vfat noauto,owner,users 0 0
My /etc/udev/rules.d/10-local.rules is:
Code:
# Sony USB CD/DVD-RW
BUS="usb", KERNEL="sr[0-9]*", SYSFS{manufacturer}="Sony", SYSFS{serial}="DRX-510
ULK_CED011664", NAME="%k", GROUP="cdrom", MODE="0666", SYMLINK="dvd cdrom"
# Canon USB Scanner
BUS="usb", SYSFS{product}="CanoScan", MODE="0666", SYMLINK="scanner"
# iPod 30GB and iPod Nano
BUS="usb", SYSFS{product}=="iPod", SYSFS{serial}=="000A270014DA3027", KERNEL="sd
?2", NAME="%k", SYMLINK="ipod30gb", MODE="0666"
BUS="usb", SYSFS{product}=="iPod", SYSFS{serial}=="000A2700129F41E7", KERNEL="sd
?2", NAME="%k", SYMLINK="ipodnano", MODE="0666"
# Memory Stick(s)
KERNEL="sd*", SYSFS{idVendor}=="0c76", NAME="%k", MODE="0666" SYMLINK="mem_big"
KERNEL="sd*", SYSFS{idVendor}=="0ef5", NAME="%k", MODE="0666" SYMLINK="mem_red"
# Palm Pilot
KERNEL="ttyUSB[0-9]*", NAME="tts/USB%n", SYSFS{product}="Palm Handheld", GROUP=
"tty", MODE="0666", SYMLINK="pilot"
I run 2.6.16.27 from get-go, disabled hotplug and have 755 permissions on rc.udev.
ps -ef | grep -i udev gives:
Code:
root 1021 1 0 01:35 ? 00:00:00 /sbin/udevd --daemon
As this is a clean install there are obviously no .new files in /etc/rc.d/ and furthermore, the custom rules I have created are no longer working, as the /dev/cdrom appears to be static, and the memory sticks don't get their correct device aliases either...
This previously worked with -current as of 10 days ago.
Anyone? Did I miss something in the changelog?
-Y1
Last edited by Yalla-One; 08-12-2006 at 07:20 PM.
|
|
|
|
08-13-2006, 12:55 AM
|
#2
|
|
Member
Registered: Mar 2006
Distribution: Slackware64 14 (kernel 3.7.1)
Posts: 79
Rep: 
|
Yalla,
Quote:
|
Why does udev fully populate my /dev directory?
|
If you examine the /etc/udev/rules.d/udev.rules file you will see that udev will re-create most of the typical devices seen in the /dev directory.
As for your custom rules not working, the syntax for udev rules may have become more strict in the latest version (see the end of this thread):
http://www.linuxquestions.org/questi...d.php?t=472262
|
|
|
|
08-13-2006, 03:09 AM
|
#3
|
|
Member
Registered: Oct 2004
Location: Norway
Distribution: Slackware, CentOS
Posts: 633
Original Poster
Rep:
|
2 problems down, one to go...
Thanks much regis_n_bits - you were spot on!
Quote:
|
Originally Posted by regis_n_bits
If you examine the /etc/udev/rules.d/udev.rules file you will see that udev will re-create most of the typical devices seen in the /dev directory.
|
Is there any benefit to this, or is this added purely for compatibility only? In my previous endevour with udev071 this was not the case and was not a problem. Do you know any links to where this might be documented?
Quote:
|
Originally Posted by regis_n_bits
|
Can't believe I missed the new rules - thanks much - changed to == and += and now it works like a charm.
However, there's one last problem: When udev starts, it prints out this error message:
Code:
mount: wrong fs type, bad option, bad superblock on tmpfs,
missing codepage or other error
In some cases useful info is found in syslog - try
dmesg | tail or so
mkdir: cannot create directory `/dev/pts': File exists
mount: usbfs already mounted or /proc/bus/usb busy
mount: according to mtab, usbfs is already mounted on /proc/bus/usb
Starting udevd: /sbin/udevd --daemon
See my fstab entry in initial post in this thread.
dmesg gives no hint, but syslog has:
Code:
Aug 13 10:08:17 asterix pcmcia-socket-startup: error in file 'config.opts' line 56: syntax error, unexpected STRING, expecting $end or INCLUDE or EXCLUDE
-Y1
Last edited by Yalla-One; 08-13-2006 at 03:10 AM.
|
|
|
|
08-13-2006, 01:47 PM
|
#4
|
|
Member
Registered: Mar 2006
Distribution: Slackware64 14 (kernel 3.7.1)
Posts: 79
Rep: 
|
Good to see that your first two problems were easy to fix.
Quote:
|
Is there any benefit to this, or is this added purely for compatibility only? In my previous endevour with udev071 this was not the case and was not a problem. Do you know any links to where this might be documented?
|
Yeah I think it is only for compatibility. If you were really adventurous you could modify the files to reduce the number of devices created, but you really wouldn't gain anything (or worse you could corrupt something). Here is a link to a good document about udev rules:
http://www.reactivated.net/writing_udev_rules.html
For your mounting problem, the following lines are from the udev.rules file:
Code:
# Mount tmpfs on /dev:
if ! grep -E -q "^[^[:space:]]+ /dev tmpfs" /proc/mounts; then
# umount shm if needed
if grep -E -q "^[^[:space:]]+ /dev/shm tmpfs" /proc/mounts; then
umount -l /dev/shm
fi
# Umount pts if needed, we will remount it later:
if grep -E -q "^[^[:space:]]+ /dev/pts devpts" /proc/mounts; then
umount -l /dev/pts
fi
# Mount tmpfs on /dev:
# the -n is because we don't want /dev umounted when
# someone (rc.[06]) calls umount -a
mount -n -o mode=0755 -t tmpfs tmpfs /dev
# Remount pts:
mkdir /dev/pts
mount -n -o mode=0620,gid=5 -t devpts devpts /dev/pts
# Mount usbfs:
if [ -d /proc/bus/usb ]; then
mount usbfs -t usbfs /proc/bus/usb -o devgid=10,devmode=0666
fi
fi
This is where the first error message originates. I'm not really sure why you are getting these errors. I'll have to find out what the /dev directory is supposed to look like before udev starts.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 12:34 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|