Recent Changes - Search:
NTLUG

Linux is free.
Life is good.

Linux Training
10am on Meeting Days!

1825 Monetary Lane Suite #104 Carrollton, TX

Do a presentation at NTLUG.

What is the Linux Installation Project?

Real companies using Linux!

Not just for business anymore.

Providing ready to run platforms on Linux

Created by Terry Henderson on June 30, 2007, at 04:31 PM

Never would have guessed; udev would switch the NICs when I wasn't lookin'.
[To keep a long story long]:
I resurrected 2 computers for a friend / neighbor. One had an Intel Celeron with a dead MB. So I dug up an old used replacement [Soyo SY-K7VTA] mainboard with an Athlon 1G and it was a pretty decent system [memory = 768M DDR RAM]. (Strictly a low budget operation.)

Having done such a good job on the first one, he handed over his other PC, an old AMD 700mHz Duron with no HD. I guess he thought he should "go for broke!", (I only charged him $100 for the first one).

The second one was in better condition, [it actually worked]; I left it pretty much as is, accept for adding a 40G HD and 2 network cards.

What he had before was one dead PC and the other was a terribly slow and mucked up MS system that was barley usable anymore. He'd seem my computers, thought they were pretty nice and some what unique and wanted to try Linux, so; I installed Slackware/KDE on the 1G Athlon and then MintLinux/Gnome on the Duron. Since it was obvious he would want to use the internet on both machines, I installed 2 NICs in the Duron and had it sharing his internet connection via crossover cable with the Athlon. What I didn't realize was that udev [by default] will randomly assign network card names. Everything worked great for the first few days, but after about the 3rd reboot, the NICs traded places, leaving him with no internet service, so it's "back to the drawing board"...

[The solution]:

And this is where it gets stupid:
On a slackware system, you'd put lines:
KERNEL=="eth*", SYSFS{address}=="00:50:04:12:7F:98", NAME="eth0" KERNEL=="eth*", SYSFS{address}=="00:0C:41:E8:BB:25", NAME="eth1"
in the network configuration file:
/etc/udev/rules.d/network-devices.rules

If it were a Debian system, you'd put the above lines in
/etc/udev/rules.d/25-netinterfaces.rules

On a Ubuntu/MintLinux system, all indications are that you'd put the above lines in the file:
/etc/udev/rules.d/25-iftab.rules
BUT, guess what - it doesn't work - has no effect; Even though the first line says:
"# Local network rules to name your network cards."

The ultimate solution is to add lines:
eth0 mac 00:50:04:12:7F:98 arp 1
eth1 mac 00:0C:41:E8:BB:25 arp 1
to
/etc/iftab
Which contains comment on first line:
"# This file assigns persistent names to network interfaces"

At any rate, the finished / re-finished product is pretty nice. He's got two pretty decent computers. We put a little $25 KVM switch [from RadioShack] between the 2 PCs and he just hits Scroll-Lock twice to switch back and forth. He's got the latest/greatest KDE and Gnome systems. The Athlon/Slackware/KDE system runs Linux 2.6.17 and the Duron/Ubuntu/Gnome system runs kernel version 2.6.20, both systems fully loaded with all the latest multimedia software along with OpenOffice and gimp and lots of other cool stuff.
I guess now, he's got to decide whether he's a Gnome or KDE user.
--
The moral of the story; Never turn your back on udev
_________________ Back to Site Blogs

Page last modified on September 16, 2007, at 12:13 PM