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.
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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?
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?
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
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
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.
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
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.
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
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.