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

  • Apache/Mod_SSL not serving the right/expected certificate?2010-03-09 04:09:36
  • Create/Enable SSL Certificates for Apache on Linux/Unix Systems eg. Redhat,Centos,Debian2010-03-09 04:07:21
  • MySQL Error "ERROR 1045 (28000): Access denied for user"2010-03-06 06:35:42
  • MySQL "Got error 28 from storage engine"2010-03-06 06:32:28
  • How to Track Down/Find Cause of Linux high disk iowait/wa2010-02-19 01:41:31
  • Mysqld Solution - Can't init databases /usr/libexec/mysqld: Can't read dir of '/tmp/' (Errcode: 13) /usr/libexec/mysqld: Can't create/write to file '/tmp/ibyP1qUC' (Errcode: 13) 100215 7:02:24 InnoDB: Error: unable to create temporary file; errno:2010-02-15 07:11:17
  • Windows Vista sysprep.exe /generalize error "The computer restarted unexpectedly or encountered an unexpected error. Windows installation cannot proceed. To install Windows, click "OK" to restart the computer, and then restart the installation."2010-02-13 10:08:29
  • Openvz "Container already locked" Error Message Solution/Fix2010-02-13 09:44:14
  • Adventures in pre-paid SIM Cards and data GPRS/Edge/3G in China with China Mobile in Shenzhen, Guangzhou, Shanghai, Beijing and other cities2010-02-12 08:37:57
  • iPhone Enable Tethering Manually Update ipcc Carrier Settings/Update via SSH2010-02-08 06:03:16
  • How To Enable 3rd/third party packages in RHEL/Redhat/Centos 4/5 Linux via RPMForge2010-01-17 16:44:41
  • How to avoid web content hijacking/copying/Force content to be accessed by only 1 domain name2010-01-17 16:39:39
  • SAMBA/SMB Share "Write" Access without Delete2009-12-19 20:04:22
  • The power of passive vs air cooling. Small fans make a world of difference.2009-12-18 13:22:52
  • Hard Drive Not Working/Not Detected By Your BIOS Anymore?2009-12-12 11:29:09
  • GRUB "Error 2: Bad file or directory type" 0.97 won2009-12-09 21:25:09
  • Unixbench Score with Glusterfs/Openvz & Quad Core Xeon - Updated with GlusterFS 2.0.8 & Optimized Client Config2009-11-29 01:26:44
  • Clustered/Distributed Network Filesystems, Which Ones live up to the hype?2009-11-28 22:19:13
  • Unixbench Score with Glusterfs/Openvz & Quad Core Xeon - Updated with GlusterFS 2.0.82009-11-28 22:04:16
  • yum error not working rpmdb: mmap: No such device TypeError: rpmdb open failed2009-11-23 00:06:42