LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 04-16-2003, 05:10 PM   #1
yan1
LQ Newbie
 
Registered: Apr 2003
Distribution: Slackware 9.0
Posts: 7

Rep: Reputation: 0
Slack9 networt setup prob: rc.inet1 executed before rc.hotplug


In the orginal rc.M script of Slackware 9.0 rc.inet1 is executed before the rc.hotplug script.

-----------------<snip>--------------------------
# Initialize the networking hardware:
if [ -x /etc/rc.d/rc.inet1 ]; then
. /etc/rc.d/rc.inet1
fi
# Initialize the hotplugging subsystem for PCI, Cardbus, and USB devices:
if [ -x /etc/rc.d/rc.hotplug -a -r /proc/modules ]; then
# Don't run hotplug if 'nohotplug' was given at boot.
if ! grep nohotplug /proc/cmdline 1> /dev/null 2> /dev/null ; then
. /etc/rc.d/rc.hotplug start
fi
fi
-----------------<snip>------------------------

This canīt work (at least for me), cause in rc.inet1 the ip addresses are being set for the devices (with ifconfig), but the hardware devices (eth0 and so on) arenīt initialized yet (that happens during the hotplug).
So everyone who is having problems with such error messages:

Configuring eth0:
ifconfig eth0 192.168.1.1 broadcast 192.168.1.255 netmask 255.255.255.0
SIOCSIFADDR: No such device
eth0: unknown interface: No such device
SIOCSIFBRDADDR: No such device
eth0: unknown interface: No such device
SIOCSIFNETMASK: No such device

just exchange those two entrys in rc.M.
I hope i am right with the things I wrote, cause i am a slackware newbie.

greetings
 
Old 04-16-2003, 08:10 PM   #2
Excalibur
Senior Member
 
Registered: Jun 2002
Location: Northern VA, USA
Distribution: Ubuntu
Posts: 1,180

Rep: Reputation: 45
Additional information on the Slack startup scripts:

If the problem is that the network device module is not loaded yet, then it is not really a hotplug issue. The network module should be loaded from rc.netdevice and that script is called from the rc.modules script. The script rc.modules is called near the end of the rc.S script which is the first script run after control is passed from init and before going multi-user (rc.M).

The rc.netdevice script is created by the netconfig setup script if it detects a module supported network adapter and then creates it if required. The Slack setup program offers to run netconfig during the install, but you can skip it if you choose to do so. A problem here could exist if you configure manually and do not load the module or change your NIC card without changing the module to load in rc.netdevice. Changing from a custom kernel with builtin NIC support to a stock kernel with module support without seting up the rc.netdevice would create the same symptoms.

If the system hasn't been configured to load the proper NIC module, then it would fall back to the hotplug system to load it. With the default scripts that would be loading the modules too late for the network config.

Perhaps it will help to clarify the issue to some extent.
 
Old 04-17-2003, 02:34 PM   #3
yan1
LQ Newbie
 
Registered: Apr 2003
Distribution: Slackware 9.0
Posts: 7

Original Poster
Rep: Reputation: 0
During installation I just configured a loopback network with netconfig, but after installation I started netconfig again and setup it up with a static ip address. But no rc.netdevice was created by netconfig (I just tried this again.) and my network hardware is very common.
 
Old 04-17-2003, 07:12 PM   #4
yan1
LQ Newbie
 
Registered: Apr 2003
Distribution: Slackware 9.0
Posts: 7

Original Poster
Rep: Reputation: 0
Okay, I tested everything again. The netconfig creates a rc.network file if you choose the dhcp setup (but not for static IP setup). And it only configures one ethernet-card. If you have more than one in your box, you have to set up the rest manually.
I think this is a bit confusing. In my opinion netconfig should either setup all networkcards (in every setup option) or leave them completely alone.
 
Old 04-17-2003, 08:14 PM   #5
carboncopy
Senior Member
 
Registered: Jan 2003
Location: Malaysia
Distribution: Fedora Core, Slackware, Mac OS X, Debian, OpenSUSE
Posts: 1,210
Blog Entries: 4

Rep: Reputation: 45
This has been the case since Slackware 8. And probably much earlier.

Yuh, confusing. Cause I didn't know about that until I was messing around with those config files.

Cheers. Now you know. Hehehe...
 
Old 04-19-2003, 07:26 PM   #6
Excalibur
Senior Member
 
Registered: Jun 2002
Location: Northern VA, USA
Distribution: Ubuntu
Posts: 1,180

Rep: Reputation: 45
Well, I experimented with the netconfig script and found that it always probes and creates the rc.netdevice script when DHCP is chosen. It never does when loopback only is chosen, no NIC required. However, when Static IP is chosen, it will test if a NIC on eth0 is available in /proc/net/dev. If eth0 present then it does not probe or create the rc.netdevice script. If eth0 is not present then it will probe and create rc.netdevice. So then for static IP the script considers if eth0 support is provided by the kernel or module that is otherwise loaded.

So your problem appeared when you chose loopback only on initial setup and then run netconfig later manually and chose static IP assignment. And it wouldn't work because the NIC module was actually loaded by rc.hotplug that executes too late for network configuration. The module being loaded by rc.hotplug prevented the netconfig script from doing the proper setup because it detected eth0 present.

The problem would not have appeared in earlier versions of Slack because the hotplug system is new to Slack 9.

I will pass this thread to Slack support so they can evaluate the problem.
 
Old 04-20-2003, 02:15 AM   #7
nickoljt
LQ Newbie
 
Registered: Apr 2003
Distribution: RedHat 7.3/Slackware 9
Posts: 1

Rep: Reputation: 0
I have experienced this issue as well. I am using a LinkSys USB ethernet device and get my IP via DHCP. I found that hotplugging this device didn't work with the default hotplug scripts. I quickly hacked the default script "/etc/hotplug/net.agent" as follows. Hotplugging and booting the system now brings up the device and results in a connection. Obviously the other devices are broken and I didn't spend any time to avoid this, but as it is, my needs are met. Any improvements would be a good thing!

Original "net.agent"
-----------------------------------------------

<snip>
case $ACTION in
register)

case $INTERFACE in
# interfaces that are registered after being "up" (?)
ppp*|ippp*|isdn*|plip*|lo*|irda*)
debug_mesg assuming $INTERFACE is already up
exit 0
;;
# interfaces that are registered then brought up
*)
# NOTE: network configuration relies on administered state,
# we can't do much here without distro-specific knowledge
# such as whether/how to invoke DHCP, set up bridging, etc.

# Slackware Linux:
if [ -x /etc/rc.d/rc.inet1 ]; then
# Interface already up? If so, skip.
if /sbin/ifconfig | grep "^${INTERFACE} " 1> /dev/null ; then
debug_mesg run rc.inet1
exec /etc/rc.d/rc.inet1
fi
# RedHat and similar
elif [ -x /sbin/ifup ]; then
debug_mesg invoke ifup $INTERFACE
exec /sbin/ifup $INTERFACE
else
mesg "how do I bring interfaces up on this distro?"
fi
;;
esac
mesg $1 $ACTION event not handled
;;
</snip>


Hacked "net.agent"
-----------------------------------------------

<snip>
case $ACTION in
register)

case $INTERFACE in
eth*)
exec /etc/rc.d/rc.inet1
;;
esac
mesg $1 $ACTION event not handled
;;
</snip>
 
Old 04-21-2003, 12:24 PM   #8
DavidPhillips
Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,154

Rep: Reputation: 56
I have RedHat 6.1 and it too will run the eth0 initialization and fail before loading the nic pccard. However whet the pccard is loaded the nic is initialized and becomes the first available eth?
 
  


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
How to configure networt by systemstart henningolsen36 Linux - Newbie 1 05-28-2005 12:01 PM
rc.inet1 and rc.inet1.conf edafe Slackware 0 02-16-2005 09:51 AM
hotplug script executed 3 times Borelian Linux - Software 1 06-28-2004 11:46 PM
Firmware/Hotplug problem with Hauppauge DEC2540-T, Hotplug and MythTV bezoomny Linux - Hardware 0 05-17-2004 01:37 PM
slack9.1 + kernel2.6-test6 problems to get hotplug/alsa to work lupus1010 Slackware 2 10-20-2003 11:26 AM


All times are GMT -5. The time now is 02:04 PM.

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