/dev/modem Disappears on Reboot
I just changed to Mandrake Official 10.1 Powerpack on my Compag Pressario 2100 laptop. Because of the apic problems with kernel 220.127.116.11, I "upgraded" my 10.1 to 10.0 to run kernel 2.6.3-17mdk. The problem arises when I try to install my winmodem.
I have a licensed version of the hsfmodem rpm. I installed it and ran the hsfconfig script. It built all the modules, put all the scripts in place, ran depmod, etc. It makes /dev/ttySHF0 and then a symlink /dev/modem which points to it. And all is well.
However, when I reboot and try to run Kppp, I get the message that it cannot find /dev/modem. In fact, both /dev/modem and /dev/ttySHF0 have gone away and I must run hsfconfig each time I start the laptop. All files, modules and scripts, are still present. Modprobe.conf contains all the required load and alias lines, but the two devices from /dev are gone.
The modem worked fine in 10.0. I have no clue on where to start troubleshooting. I don't know whether or not this situation comes from Mandrake now using udev by default or not. Even though it does, I'm going to try to install the devfsd daemon to see if it helps.
In the meantime, I will welcome all ideas and suggestions.
I've had the same problem under SuSE 9.1, so I don't think the problem lies with the fact that it's Mandrake. I've taken a look in my dev directory and found that the dev/modem has also disappeared.
That's interesting to hear--err read.
Since I posted this the other day I have learned that udev and devfs don't play well together and that Mandrake has gone to udev. It reads sysfs for devices and then saves the info in a config file. It does this IF there is an appropriate name for the device. I'm still trying to learn how to work this.
Additionally, Mandrake has something else new(?)--dkms. I believe it's Dynamic Kernel Module System. I can't find very much documentation on this thing.
As I learn more about this situation, I'll keep posting here.
Do you also have a Conexant modem and use hsfmodem?
I'm not sure, it's an old PCI modem that I pinched from an old prebuilt PC, although lspci and KDE cannot seem to agree on what the modem actually is. lspci reports it as a Philips SmartPCI 56K modem and the KDE autodetect reports it as being from Creatix Polymedia. Because I'm not an expert, I tend to be very reliant on KDE (bad idea, I know, although I do more or less know my way around the command line) so I've used Kinternet which I do believe runs through wvdial to dial-up its connections. I am aware that wvdial does have problems with /dev/null though I suspect that this is nothing to do with the problem here.
I did a bit of digging around and found that configuring the modem at my end (like I said, I used the KDE Control Centre but I suspect that hsfmodem would produce the same results) produced a device link at /dev/pts with name of either 40 or 41. There was also a link placed at /dev/ttySL0 and this link was also linked to at /dev/modem. dev/ttySL0 and dev/modem were still there after a reboot, but /dev/pts/4x had disappeared without a trace, rendering the two links pretty useless. The lesson from this is to see if your /dev/ttySHF0 is really a device in itself or just linking back to another file. If so, see if you can find out what file that would be and why it keeps disappearing afterwards.
I must admit that I don't know much about udev or devfs save that devfs has now been made obsolete and replaced by udev. You'll have to let me know if there's anything on this being the cause of this hassle.
Hey, jamyskis, thanks for the interest, the info and the questions.
I won't tell anyone about you and KDE :tisk: although I'm quite adicted to it. I'm getting better on the commandline as time goes on. One of these days, I want to build my own distro so that I don't have to go through things like this.
I'm trying not to let my intuition sway my troubleshooting process, but I'm confident that this is a udev thing. I just need to learn more about it.
Anyway, back to the laptop. I'm almost afraid to put Mandrake 10.1 on this PC. I'm running 9.2 now and I have only a very few problems.
I'll post more as I learn more.
...I have the same problem on a Mepis (Debian) distribution using a 2.6.7 kernel and a Conexant HSF modem. I can't say I noticed this problem though, when I was on the 2.4.26 kernel.
Please keep digging...I suspect more people will be affected by this as they move up to the 2.6 kernels.
*Keeps digging* Nope, still haven't found anything!
That would sound about right, because SuSE 9.1 Personal uses a 2.6.4 kernel. Given that I'm not really into compiling my own kernel, it might be a bit tricky to attempt to install 2.6.9 (the newest one) given that it probably won't make much difference. I need to learn to do that sometime though. I would rather avoid snapshot releases (2.6.10 is available as one)
I've had a similar problem with 10.1 Official.
I have an external USR Sportster modem on COM1 that's several years old - probably the most common external modem in the world - and Mandrake simply can't configure it during installation. I got it configured after install with DrakX and managed to get it to connect to my ISP once and it's never been found again.
There are a lot of bugs in this version - Konqueror won't load, KDE stopped loading, menus refer to radio buttons that don't exist, etc. etc. - and I can't really cope with the downward spiral of problems on my very simple, whitebread system.:(
The OS is supposed to pull the wagon while I ride, not the other way around.
Yeah, the problem is that the modprobe tries to install the driver far to EARLY in the boot process which is why your device entries disappear.
At the modprobe point, the softmodem cannot be detected as a PCI device and the modprobe itself fails to install the kernel drivers.
What you need to do is instead place the startup for the hsf drivers much further in the boot process.
Try adding a line to say, /etc/rc.local to do this.
You will not find any reference to the PCI modem on your modprobe.conf file.
What you want to do is edit /etc/rc.d/rc.local
Go down to the end of the file and add a line which says something like
wherein nameofdriver is the hsf file/module you have downloaded.
If needed you can also issue the
stuff in there as well if /dev/modem is not created automatically by the modprobe.
is executed AFTER all services are up but before the machine is turned over to you, so to speak, so it's the primary place to put in any tweaks or changes that you may want started automatically at boot.
Quick and dirty solution that works
This problem has been discussed in the mandrakeclub forum, with input from the wise man bgmilne: http://forum.mandrakeclub.com/viewtopic.php?t=31082
The executive summary is (as you have concluded) that hsfconfig doesn't know that Mandrake 10.1 uses udev, and therefore the configuration disappears after reboot. Kernel modules and everything else are still installed and loaded and should work, the only problem is that /dev/modem (and /dev/ttyWhatever) has disappeared.
The official solution is, that you should be able to use DrakConnect and it should do the right thing where hsfconfig fails. But hey, when have the tools in Mandrake Control Center ever done anything right? Once again, there is some bug somewhere and it's just not worth bothering.
The real problem is, that with udev you should create a file in /etc/udev/rules.d/ that makes the /dev/modem permanent. I tried this with the information from the Mandrakeclub thread, and I think the modem might have been working, but X broke for me, so I had to remove the file.
A working solution:
The thing is, after you have run hfsconfig the first time, it remembers your answers and the next time you just need to answer one 'y' and press alot of enters. So it is not really that big a deal to rerun hsfconfig every time you need the modem. In fact this is easy to automate with a script and you can even call kppp at the end of the script so it becomes very convenient.
Here are instructions to make the script I used to solve the problem, (you need to be root):
0) Run hsfconfig once and check that the modem works.
1) Create a file /usr/local/bin/startmodem with contents:
# Mdk 10.1 uses udev and linuxant configuration programs don't.
# The program hsfconfig works, but after reboot /dev/modem has disappeared.
# Using DrakConnect should configure the udev part correctly, but
# let's face it, have the Draktools ever worked like they should for you?
# So the easiest solution is to just rerun hsfconfig after each reboot.
# This script should take care of it. And it starts kppp for you as well.
kdesu "/usr/sbin/hsfconfig < /usr/local/lib/hsfenters.txt"
2) chmod a+x /usr/local/bin/startmodem
3) Create the file /usr/local/lib/hsfenters.txt with content:
(this is the letter 'y' followed with a lot of newlines)
4) Optionally use DrakMenu to add a menuentry to call the program "startmodem"
Now, when you want to connect to the internet, instead of using kppp (or whatever) you use startmodem. It needs the root password, but that's the only drawback. After it finishes you are in kppp and ready to dial. kppp is not run with root privileges.
Hope this helps someone, it was the working solution for me at least.
PS. Lesson learned: I prefer Open Source solutions, not for ideological reasons, but because those are the ones that seems to work.
|All times are GMT -5. The time now is 06:44 AM.|