SIOCSIFADDR No such device eth0 error while getting interface flags - eth0 Ethernet Device can

I got this after copying a VMWare image onto another machine in Debian.

SIOCSIFADDR No such device eth0 error while getting interface flags

The solution

1.) Find and edit the device line in persisent-net.rules note it will be prefixed with something like z25 or something else.

vi /etc/udev/rules.d/z25_persistent-net.rules

The easiest way is to comment anything out.

If you are feeling lazy you can just reboot your computer and everything should come back.  If you don't want to reboot follow steps 2 & 3 below.

2.) Now restart udev /etc/init.d/udev restart

3.) Reload the Module.  I found the name is pcnet32

So in my case you unload the module like this: modprobe -r pcnet32

Now reload the module: modprobe pcnet32

Now if you do: ifup eth0 everything should be fine.

 


If the above doesn't work. 

I copied the same VM again and got the same error, I tried commenting out those lines and rebooting and it wouldn't work.  I tried deleting all lines and there was no luck.  Later on I noticed that another line was adding my device at "eth3". I changed that reference to eth0 but still could not bring it up.

The solution was to just delete this file: z25_persistent-net.rules

After a reboot my ethernet card was working again.  This is a really annoying feature of Debian and UDEV.

 

Latest Articles

  • Openvz Quick Install for CentOS 5 Tutorial
  • Subnet Mask Lengths / Quick Reference
  • Linux How To Add/Delete A Default Route/Gateway
  • DRBD WFConnection Problem/Solution
  • How not to change an IP address in CPanel during a migration
  • CPanel Cannot Login Internal Server Error Could not fetch uid or gid for : root https://192.168.1.42:2083
  • sed script to automatically update IPs in named/BIND and httpd/Apache
  • mdadm Linux Software RAID QuickStart Guide
  • HeartBeat Error/High Load heartbeat: [7120]: WARN: Gmain_timeout_dispatch: Dispatch function for retransmit request took too long to execute: 20 ms (> 10 ms) (GSource: 0x926b390)
  • VirtualBox Error Failed to start the virtual machine Centos 5.5 Mirror. Medium '/home/testuser/.VirtualBox/HardDisks/Centos 5.5 Mirror.vdi' is not accessible. UUID {a1a9fad7-0402-4867-b8f3-39fb49454bc5} of the medium '/home/testuser/.VirtualBox/HardD
  • Installing Virtualbox on Centos 5.5
  • Openvz Live Migration Error - Error: undump failed: Invalid argument Restoring failed: Error: iptables-restore exited with 2 Error: Most probably some iptables modules are not loaded Error: rst_restore_net: -22
  • OpenOffice Writer Default Paragraph Annoyance
  • DirectAdmin Install Webalizer Stats
  • Ubuntu Linux HTML Rendering left bracket < problem appears as 003C box
  • Solution - error while loading shared libraries: libgd.so.2: cannot open shared object file: No such file or directory
  • Linux Kernel Boot Black Screen of Death Freeze/Halt Solution
  • Linux Kernel Freeze/Hang during boot on io scheduler cfq registered (default)
  • VirtualBox/VBOX Centos 5.5 Installation Kernel Freeze Problem "NET: Registered protocol family 2" And Solution
  • VirtualBox OSE/VBOX Can't Access Shared Folder Solution