Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
net init script fails with renamed interfaces [fixed itself]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
c45207
n00b
n00b


Joined: 08 Mar 2004
Posts: 70

PostPosted: Tue Aug 30, 2005 6:06 am    Post subject: net init script fails with renamed interfaces [fixed itself] Reply with quote

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
View user's profile Send private message
Adrien
Advocate
Advocate


Joined: 13 Jul 2004
Posts: 2249
Location: Paris - France

PostPosted: Tue Aug 30, 2005 7:29 am    Post subject: Reply with quote

Before tryin' to start it at boot., check if your lan interface appears in the output of:
Code:
# ifconfig -a

But I'm not sure it is possible to rename an interface like this... don't know
Back to top
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6430
Location: Blighty

PostPosted: Tue Aug 30, 2005 9:59 am    Post subject: Reply with quote

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.
_________________
Use dhcpcd for all your automated network configuration needs
Back to top
View user's profile Send private message
Adrien
Advocate
Advocate


Joined: 13 Jul 2004
Posts: 2249
Location: Paris - France

PostPosted: Tue Aug 30, 2005 12:18 pm    Post subject: Reply with quote

UberLord wrote:
When baselayout tells you to update config files or things break WE REALLY DO MEAN IT

:lol:
Back to top
View user's profile Send private message
c45207
n00b
n00b


Joined: 08 Mar 2004
Posts: 70

PostPosted: Tue Aug 30, 2005 1:20 pm    Post subject: Reply with quote

Adrien wrote:
Before tryin' to start it at boot., check if your lan interface appears in the output of:
Code:
# ifconfig -a

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
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6430
Location: Blighty

PostPosted: Tue Aug 30, 2005 1:42 pm    Post subject: Reply with quote

Do you have net.eth0 and/or net.lan in the default runlevel?
_________________
Use dhcpcd for all your automated network configuration needs
Back to top
View user's profile Send private message
c45207
n00b
n00b


Joined: 08 Mar 2004
Posts: 70

PostPosted: Tue Aug 30, 2005 8:20 pm    Post subject: Reply with quote

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
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6430
Location: Blighty

PostPosted: Tue Aug 30, 2005 9:43 pm    Post subject: Reply with quote

c45207 wrote:
When net.lan is run during boot-up, it doesn't work. If it is run after boot-up, it does work.


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)
_________________
Use dhcpcd for all your automated network configuration needs
Back to top
View user's profile Send private message
c45207
n00b
n00b


Joined: 08 Mar 2004
Posts: 70

PostPosted: Tue Aug 30, 2005 11:04 pm    Post subject: Reply with quote

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
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6430
Location: Blighty

PostPosted: Wed Aug 31, 2005 7:17 am    Post subject: Reply with quote

I would file a bug on bugs.gentoo.org
_________________
Use dhcpcd for all your automated network configuration needs
Back to top
View user's profile Send private message
c45207
n00b
n00b


Joined: 08 Mar 2004
Posts: 70

PostPosted: Wed Aug 31, 2005 5:56 pm    Post subject: Reply with quote

UberLord wrote:
I would file a bug on bugs.gentoo.org

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
View user's profile Send private message
c45207
n00b
n00b


Joined: 08 Mar 2004
Posts: 70

PostPosted: Fri Sep 02, 2005 3:59 am    Post subject: Reply with quote

Bug Report:
http://bugs.gentoo.org/show_bug.cgi?id=104535
Back to top
View user's profile Send private message
jkroon
Tux's lil' helper
Tux's lil' helper


Joined: 15 Oct 2003
Posts: 108
Location: South Africa

PostPosted: Sat Feb 18, 2006 10:22 am    Post subject: Reply with quote

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
View user's profile Send private message
c45207
n00b
n00b


Joined: 08 Mar 2004
Posts: 70

PostPosted: Sat Feb 18, 2006 4:34 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum