Re: [Clonezilla-live] Restored Disk Image: eth issue
A partition and disk imaging/cloning program
Brought to you by:
steven_shiau
|
From: Dale S. <ml...@ri...> - 2010-04-09 18:11:46
|
On Fri, Apr 09, 2010 at 08:50:36PM +0530, RSCL Mumbai wrote: > Hi, > > My concern is not directly related to Clonezilla, but generic to > theconcept of cloning. > > I have a server with CentOS 5.3 and Samba. > As a back up measure against HDD and other peripheral failure, I have > purchased an identical PC and I plan to clone the main server and then run > rsync on daily basis. > Everything seems fine in this schematic and I am fine with this backup > approach. > > My concern is: > Both the server's have identical specs sans the ethernet. > When I will restore the image on the 2nd PC, and boot, it will alert for a > new ethernet device found and by default it will create a new interface > ETH1 > > Is there any way to avoid creating the new ethernet device ETH1 and be > able to use the the original ETH0. > > One thought which crossed my mind, but I have not tried is, after cloning, > I can boot the server using a live distro (may be knopix), mount the > cloned HDD and make changes to the ETH configuration, namely MAC address > or whatever else. Not sure what should I change, and then boot the closed > HDD. > > Does this make sense ? Will it help. > Can someone throw light on how to prevent the creation of ETH1. > > Thx in advance. > > Best regards, > Vai I have encountered this issue myself. Speaking of Fedora, which ought to apply to CENTOS, there are two places where the MAC address might be stored that would need to be cleansed. These are: /etc/udev/rules.d/70-persistent-net.rules (more recent Fedora releases) /etc/sysconfig/network-scripts/ifcfg-eth0 If you clean those out, you should be OK with eth0. If your system does not have /etc/udev/rules.d/70-persistent-net.rules then file ifcfg-eth0 should be the only place that matters. sed -i /etc/udev/rules.d/70-persistent-net.rules -e '/rule written by/d' -e '/^ PCI device/d' -e '/SUBSYSTEM=="net", ACTION=="add",/d' -e '/^$/d' sed -i /etc/sysconfig/network-scripts/ifcfg-eth0 -e '/^HWADDR/d' or update the HWADDR assignment to have the new MAC address. Because my system had multiple NICs and because I wanted reproducible NIC naming, I wrote a script that used lspci to determine the NIC locations in the PCI bus topology and set HWADDR appropriately in the ifcfg-eth* files and rename the NICs. Now the question is: Is there a way to have clonezilla automatically execute such a script after an image restore? |