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

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.

 


  • How to disable Google Fonts in Wordpress
  • Unable to load dynamic library /usr/lib64/php/modules/php_openssl
  • mysqld in Linux hacked
  • W: GPG error: http://archive.debian.org squeeze Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY AED4B06F473041FA NO_PUBKEY 64481591B98321F9
  • cannot mount kvm ntfs image
  • h264 DVR security camera footage cannot be played
  • dhcpd.conf how to secure so only known and allowed clients will be given dhcpd IP address leases
  • Thunderbird E-mail List Blank White but e-mails still clickable and viewable
  • css responsive images
  • responsive table without changing much code solution
  • yum how to install old obsolete packages
  • PHP Howto Store Value of Included File Output Into Variable
  • PHP Migration from 5.3 to 5.4+ and dealing with deprecated functions
  • ffmpeg vidstab to stabilize video
  • userdel user userdel: cannot lock /etc/passwd; try again later.
  • mdadm how to mount inactive array
  • How to find and mount mdadm arrays automatically
  • M2Crypto.SSL.Checker.WrongHost: Peer certificate subjectAltName does not match host, expected fedora-archive.ip-connect.vn.ua, got DNS:mirror.ip-connect.vn.ua
  • [Wed Sep 20 15:34:44 2017] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec) [Wed Sep 20 15:34:44 2017] [error] Init: Unable to read server certificate from file /www/ssl-certs/server.crt [Wed Sep 20 15:34:44 2017] [error] SSL Library Err
  • linux how to answer yes to copy