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. |
|
 |
12-25-2004, 08:27 PM
|
#1
|
|
LQ Newbie
Registered: Dec 2004
Location: Mexico City
Distribution: Slackware
Posts: 2
Rep:
|
I can`t create a device node in /dev
I have just changed from Slackware 9.1 to 10.0 with kernel 2.6.7 in order to install it on a SATA hard disk. Almost everything is O.K. but some old packages (penggy) needs a device node named "tun" in a subdirectory named "net" under /dev. I created both, as root of course, using
/dev# mkdir /net
/dev# mknod /dev/net/tun c 10 200
and also I need a symlink to /dev/ttyS0 named "modem"
/dev# ln -s /dev/ttyS0 modem
I do this things succesfully but when I shut down my computer and turn it on again.....the subdirectory, the device node and the symlink just have gone!!!
So every time I start my computer I need to do such task
Does anyone know how to fix this?
Is this behavior due to any new kernel feature?
Thank you very much in advance
|
|
|
|
12-25-2004, 08:35 PM
|
#2
|
|
Member
Registered: May 2004
Location: Somewhere over there!!!
Distribution: Too many to list here...
Posts: 93
Rep:
|
Perhaps it has something to do with udev! What is the output of this command when your systen is up,
df
y2k
|
|
|
|
12-26-2004, 07:40 AM
|
#3
|
|
Senior Member
Registered: Nov 2003
Location: Knoxville, TN
Distribution: Kubuntu 9.04
Posts: 1,168
Rep:
|
I'm having same prob with Mandrake 10.1 and penggy. Says:
"unable to open /dev/net/tun"
then some more crud about trying 2.2 kernel method before:
"Fatal error, exiting."
So I'm guessing if the 2.4 and 2.2 methods don't work there must be a new 2.6 method?
Last edited by Crito; 12-26-2004 at 07:43 AM.
|
|
|
|
12-26-2004, 08:38 AM
|
#4
|
|
Member
Registered: Nov 2003
Distribution: slackware 14
Posts: 530
Rep:
|
Hi, as Y2K said it is related to udev/hotplug.
"udev" is the new method used by 2.6 kernel series to manage device nodes within the system.
Basically udev creates device nodes only for the hardware that is actually present into the system.
Any device node you create manually on the current session will not be re-created on the further boot automatically, you must specify your requirements through "udev" configuration files and scripts.
"udev" is not that hard to be properly managed, but at least it requires you read some basics of the method.
The udev basics can be found on /usr/doc/udev-026/docs/writing_udev_rules.
While you get more confident with them you can create the nodes you need (persistently) editing your /etc/rc.d/rc.local as follows:
if [ `uname -r` = "2.6.7" ]; then # This avoid the node is created using different kernels (ie 2.4.26).
/bin/mkdir /dev/net
/bin/mknod /dev/net/tun c 10 200
fi
Hope this helps
Ciao
Last edited by urka58; 12-26-2004 at 08:40 AM.
|
|
|
|
12-26-2004, 02:26 PM
|
#5
|
|
LQ Newbie
Registered: Dec 2004
Location: Mexico City
Distribution: Slackware
Posts: 2
Original Poster
Rep:
|
Thank you very much for the advises.
I start to read the document related to udev and follow the urka58's suggestion about make an entry on rc.local to create the directory, the node and the symlink. I did that but in a special file that exists for the purpose
/etc/udev/scripts/make_extra_nodes.sh
which is invoked from
/etc/rc.d/rc.udev
this is what I add at the bottm of the first file
# Device and Symlink needed for Penggy
if [ ! -r /dev/net/tun ]; then
mkdir /dev/net
mknod -m 666 -c /dev/net/tun 10 200
fi
if [ ! -r /dev/modem ]; then
ln -s /dev/ttyS0 /dev/modem
fi
Now penggy is alive
and I don't need to connect to Internet trough  Windows
Again Thank you very much.
|
|
|
|
02-20-2005, 08:56 AM
|
#6
|
|
LQ Newbie
Registered: Feb 2005
Distribution: Mandrake 10.1
Posts: 3
Rep:
|
First, Linux newb here. Have decided to go "cold turkey" by dumping M$ Windoze.
Thanks to urka58 and gcasados I was able to understand why penggy was "torn down" after my pc was restarted. I have attempted to use both examples but cannot get the node to rebuild automatically. There has to be something I'm overlooking. Although I can create the node manually, having it done during boot-up would be a plus. Any assistance would be greatly appreciated.
yelnats
|
|
|
|
02-20-2005, 04:42 PM
|
#7
|
|
Member
Registered: Nov 2003
Distribution: slackware 14
Posts: 530
Rep:
|
Hi yelnats,
I'd suggest you start a new thread, you'll have more possibily someboby responds you.
Anyway, if you are able to create the node manually and your software works, it must be possible a script do it for youa t boot.
Can you give more details what did you tried up to now?
Ciao
|
|
|
|
02-20-2005, 05:15 PM
|
#8
|
|
LQ Newbie
Registered: Feb 2005
Distribution: Mandrake 10.1
Posts: 3
Rep:
|
Hi urka58, thanks for the reply. I thought about making a new thread but did not want to a typical noob thing and make someone mad. Anyway, I copied the script in your reply to gcasados. My rc.local file contains this:
if [ uname -r = "2.6.8" ]; then
/bin/mkdir /dev/net
/bin/mknod -m 666 -c /dev/net/tun c 10 200
fi
I added those lines to the file as su, made the changes, saved the file and exited terminal. No joy, it still does not rebuild automatically. I then tried gcasados' scripts and no joy there either. Like I said, I can enter it manually and penggy works great every time, just would be nice for it to happen when I restart the pc. Even so, I still need to do more reading (and understanding) on writing udev rules.
Thanks again.
Regards,
yelnats
|
|
|
|
02-21-2005, 05:17 AM
|
#9
|
|
Member
Registered: Nov 2003
Distribution: slackware 14
Posts: 530
Rep:
|
Hi yelnats,
may be you just wrote it wrong, but there are a couple of backquotes missing in your script.
In order you get 2.6.8 (possibly) you should edit as follows:
if [ `uname -r` = "2.6.8" ]; then ----------------> note the backquotas
/bin/mkdir /dev/net
/bin/mknod /dev/net/tun c 10 200
fi
I don' t know if necessary, but the link to /dev/modem is missing as well.
I wouldn't care for the moment to give the correct permissions to the node, but if you want the command is
chmod 666 /dev/net/tun
Hope this helps
Ciao
|
|
|
|
| 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 02:32 AM.
|
|
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
|
|