Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I have the following procedure for replicating a Fedora workstation setup.

  1. Boot from a Live CD, make tgz's of the filesystems.
  2. Go to new machine, make filesystems, dump the tgz's in the proper places.
  3. Adjust UUID's in /etc/fstab and /boot/grub/menu.lst
  4. Run grub-install
  5. Reboot!

The nice thing is that DHCP assigns the new machine an unique name, and users have /home mounted on the server. Graphics configuration aren't a worry either, since recent versions of Xorg are wicked smart in auto-detecting graphic adapters.

So everything works like a snap... with the exception of one small quirk:

In the first boot of the new machine, network startup fails. It turns out the machine thinks there's no such thing as an eth0, but there is an eth1 and it is the machine's onboard ethernet. So I have to go to /etc/sysconfig/network-scripts, rename ifcfg-eth0 to ifcfg-eth1, and edit the DEVICE= line in it. Then I reboot and everything works.

I believe somewhere, in some file, there is information associating eth0 with the MAC of the "Master Mold" machine's eth0. But where?

P.S.: I don't use NetworkManager.

share|improve this question
    
This is not really relevant to your question, but I recommend partimage over the approach you used to copy/replicate filesystems. –  Faheem Mitha Mar 19 '11 at 16:20
1  
I suggest changing your title. It doesn't really reflect your question accurately. –  Faheem Mitha Mar 19 '11 at 16:24
1  
If your list of changes is exhaustive and you have an ssh server, you missed generating a new ssh host key. See also Moving linux install to a new computer –  Gilles Mar 19 '11 at 20:39
add comment

1 Answer

up vote 4 down vote accepted

On my machine it is

/etc/udev/rules.d/70-persistent-net.rules

This is a Debian squeeze machine, but it is probably similar for other Linux distributions. Mine looks like

# This file was automatically generated by the /lib/udev/write_net_rules
# program, probably run by the persistent-net-generator.rules rules file.
#
# You can modify it, as long as you keep each rule on a single line.
# MAC addresses must be written in lowercase.

# Firewire device 00e081000026d042 (ohci1394)
SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="00:e0:81:00:00:26:d0:42", NAME="eth0"

# PCI device 0x10de:0x0057 (forcedeth)
SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="00:e0:81:70:18:22", NAME="eth1"

Tip: doing

/etc# grep -r eth0 * | less

will give you the answer in a couple of minutes, probably. That is what I did.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.