Weblog entry #14 for lykwydchykyn

Making an install forget old hardware
Posted by lykwydchykyn on Tue 15 Apr 2008 at 17:38
Tags: none.
I have several debian machines running at remote sites on older hardware. Occasionally the hard drive gives out on one of these machines and I have to build a replacement. When I do this, I usually stage the HD at my office using qemu or a spare workstation, then bring just the HD out to stick in the remote machine.

The biggest problem with this is that while staging the machine at my office, whatever NIC (real or virtual) in the staging machine becomes eth0. When I put the HD in the actual final machine, it becomes eth1. Is there some way to make debian forget about the original NIC so that the final NIC will be eth0?

I guess I can just plan ahead and set up eth1, but it doesn't seem clean to me to have eth0 assigned to a card that the instance will never see again.

 

Comments on this Entry

Posted by Anonymous (80.177.xx.xx) on Tue 15 Apr 2008 at 18:19
You need to edit the file:

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

remove/modify the relevant lines

[ Parent | Reply to this comment ]

Posted by Anonymous (59.178.xx.xx) on Wed 16 Apr 2008 at 04:09
http://www.debian-administration.org/articles/463
and
http://www.debian-administration.org/articles/502

and the subsequent discussions cover it pretty nicely. Maybe in a while most queries we answer will simply get a response like the above - there is a great compilation of material already neatly accessible (100s of articles anyway, judging from the numbering). Response by reference - very efficent

Off topic - ignore the rest of this unless you are bored:

Reminds me of the joke where a newbie joins a prison, in the geek section, and finds that the prisoners are all shouting numbers at each other. Like:

an old prisoner shouts out: "23!"

*laughs from all the old prisoners*

another old prisoner shouts out: "47!"

*huge uproar of laughter and much thigh slapping*

a third old prisoner shouts out: "93!"
*hysterical laughter all round, prisoners rolling on the floor clutching their sides*

The newbie asks a fellow inmate what's going on.

"Yeah, we compiled a list of all the jokes and now when we want to tell a joke we just call out its number. Very efficent."

The newbie thinks about it a bit then figures he can hack the system too and make himself popular.

newbie shouts out: "72!"

*dead silence, curious, expectant looks from the other prisoners*

The newbie turns to his inmate, "what happened?"

"Oh," says the old hand, "it's the way you told it"

PJ

[ Parent | Reply to this comment ]

Posted by lykwydchykyn (72.237.xx.xx) on Wed 16 Apr 2008 at 22:33
[ Send Message | View Weblogs ]
Thanks!
I figured the answer was out there somewhere. Sometimes I can't figure out how to phrase a search to find what I need. Sort of a chicken-and-the-egg kind of thing.

[ Parent | Reply to this comment ]

User Login

Username:

Password:

[ Advanced Login ]

Register Account

Quick Site Search