User Tools

Site Tools


making_a_linux_installation_clonable

Introduction

You might have to tweak some things to make Linux clone nicely. Update this document as needed.

Taking the hostname from DHCP

RHEL/Fedora does this by default. Ubuntu/Debian respects the /etc/hostname set at install time over DHCP. To fix this, just delete /etc/hostname.

Turning off persistent eth devices

Some Linux distributions try to keep track of which ethernet device is which by MAC address. This is bad for us, because when cloning, it will assume that eth0-1 were "removed" (since they aren't on the destination machine), and therefore use eth2-3. This screws things up, so we need to turn it off. The basic strategy is to remove MACs from existing config files and possibly turn off the feature that put them there in the first place.

Ubuntu/Debian

Edit "/etc/udev/persistent-net-generator.rules" and add the following to the top:

# hack: turn ethernet persistance off
GOTO="persistent_net_generator_end"

Next, edit "/etc/udev/rules.d/z25_persistent-net.rules" (or similar) to remove MAC addresses already stored. Delete all uncommented lines. If you can't find this file, search all of /etc for files that contain your current MAC:

 # ifconfig
 eth0      Link encap:Ethernet  HWaddr '''00:0C:29:F7:B9:9A'''
           inet addr:10.60.119.191  Bcast:10.60.119.255  Mask:255.255.255.0
           inet6 addr: fe80::20c:29ff:fef7:b99a/64 Scope:Link
           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
           RX packets:1523 errors:0 dropped:0 overruns:0 frame:0
           TX packets:295 errors:0 dropped:0 overruns:0 carrier:0
           collisions:0 txqueuelen:1000
           RX bytes:110481 (107.8 KiB)  TX bytes:40827 (39.8 KiB)
           Interrupt:177 Base address:0x1400
 # grep -ri '''00:0C:29:F7:B9:9A''' /etc
making_a_linux_installation_clonable.txt · Last modified: 2010/12/03 23:31 by tkbletsc

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki