SlackwareThis 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.
Distribution: OpenSuse 10.2, Slackware 11, Solaris 10
Posts: 415
Rep:
/dev/ gets reset after every startup
Hi,
I own a USB modem, which I access in Linux through a driver available from www.smlink.com
I've been using this driver since ages, but now a problem is really bugging me
in Kernel2.6.7 (I used the driver even with this kernel, it worked fine, but now I have a big problem)
the driver sets up devices in /dev/ called slusb0, slusb1, slusb2, slusb3
through these I dial to net, but now everytime I startup linux, these files are deleted, and I have to install the driver anew.
SO I end up installing the driver at every startup.
I dont know why /dev is reset after every start up
OK now another problem has emerged
before using these devices, one goes modprobe slusb, to enable them to be used by kppp etc.
But now when I go modprobe slusb, it goes:
Invalid kernel module format
Even after reinstalling the driver it says tha, great now I can't even reinstall the driver!!!!
I also reinstalled the kernel from /testing, but its the same shit, but this was never happened before.
I'm using the driver in kernel2.4.26 now, any advice?
1. You happily ran 2.4.x with/without hotplug, but NO udev.
2. You played with a new kernel and enabled udev
3. Now, either:
a. Your hotplug doesn't start by itself, or
b. Your hotplug starts but you screwed up choosing right modules.
Tell if this sound about true, and we'll try to compensate.
Distribution: OpenSuse 10.2, Slackware 11, Solaris 10
Posts: 415
Original Poster
Rep:
Quote:
1. You happily ran 2.4.x with/without hotplug, but NO udev.
Well, I installed Slackware 10, which comes with 2.4.26, now I dont know if that has udev enabled or not.
Quote:
2. You played with a new kernel and enabled udev
True, in a sense, you see the /testing kernel worked fine, but I compiled a custom kernel, which didnt go well at all, but I still did a make modules_install, and make install, after that the kernel behaved unpredictably, even when I reinstalled the /testing kernel.
Quote:
3. Now, either:
a. Your hotplug doesn't start by itself, or
b. Your hotplug starts but you screwed up choosing right modules.
Well I think my hotplug works fine, because I dont have problems with other devices!
Anyway, I reinstalled slack10, but I still want a custom kernel compile for kernel-2.6.7, how should I do it without messing it up again?
Your problem is almost definately udev. When you install the driver, it makes a new device in /dev, right? udev recreatesd the /dev directory everytime you reboot. You will need to make a rule to make that device when you boot up. Sorry I can't be more help, as I'm still learning how to use udev properly. Now you know what you need to look for, though.
Unfortunately, I didn't have a problem with my /dev entries. "Unfortunately" because it didn't give me a reason to learn tweaking hotplug yet.
Look in /etc/hotplug. it has lotsa script. Some of them, I am sure deal with creating /dev entries for hardware hotplug finds. Poke around, and see where you can stick a mkdev slusb0, slusb1, slusb2, slusb3 or something.
In your case, the matters are complicated by one more thing: usbfs. It also has to work. So getting the config of kernel is very important.
EDIT: I just looked at the manufacturer's site, and the installation info here
It seems
1. the modules are for 2.4.x kernels only (they have .o extensions) and
2. there is no "patching" of the kernel, just compiling on the side - System.map is not updated with these modules => no wonder hotplug and udev don't detect it - no hooks in the kernel for it.
Also, the install script does this (once)
Quote:
- create character tty device entry '/dev/ttySL0' with major
number 212 and symbolic link 'dev/modem'.
Your problem is that the standard 2.4.26 kernel doesn't use udev ie. all the /dev files are made at install time.
When you installed the 2.6.7 kernel the /dev folder was under control of udev therefore it was cleared a every reboot, all of the unused /dev devices are now missing.
to reinstall these mount your slack10 disk1 and do:
Code:
su
[password]
upgradepkg --reinstall /mnt/cdrom/slackware/a/devs*.tgz
exit
then reboot.
If you are using udev, add any extra devices for to /etc/udev/scripts/make_extra_nodes.sh
"man mknod" if you are not using udev.
Originally posted by irfanhab why does udev exists afterall the problems it creates?
All the previous kernels were compiled from source and I never had a problem until now.
What triggered udev to recreate /dev/ upon startup?
The UDEV is an option in kernel config. Either you:
a. did not enable it before when you config'ed the kernel, or
b. It is a glitch in 2.6.8.1 that affects your particular hardware.
c. you did not compile the drivers for you modem correctly this time.
Why the hell did you switch to 2.6.8.1 if other recent 2.6.x work fine? I know why I switched, Bluetooth was finally merged in at 2.6.8. You, seems, can easily go back to even the 2.6.7 shipped with Slack (CD2, /testing folder) It's not that old, and I liked it a lot. Just do that, and follo what Tuttle suggested.
Originally posted by suslik The UDEV is an option in kernel config. Either you:
a. did not enable it before when you config'ed the kernel, or
b. It is a glitch in 2.6.8.1 that affects your particular hardware.
c. you did not compile the drivers for you modem correctly this time.
Why the hell did you switch to 2.6.8.1 if other recent 2.6.x work fine? I know why I switched, Bluetooth was finally merged in at 2.6.8. You, seems, can easily go back to even the 2.6.7 shipped with Slack (CD2, /testing folder) It's not that old, and I liked it a lot. Just do that, and follo what Tuttle suggested.
Irfanhab, if you go back to 2.4.26 you can copy your 2.4.26 setup from /proc/config.gz and the use that to "make oldconfig" on any newer kernels, this will give you the same setup as you originally had and will only prompt you for any new kernel features.
Distribution: At home: Arch, OpenBSD, Solaris. At work: CentOS, Debian, Ubuntu
Posts: 3,625
Rep:
Udev exists because device file naming and numbering has grown to be an awful pain (or so I understand) and devfs (an old way of managing /dev that worked from within the kernel) was problematic for its own set of reasons. There's a little more info in the udev FAQ.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.