Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Basically, I want to make an image of one Linux install I have, and distribute it over similar (if not identical) spec machines on a network. I know it is possible, however am unsure of what needs to be done before I make the image of the install to ensure it works correctly on all machines.

First think I know needs to be done, is remove all interface configuration, as I assume it would just jump to eth1 (and possibly use the same MAC), as it wont locate the network interface it had before, how would I do this so it auto detects and goes to eth0 again?

Is there anything else I would need to do to the install before I make its image?

share|improve this question

2 Answers 2

up vote 3 down vote accepted

The assumption you made about the ethernet card changing name is partially correct. This happens when you use udev, but the configuration may be altered at will and is (maybe) stored in /etc/udev/rules.d/70-persistent-net.rules. Also, the MAC is stored in the hardware, and unless it's not set by the OS, will not be the same on a different network interface. Apart from that, the name of the interface may be changed with (iproute2):

 ip link set dev eth2 name eth0

Besides transferring the image to a new drive, you will need to install a boot loader, such as GRUB. The image itself can be obtained by running dd or dd_rescue if you suspect that the drive may be damaged.

This should about cover it.

share|improve this answer
    
Would it be fine just to remove the line in persistent-net.rules containing the HW address and if name? –  Marcus Hughes Dec 8 '12 at 3:40
1  
Yeah, then you would get a new line containing the new MAC address linked to eth0 on next boot. –  Ярослав Рахматуллин Dec 8 '12 at 5:22

There is a LiveCD distribution called Clonezilla (http://clonezilla.org/) that may be perfect for what you want. It is similar to the old Norton Ghost in that it lets you take an image of one machine and clone it to as many PCs as you want.

If you want to go crazy, it even has a server edition (Clonezilla SE) which lets you multicast the image to many PCs at once.

From this question (http://unix.stackexchange.com/questions/2865/moving-linux-install-to-a-new-computer) it looks like you'll just need to worry about:

  1. The network interfaces (though it may be ok if you use DHCP)
  2. Any UUIDs used in /etc/fstab for mounting partitions
  3. Re-generate any SSH keys
share|improve this answer
    
The UUIDs in /etc/fstab is indeed something to consider if the system uses these. –  Ярослав Рахматуллин Dec 8 '12 at 5:23

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.