LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva
User Name
Password
Mandriva This Forum is for the discussion of Mandriva (Mandrake) Linux.

Notices

Reply
 
Search this Thread
Old 11-27-2004, 01:50 PM   #1
farmerdan
Member
 
Registered: Feb 2004
Location: IA-MO State Line
Distribution: Ubuntu 10.04
Posts: 59

Rep: Reputation: 15
/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 2.6.8.1, 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.

Thanks,

Dan
 
Old 11-28-2004, 11:44 AM   #2
jamyskis
Member
 
Registered: Jan 2004
Location: Paderborn, Germany
Distribution: SuSE 10.0, Ubuntu 5.10
Posts: 56

Rep: Reputation: 15
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.
 
Old 11-28-2004, 02:05 PM   #3
farmerdan
Member
 
Registered: Feb 2004
Location: IA-MO State Line
Distribution: Ubuntu 10.04
Posts: 59

Original Poster
Rep: Reputation: 15
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?

Dan
 
Old 11-28-2004, 03:44 PM   #4
jamyskis
Member
 
Registered: Jan 2004
Location: Paderborn, Germany
Distribution: SuSE 10.0, Ubuntu 5.10
Posts: 56

Rep: Reputation: 15
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.

Cheers
J
 
Old 11-28-2004, 04:27 PM   #5
farmerdan
Member
 
Registered: Feb 2004
Location: IA-MO State Line
Distribution: Ubuntu 10.04
Posts: 59

Original Poster
Rep: Reputation: 15
Hey, jamyskis, thanks for the interest, the info and the questions.

I won't tell anyone about you and KDE 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.

Anyway,
Quote:
...see if your /dev/ttySHF0 is really a device in itself or just linking back to another file.
I found ten what I believe are devices at /sys/class/tty/ttySHF[0,9]/device. That was earlier today and I don't remember what opening those files revealed. Here is an excerpt of what I get when I run the configuration utility for the modem:
Code:
Device Instance:  0-PCI-10b9:5457-103c:0024
HW profile name:  hsfmc97ali
The /dev/modem alias (symlink) points to /dev/ttySHF0
This output plus the files in sysfs lead me to believe that it actually is a device. I remember some of the PCI numbers from looking at my modem in the Mandrake Control Center. I just can't configure it from there.

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.
Quote:
...I don't know much about udev or devfs save that devfs has now been made obsolete and replaced by udev...
You're lucky!!! My head is swimming with char majors and minors, mknods and all the rest. Yes, you're right devfs is obsolete now and has been replaced by udev. If you're running a recent kernel and don't use devfsd, I understand that udev controls /dev now even though you configure devfs into the kernel.

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.

Thanks again.

Dan
 
Old 12-01-2004, 05:18 PM   #6
Kevbo
LQ Newbie
 
Registered: Dec 2004
Location: Australia
Distribution: Mepis
Posts: 1

Rep: Reputation: 0
Cool

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

Cheers, Kevbo
 
Old 12-02-2004, 01:50 AM   #7
jamyskis
Member
 
Registered: Jan 2004
Location: Paderborn, Germany
Distribution: SuSE 10.0, Ubuntu 5.10
Posts: 56

Rep: Reputation: 15
Wink

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

Last edited by jamyskis; 12-02-2004 at 01:53 AM.
 
Old 12-02-2004, 02:15 AM   #8
Anchoret
LQ Newbie
 
Registered: Dec 2004
Location: California
Distribution: DSL & Ubuntu
Posts: 6

Rep: Reputation: 0
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.
 
Old 12-02-2004, 05:34 AM   #9
opjose
Senior Member
 
Registered: Sep 2004
Location: Outlying D.C.
Distribution: Mandriva
Posts: 2,090

Rep: Reputation: 46
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.
 
Old 12-02-2004, 05:41 AM   #10
jamyskis
Member
 
Registered: Jan 2004
Location: Paderborn, Germany
Distribution: SuSE 10.0, Ubuntu 5.10
Posts: 56

Rep: Reputation: 15
Quote:
Originally posted by opjose
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.
Opjose, you're a star. Thanks for that. Could you explain it though in terms that complete novices like myself would understand though? I've looked at my modprobe.conf and couldn't find a single reference to the PCI modem, but then I'm using SuSE, not Mandrake. It's just that I had the same problem.
 
Old 12-02-2004, 07:30 AM   #11
opjose
Senior Member
 
Registered: Sep 2004
Location: Outlying D.C.
Distribution: Mandriva
Posts: 2,090

Rep: Reputation: 46
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


/sbin/modprobe NAMEOFDRIVER

wherein nameofdriver is the hsf file/module you have downloaded.

If needed you can also issue the

ln -s

stuff in there as well if /dev/modem is not created automatically by the modprobe.

/etc/rc.d/rc.local

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.
 
Old 12-27-2004, 03:37 PM   #12
hingo
LQ Newbie
 
Registered: Dec 2004
Distribution: Mandrakelinux
Posts: 1

Rep: Reputation: 0
Lightbulb Quick and dirty solution that works

Hi all

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.

Official solutions:

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:

#!/bin/sh

# 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"
kppp

2) chmod a+x /usr/local/bin/startmodem

3) Create the file /usr/local/lib/hsfenters.txt with content:
y



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

henrik
PS. Lesson learned: I prefer Open Source solutions, not for ideological reasons, but because those are the ones that seems to work.

Last edited by hingo; 12-27-2004 at 03:39 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
reboot deletes /dev/modem link cch2cch Linux - Networking 2 08-23-2005 03:05 PM
pcmcia disappears after reboot dystopia Linux - Laptop and Netbook 1 03-22-2005 07:20 PM
Linuxant driver, /dev/modem disappears after reboot slackist Linux - Newbie 5 10-18-2004 10:22 AM
/dev/modem dissapearing after reboot. naijin Slackware 11 08-07-2004 01:41 PM
NIC Module Disappears upon reboot kernelclink Linux - Newbie 2 03-19-2002 07:06 PM


All times are GMT -5. The time now is 01:50 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration