Home > English, GNU/Linux, OSS Solutions, Tech Crunch > Howto reset network device after swapping disks from one PC to another

Howto reset network device after swapping disks from one PC to another

I had a problem with a very old Compaq PC not detecting the keyboard anymore. I used the PC as a local server, not a real problem, except that the BIOS didn’t allow the PC to boot when the keyboard was not plugged in. One solution there might have been to use some USB keyboard (I didn’t get a chance to try that – didn’t have any USB keyboard lying around).

Luckily enough, I happened to have a clone of this computer, so I just swapped the disks from one PC to the other, and booted. This one detected the keyboard without a problem and started booting Debian.

Now the problem was that Debian (which was on the disk which I swapped from one PC to another, thus changing all the devices IDs and stuff) wouldn’t find my network device (at least where I expected it to), so I was left with a working local server without network… pretty useless.

So I called my resourceful brother (Jérôme), and he quickly explained to me that Debian’s udev stored its NIC MAC address in /etc/udev/rules.d/*persistent-net*. Clearly, that was true. Then I didn’t know how to get the real MAC (I could probably have found it in /proc/ somewhere), but the thing is that, he said, you can just delete the file, reboot, and Debian will rebuild it.

So, one delete and reboot later, I had network on my local server! Thanks Jérôme!

  1. Joe
    September 5, 2011 at 7:45 pm


    You saved me a lot of time, with this tip.


  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: