LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
 
Search this Thread
Old 07-21-2007, 12:51 AM   #1
melee
Member
 
Registered: Sep 2004
Location: Austin, TX
Distribution: Ubuntu, CentOS
Posts: 86

Rep: Reputation: 15
device settings need to be reentered after each reboot...


Hi all. Linux n00blet here. I'm having a bit of an issue with my laptop. Here are the important bits: Toshiba A75-S211 running Slackware 11.0 with the 2.6.17.13 kernel. I am using a usb to serial converter (I forget the maker, but it's a model pl2303). I connected the device to the laptop and ran
Code:
dmesg | grep tty
with the following results:
Code:
usb 1-2: pl2303 converter now attached to ttyUSB0
I started
Code:
minicom -s
and set the serial port to /dev/ttyUSB0. I saved and exited and then started minicom up again. I got a "cannot find /dev/ttyUSB0, device does not exist" error. With a little googling I found that if I enetered
Code:
mknod /dev/ttyUSB0 c 188 0
minicom would start up with no problems. Now my problem is, whenever I reboot, I have to enter the mknod command again. I don't understand this... I suppose I could just enter the mknod command into my rc.local file, but that seems like cheating..

I want to know why the changes aren't being saved, and why the /dev/ttyUSB0 isn't showing up in the first place even though dmesg shows it when I connect/disconnect the adapter?

Any thoughts or ideas?
 
Old 07-21-2007, 02:37 AM   #2
pdw_hu
Member
 
Registered: Nov 2005
Location: Budapest, Hungary
Distribution: Slackware, Gentoo
Posts: 346

Rep: Reputation: Disabled
I'd just put these commands in rc.local.
 
Old 07-22-2007, 02:58 AM   #3
melee
Member
 
Registered: Sep 2004
Location: Austin, TX
Distribution: Ubuntu, CentOS
Posts: 86

Original Poster
Rep: Reputation: 15
Anyone else have any ideas?
 
Old 07-22-2007, 03:44 AM   #4
tobyl
Member
 
Registered: Apr 2003
Location: uk
Distribution: slackware current
Posts: 743

Rep: Reputation: 51
I think udev should pick up your ttyUSB0 device automatically. Udev has improved dramatically over the past year or so, so an upgrade may be worth considering.


Have a look in /etc/udev/rules.d (paths may vary slightly as I have a later version)

If you look around, you should see something like this

# serial or dialout devices
KERNEL=="ttyS[0-9]*", NAME="tts/%n", SYMLINK+="%k", GROUP="uucp", MODE="0660"
KERNEL=="ttyUSB[0-9]*", NAME="tts/USB%n", SYMLINK+="%k", GROUP="uucp", MODE="0660"
KERNEL=="ippp0", NAME="%k", GROUP="uucp"
KERNEL=="isdn*", NAME="%k", GROUP="uucp"
KERNEL=="dcbri*", NAME="%k", GROUP="uucp"
KERNEL=="ircomm*", NAME="%k", GROUP="uucp"

If you do, you could check that you are in the correct group, or change the perms to MODE="0666" on the KERNEL=="ttyUSB[0-9]*" line

Even if this doesn't do it, I think udev is the area you need to investigate

tobyl

Last edited by tobyl; 07-22-2007 at 03:46 AM.
 
Old 07-22-2007, 05:46 AM   #5
melee
Member
 
Registered: Sep 2004
Location: Austin, TX
Distribution: Ubuntu, CentOS
Posts: 86

Original Poster
Rep: Reputation: 15
hmm, well, I thought you might be onto something there tobyl.... I checked out /etc/udev/rules.d and looked through every file in the directory. The only one pertinant was the udev.rules.
Quote:
If you do, you could check that you are in the correct group, or change the perms to MODE="0666" on the KERNEL=="ttyUSB[0-9]*" line
I did this and rebooted. no dice. I added the ttyUSB0 again and rebooted. No dice again... hmm. I went looking for the
Quote:
# serial or dialout devices
KERNEL=="ttyS[0-9]*", NAME="tts/%n", SYMLINK+="%k", GROUP="uucp", MODE="0660"
KERNEL=="ttyUSB[0-9]*", NAME="tts/USB%n", SYMLINK+="%k", GROUP="uucp", MODE="0660"
KERNEL=="ippp0", NAME="%k", GROUP="uucp"
KERNEL=="isdn*", NAME="%k", GROUP="uucp"
KERNEL=="dcbri*", NAME="%k", GROUP="uucp"
KERNEL=="ircomm*", NAME="%k", GROUP="uucp"
section, but couldn't find it in any of the files. I thought that it might also be in the network-devices.rules file, but it wasn't. I double checked the udev.rules file to make sure the change I made hadn't reverted back, but it was still at 0666.

Thanks for trying tobyl, it's much appreciated.
 
Old 07-23-2007, 01:05 AM   #6
rworkman
Slackware Contributor
 
Registered: Oct 2004
Location: Tuscaloosa, Alabama (USA)
Distribution: Slackware
Posts: 1,997

Rep: Reputation: Disabled
In a Slackware 11.0 box, /etc/udev/rules.d/udev.rules should have the following:
Code:
# tty devices
KERNEL=="console",      NAME="%k", GROUP="tty", MODE="0600"
KERNEL=="tty",          NAME="%k", GROUP="tty", MODE="0666"
KERNEL=="tty[0-9]*",    NAME="vc/%n",  SYMLINK+="%k", GROUP="tty"
KERNEL=="ttyS[0-9]*",   NAME="tts/%n", SYMLINK+="%k", GROUP="tty"
KERNEL=="ttyUSB[0-9]*", NAME="tts/USB%n", GROUP="tty", MODE="0660"
This is one of the ways in which udev has improved since then - you will notice that in 11.0, this would create a /dev/tts/USB0 device node, so you wouldn't have a /dev/ttyUSB0 that you need. In 12.0, however, it creates the same device node, but also creates a symlink to it at /dev/ttyUSB0 so that things which expect it to be there will still be able to access it.

Create a custom udev rules file -- /etc/udev/rules.d/10-local.rules is what I suggest -- and add this line to it:
Code:
KERNEL=="ttyUSB[0-9]*", NAME="tts/USB%n", GROUP="tty", MODE="0660", SYMLINK+="%k"
and that should fix you right up. :-)
 
Old 07-23-2007, 03:33 AM   #7
melee
Member
 
Registered: Sep 2004
Location: Austin, TX
Distribution: Ubuntu, CentOS
Posts: 86

Original Poster
Rep: Reputation: 15
Quote:
Create a custom udev rules file -- /etc/udev/rules.d/10-local.rules is what I suggest -- and add this line to it:
my system really didn't like that...

I created the file with the entry you recommended and then rebooted. Upon reboot and startx, kde crashed. On top of that, the issue still wasn't fixed. I rebooted again to see if it was just a random thing, but kde crashed again. I deleted the file and rebooted, kde works like a charm.... wierd.


Quote:
In a Slackware 11.0 box, /etc/udev/rules.d/udev.rules should have the following:

Code:
# tty devices
KERNEL=="console", NAME="%k", GROUP="tty", MODE="0600"
KERNEL=="tty", NAME="%k", GROUP="tty", MODE="0666"
KERNEL=="tty[0-9]*", NAME="vc/%n", SYMLINK+="%k", GROUP="tty"
KERNEL=="ttyS[0-9]*", NAME="tts/%n", SYMLINK+="%k", GROUP="tty"
KERNEL=="ttyUSB[0-9]*", NAME="tts/USB%n", GROUP="tty", MODE="0660"
My system does indeed have that entry...



Quote:
This is one of the ways in which udev has improved since then - you will notice that in 11.0, this would create a /dev/tts/USB0 device node, so you wouldn't have a /dev/ttyUSB0 that you need.
hmmm, that would seem to be the case except, when I do a ls /dev/tts, the only devices listed are "0 1 2 4", which are obviously the Serial device nodes.

It seems like one part of the system is detecting the USB device, but another part isn't...


Thanks for the help guys, keep it coming...

 
  


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
storing settings on reboot d00bid00b Slackware 7 04-16-2006 03:58 AM
Save settings on reboot PipeDreams Mandriva 8 03-24-2006 07:41 AM
Settings get reset on reboot xymian Debian 3 02-23-2005 04:53 AM
hdparm settings after reboot Crashed_Again Linux - General 1 03-04-2004 06:43 AM
Can't get xawtv to keep settings on reboot BlankFrank Linux - Software 0 02-27-2004 01:53 PM


All times are GMT -5. The time now is 10:48 AM.

Main Menu
Advertisement
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