Networking Forums

Networking Forums > Computer Networking > Linux Networking > re-detecting network card after installation? (Debian, lenny)

Reply
Thread Tools Display Modes

re-detecting network card after installation? (Debian, lenny)

 
 
Tim Fardell
Guest
Posts: n/a

 
      04-05-2010, 05:21 PM
Hello all!

Can anyone advise on the procedure for adding new hardware devices on a
Debian (lenny) system?

Specifically, I need to know how to get Debian to detect and set up a
different network card from the one that was present when Debian was
installed. It's not picking up the change of hardware automatically - it
just fails to initialise the network, and I have no entry for 'eth0' shown
in the 'ifconfig' output.

I'm very new to Debian, having migrated from RedHat/Fedora which does a
lot more "hand-holding" than Debian and just detects any new hardware, and
prompts the user for any necessary configuration for the new device.

A bit of background, just in case it's relevant: I have two machines which
are completely identical in every respect *except* the Network card. The
first machine has a 3Com 3C905B-TX, while the second has a 3Com 3C905C-TX.
Every other piece of hardware is exactly the same on the two machines. I
installed Debian on the first machine and did all necessary configuration,
then used dd to transfer an image of the hard drive onto the second
machine. Everything works fine, except (predictably) the network card on
the second machine.

Can anyone help?

Thanks in advance.


 
Reply With Quote
 
 
 
 
Joe
Guest
Posts: n/a

 
      04-05-2010, 06:19 PM
On 2010-04-05, Tim Fardell <tim.fardell.all-your-(E-Mail Removed)> wrote:
> Hello all!
>
> Can anyone advise on the procedure for adding new hardware devices on a
> Debian (lenny) system?
>
> Specifically, I need to know how to get Debian to detect and set up a
> different network card from the one that was present when Debian was
> installed. It's not picking up the change of hardware automatically - it
> just fails to initialise the network, and I have no entry for 'eth0' shown
> in the 'ifconfig' output.
>
> I'm very new to Debian, having migrated from RedHat/Fedora which does a
> lot more "hand-holding" than Debian and just detects any new hardware, and
> prompts the user for any necessary configuration for the new device.
>
> A bit of background, just in case it's relevant: I have two machines which
> are completely identical in every respect *except* the Network card. The
> first machine has a 3Com 3C905B-TX, while the second has a 3Com 3C905C-TX.
> Every other piece of hardware is exactly the same on the two machines. I
> installed Debian on the first machine and did all necessary configuration,
> then used dd to transfer an image of the hard drive onto the second
> machine. Everything works fine, except (predictably) the network card on
> the second machine.
>
> Can anyone help?


Your new card is likely detected, but is listed as eth1. Since you do
not have an entry for it in the interfaces file, you just don't see
it.

You can do one of two things:
1) Edit /etc/networking/interfaces and add an entry for eth1
2) Edit /etc/udev/rules.d/70-persistent-net.rules and remove the eth0
interface, then change the eth1 to eth0

Then, reboot and all will be set. I like option 2 better, but YMMV.

--
Joe - Linux User #449481/Ubuntu User #19733
joe at hits - buffalo dot com
"Hate is baggage, life is too short to go around pissed off all the
time..." - Danny, American History X
 
Reply With Quote
 
Pascal Hambourg
Guest
Posts: n/a

 
      04-05-2010, 06:25 PM
Hello,

Tim Fardell a écrit :
>
> Specifically, I need to know how to get Debian to detect and set up a
> different network card from the one that was present when Debian was
> installed.


Detect : the kernel and udev will handle it automatically and load the
appropriate driver if needed.
Setup : it depends on how the interface is configured. If it is in
/etc/network/interfaces, just edit the file. If it is by any GUI tool
such as network-manager, I don't use them so I cannot help.

> It's not picking up the change of hardware automatically - it
> just fails to initialise the network, and I have no entry for 'eth0' shown
> in the 'ifconfig' output.


The interface is likely to have another name, check ifconfig -a.

> A bit of background, just in case it's relevant: I have two machines which
> are completely identical in every respect *except* the Network card. The
> first machine has a 3Com 3C905B-TX, while the second has a 3Com 3C905C-TX.
> Every other piece of hardware is exactly the same on the two machines. I
> installed Debian on the first machine and did all necessary configuration,
> then used dd to transfer an image of the hard drive onto the second
> machine. Everything works fine, except (predictably) the network card on
> the second machine.


When udev detects a network interface, it assigns it a persistent name
based on its MAC address. This means that this name is reserved to that
MAC address. By default it is the name given by the kernel if available.
If you replace the NIC (which is equivalent to what you did), the new
one will have a different MAC address, and udev will assign it another
(available) name.

So you can either edit the interface name in the file that configures
the interface, or edit the persistent naming rules generated by udev
(somewhere in /etc/udev/).

Yeah, sometimes udev won't just do what you'd like. This is the typical
case.
 
Reply With Quote
 
Tim Fardell
Guest
Posts: n/a

 
      04-05-2010, 08:10 PM
On 5 Apr 2010, Joe wrote:

> On 2010-04-05, Tim Fardell <tim.fardell.all-your-(E-Mail Removed)> wrote:
> >
> > Specifically, I need to know how to get Debian to detect and set up a
> > different network card from the one that was present when Debian was
> > installed. It's not picking up the change of hardware automatically - it
> > just fails to initialise the network, and I have no entry for 'eth0' shown
> > in the 'ifconfig' output.

>
> Your new card is likely detected, but is listed as eth1. Since you do
> not have an entry for it in the interfaces file, you just don't see
> it.
>
> You can do one of two things:
> 1) Edit /etc/networking/interfaces and add an entry for eth1
> 2) Edit /etc/udev/rules.d/70-persistent-net.rules and remove the eth0
> interface, then change the eth1 to eth0
>
> Then, reboot and all will be set. I like option 2 better, but YMMV.


Thanks to all for the replies.

This was indeed exactly what had happened. I did Option 2, and it sprang
into life after a reboot.

Actually I found that the new card was using the same driver as the old
card, it was just that, as Pascal pointed out, it was a different MAC
address, so it treated it as a different interface.

It's sort of irrelevant now as it's working, but just out of interest,
could I have brought the new card up without rebooting the machine? I
tried '/etc/init.d/networking restart', but it failed.

Thanks again for the help all. I already much prefer Debian to Fedora, and
I've only been using it for two days!

Fedora tries to make things too simple, and often doesn't do quite what I
wanted, and it's tricky to make it change its mind - a problem Debian
doesn't have. Debian does what you tell it, and *only* what you tell it,
to do. Excellent.


 
Reply With Quote
 
Joe
Guest
Posts: n/a

 
      04-10-2010, 07:09 AM
On 2010-04-05, Tim Fardell <tim.fardell.all-your-(E-Mail Removed)> wrote:
> On 5 Apr 2010, Joe wrote:
>
>> On 2010-04-05, Tim Fardell <tim.fardell.all-your-(E-Mail Removed)> wrote:
>> >
>> > Specifically, I need to know how to get Debian to detect and set up a
>> > different network card from the one that was present when Debian was
>> > installed. It's not picking up the change of hardware automatically - it
>> > just fails to initialise the network, and I have no entry for 'eth0' shown
>> > in the 'ifconfig' output.

>>
>> Your new card is likely detected, but is listed as eth1. Since you do
>> not have an entry for it in the interfaces file, you just don't see
>> it.
>>
>> You can do one of two things:
>> 1) Edit /etc/networking/interfaces and add an entry for eth1
>> 2) Edit /etc/udev/rules.d/70-persistent-net.rules and remove the eth0
>> interface, then change the eth1 to eth0
>>
>> Then, reboot and all will be set. I like option 2 better, but YMMV.

>
> Thanks to all for the replies.
>
> This was indeed exactly what had happened. I did Option 2, and it sprang
> into life after a reboot.
>
> Actually I found that the new card was using the same driver as the old
> card, it was just that, as Pascal pointed out, it was a different MAC
> address, so it treated it as a different interface.
>
> It's sort of irrelevant now as it's working, but just out of interest,
> could I have brought the new card up without rebooting the machine? I
> tried '/etc/init.d/networking restart', but it failed.


I've never bothered to try, but you could probably shut down
networking, then restart udev and start the network back up.

>
> Thanks again for the help all. I already much prefer Debian to Fedora, and
> I've only been using it for two days!
>
> Fedora tries to make things too simple, and often doesn't do quite what I
> wanted, and it's tricky to make it change its mind - a problem Debian
> doesn't have. Debian does what you tell it, and *only* what you tell it,
> to do. Excellent.


Fedora is a testing ground. It seems like there is always *something*
not working quite right. I also prefer apt to rpm for package
management.


--
Joe - Linux User #449481/Ubuntu User #19733
joe at hits - buffalo dot com
"Hate is baggage, life is too short to go around pissed off all the
time..." - Danny, American History X
 
Reply With Quote
 
Joe
Guest
Posts: n/a

 
      04-11-2010, 10:21 PM
On 2010-04-10, Bruce Richardson <(E-Mail Removed)> wrote:
>> Fedora is a testing ground. It seems like there is always *something*
>> not working quite right. I also prefer apt to rpm for package
>> management.

>
> I am a Debian user and do much prefer it to Fedora, but you're not
> comparing like with like, there. APT and rpm are not the same kind of
> component; dpkg and rpm are equivalents, apt and yum are equivalents.
> And Fedora includes apt (apt-rpm, an equivalent combination to
> apt-dpkg).
>


DEB and RPM are the package management utilities. YUM, APT, DPKG and
RPM are just utilities (I know, fuzzy, since RPM is also the name of
the tool). So, you're right in that I mis-spoke using APT instead of
DEB, but you got the jist... ;-)

I prefer Debian's packaging system to RPM. I learned using RPM. I am
a RedHat trained and Certified engineer. I prefer DEB. It just does
a better job in resolving dependencies, though YUM has made great
strides.

I still run RedHat servers here, as well as a couple of Debian
servers. Installing things in the Debian systems is just smoother. I
have rarely had to go looking for packages to resolve dependencies on
the Debian systems.

--
Joe - Linux User #449481/Ubuntu User #19733
joe at hits - buffalo dot com
"Hate is baggage, life is too short to go around pissed off all the
time..." - Danny, American History X
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
debian Lenny: forcing a IPv6 Router Sollicitation (configuring alinux isatap client) Kristoff Bonne Linux Networking 0 08-01-2008 09:32 AM
network card installation Jack C Windows Networking 0 12-05-2003 05:13 PM
new installation is not detecting eth0 Falak Linux Networking 3 11-15-2003 03:02 AM
network card is not detecting mohan Windows Networking 0 10-31-2003 06:10 AM
Network card installation Jen Windows Networking 0 08-25-2003 12:47 AM



1 2 3 4 5 6 7 8 9 10 11