|
Trick: Cloning a Mandriva box |
|
|
|
Friday, 01 December 2006 |
Any time we think about installing OS on more than one system 'cloning' comes to our attention. If you are cloning your Linux box hard disks to deploy a common setup on a number of PCs, you are often using programs like g4u and Acronis. But you can use the „low level data transfer commands” like dd and netcat also. This article describes the power of those tools.
We tested it with a Linux box running Mandriva 2007 and had the following problem:
After installing and running the new (cloned) machine, we just had the network interface eth1 available. It was not possible to reconfigure the network settings to use eth0 instead.
We had do dig and search for the reason and found the following solution:
Mandriva is storing the network information including the MAC address in the following file:
/etc/udev/rules.d/61-net_config.rules
In our case eth0 was already in use using the MAC address from the original system. We just deleted the additional line and changed the interface name from eth1 to eth0.
This is the corrected content of the file:
# udev persistent rules for net subsystem
# Generated by Mandriva udev rules
# See /etc/udev/rules.d/62-create_persistent.rules
SUBSYSTEM=="net", ACTION=="add", ENV{INTERFACE}!="*.*", SYSFS{address}=="00:xx:xx:b7:5b:xx", NAME="eth0", ENV{MDV_CONFIGURED}="yes" |