View previous topic :: View next topic |
Author |
Message |
c45207 n00b
Joined: 08 Mar 2004 Posts: 70
|
Posted: Tue Aug 30, 2005 6:06 am Post subject: net init script fails with renamed interfaces [fixed itself] |
|
|
I am using a udev rule to rename my network card. It is now called "lan". Therefore, I have created net.lan as a link to net.lo.
Was I correct in doing so?
However, on first bootup, net.lan (dhcpcd to be specific) complains that the interface "lan" does not exist. However, by the time I login, everything seems to be working correctly. Is this simply a timing issue, or did I do something wrong?
udev rule:
Code: |
KERNEL="eth*", SYSFS{address}="proper MAC address", NAME="lan"
|
/etc/conf.d/net
Code: |
config_lan=( "dhcp" )
dhcpcd_lan="-D"
|
Is more information needed?
Last edited by c45207 on Sat Feb 18, 2006 4:35 pm; edited 1 time in total |
|
Back to top |
|
|
Adrien Advocate
Joined: 13 Jul 2004 Posts: 2295 Location: Bretagne
|
Posted: Tue Aug 30, 2005 7:29 am Post subject: |
|
|
Before tryin' to start it at boot., check if your lan interface appears in the output of:
But I'm not sure it is possible to rename an interface like this... don't know |
|
Back to top |
|
|
UberLord Retired Dev
Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
|
Back to top |
|
|
Adrien Advocate
Joined: 13 Jul 2004 Posts: 2295 Location: Bretagne
|
Posted: Tue Aug 30, 2005 12:18 pm Post subject: |
|
|
UberLord wrote: | When baselayout tells you to update config files or things break WE REALLY DO MEAN IT |
|
|
Back to top |
|
|
c45207 n00b
Joined: 08 Mar 2004 Posts: 70
|
Posted: Tue Aug 30, 2005 1:20 pm Post subject: |
|
|
Adrien wrote: | Before tryin' to start it at boot., check if your lan interface appears in the output of:
But I'm not sure it is possible to rename an interface like this... don't know |
It does, as does the other interface I am renaming the same way (but not starting at boot).
UberLord wrote: | Ensure that the MAC address is in lower case - upper case does not work. Also, you may need KERNEL== instead of KERNEL= with newer udev versions. |
I had the MAC address in lowercase before. I also tried with KERNEL==. I still get the same thing.
Since I CAN configure it using "lan" (and not eth0, which doesn't exist anymore"), the rename rule is working. Is it not taking effect before the script is run? Is there a bug in the script?
Adrian wrote: | UberLord wrote: | When baselayout tells you to update config files or things break WE REALLY DO MEAN IT |
|
I don't need to remerge baselayout, do I? I considered doing that, seeing as I may have broken something...
|
|
Back to top |
|
|
UberLord Retired Dev
Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
|
Back to top |
|
|
c45207 n00b
Joined: 08 Mar 2004 Posts: 70
|
Posted: Tue Aug 30, 2005 8:20 pm Post subject: |
|
|
UberLord wrote: | Do you have net.eth0 and/or net.lan in the default runlevel? |
net.eth0, no (it doesn't even exist).
net.lan, yes.
When net.lan is run during boot-up, it doesn't work. If it is run after boot-up, it does work. |
|
Back to top |
|
|
UberLord Retired Dev
Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
|
Back to top |
|
|
c45207 n00b
Joined: 08 Mar 2004 Posts: 70
|
Posted: Tue Aug 30, 2005 11:04 pm Post subject: |
|
|
Could you be a little tinsy bit more precise, like say posting any error messages? If there are no error messages how do you know it didn't work? (ie, the output from ifconfig isn't what you expect for example)[/quote]
From /var/log/messages
Code: |
Aug 30 17:48:47 chris-tablet rc-scripts: lan does not exist
Aug 30 17:48:47 chris-tablet cron[5325]: (CRON) STARTUP (V5.0)
Aug 30 17:48:48 chris-tablet rc-scripts: ERROR: Problem starting needed services.
Aug 30 17:48:48 chris-tablet rc-scripts: "netmount" was not started.
Aug 30 17:48:51 chris-tablet tg3: lan: Link is up at 10 Mbps, half duplex.
Aug 30 17:48:51 chris-tablet tg3: lan: Flow control is off for TX and off for RX.
|
|
|
Back to top |
|
|
UberLord Retired Dev
Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
|
Back to top |
|
|
c45207 n00b
Joined: 08 Mar 2004 Posts: 70
|
Posted: Wed Aug 31, 2005 5:56 pm Post subject: |
|
|
Will do.
By the way, I was able to sort of get it to work by putting a "sleep 3" at the beginning of net.lo's start(). |
|
Back to top |
|
|
c45207 n00b
Joined: 08 Mar 2004 Posts: 70
|
|
Back to top |
|
|
jkroon Tux's lil' helper
Joined: 15 Oct 2003 Posts: 110 Location: South Africa
|
Posted: Sat Feb 18, 2006 10:22 am Post subject: |
|
|
Hmm, odd problem. I'm guessing this is the sequence of events happening without the sleep 3:
1. net.lan script loads the tg3 module.
2. net.lan script tries to configure tg3 module.
3. tg3 module finishes initialization and detects "link beat".
4. 'lan' ethernet device becomes available.
With the sleep 3 event no 2 moves down to 4 and thus works.
Try adding the tg3 module to /etc/modules.autoload.d/kernel-2.6 and see whether that doesn't also solve the problem (will get loaded _long_ before net.lan gets executed). _________________ There are 10 kinds of people in the world,
those who understand binary and who don't |
|
Back to top |
|
|
c45207 n00b
Joined: 08 Mar 2004 Posts: 70
|
Posted: Sat Feb 18, 2006 4:34 pm Post subject: |
|
|
Thanks to all. It seems a recent update to the kernel, udev, or baselayout seems to have fixed the problem.
I'm not going to close the bug report because the issue at hand seems like a deeper timing issue that deserves more investigation. |
|
Back to top |
|
|
|