[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Copied debian etch system assigns eth2 to only Ethernet adapter



On Monday 25 August 2008 17:19:00 roy hills wrote:
> I have a Debian Etch system running on VMware workstation 6.  The system
> has been copied from another system using dump/restore in single user mode
> followed by re-installing grub in the MBR.
>
> The system boots and runs fine.  The only oddity is that it assigns the
> name "eth2" to the only Ethernet adapter, rather than "eth0" as expected.
>
> Stranger still, the kernel reports the Ethernet adapter as eth0 at boot
> time.
>
> Here's what the kernel reports at boot:
>
> Linux version 2.6.18-6-686 (Debian 2.6.18.dfsg.1-22) (dannf@debian.org)
> (gcc version 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)) #1 SMP Tue Jun
> 17 21:31:27 UTC 2008 ...
> ACPI: PCI Interrupt 0000:02:00.0[A] -> GSI 18 (level, low) -> IRQ 169
> pcnet32: PCnet/PCI II 79C970A at 0x2000, 00 0c 29 f8 0b e4 assigned IRQ
> 169. eth0: registered as PCnet/PCI II 79C970A
> pcnet32: 1 cards_found.
> ...
>
> But ifconfig shows it as eth2:
>
> $ /sbin/ifconfig -a
> eth2      Link encap:Ethernet  HWaddr 00:0C:29:F8:0B:E4
>           inet addr:192.168.1.62  Bcast:192.168.1.255  Mask:255.255.255.0
>           inet6 addr: fe80::20c:29ff:fef8:be4/64 Scope:Link
>           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
>           RX packets:858 errors:0 dropped:0 overruns:0 frame:0
>           TX packets:709 errors:0 dropped:0 overruns:0 carrier:0
>           collisions:0 txqueuelen:1000
>           RX bytes:70875 (69.2 KiB)  TX bytes:97361 (95.0 KiB)
>           Interrupt:169 Base address:0x2000
>
> lo        Link encap:Local Loopback
>           inet addr:127.0.0.1  Mask:255.0.0.0
>           inet6 addr: ::1/128 Scope:Host
>           UP LOOPBACK RUNNING  MTU:16436  Metric:1
>           RX packets:8 errors:0 dropped:0 overruns:0 frame:0
>           TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
>           collisions:0 txqueuelen:0
>           RX bytes:560 (560.0 b)  TX bytes:560 (560.0 b)
>
> sit0      Link encap:IPv6-in-IPv4
>           NOARP  MTU:1480  Metric:1
>           RX packets:0 errors:0 dropped:0 overruns:0 frame:0
>           TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
>           collisions:0 txqueuelen:0
>           RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)
>
> The eth2 Ethernet device works fine if I add it to /etc/network/interfaces.
>
> I'm running the standard Debian Etch kernel and modules.
>
> Any ideas why the adapter is showing up as eth2?
>
> Roy
> _________________________________________________________________
> Win New York holidays with Kellogg’s & Live Search
> http://clk.atdmt.com/UKM/go/107571440/direct/01/

Roy,

I believe it's doing this because the network card has a different mac address to the previous machine (albeit virtual)

Have a look in the following file:
% cat /etc/udev/rules.d/z25_persistent-net.rules

You should see lines like the following:
# PCI device 0x14e4:0x1677 (tg3)
SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="xx:xx:xx:xx:xx:xx", NAME="ethx"

where xx:xx:xx:xx:xx:xx is the mac address and ethx is the device name

just delete all ethx lines and then on reboot eth0 should be eth0 again...

HTH

PS. I had a similar issue recently also with VMWare and this solved it ;)
-- 
Thank you,

Clifford W. Hansen
PHP Developer / Linux Administrator

(Cell)    +27 82 883 8677
(Fax)     +27 86 503 0634
(E-Mail)  clifford@nighthawk.co.za
(MSN)     clifford@nighthawk.co.za
(GPG)     0x936D6C19

"We have seen strange things today!"

()  ascii ribbon campaign - against html e-mail 
/\  www.asciiribbon.org   - against proprietary attachments

Attachment: signature.asc
Description: This is a digitally signed message part.


Reply to: