[YLUG] clone fedora 10

mike cloaked mike.cloaked at gmail.com
Thu Dec 25 16:17:34 UTC 2008


dd won't help as it will not have any SElinux contexts and you will be
in a mess. (Unless you are planning to turn of SElinux)

You can use rsync provided you use the -aX flag so that the copy
contains the contents, as well as all permissions and the contexts.  I
usually use rsync -aXH

But it is probably as much work to copy the disc as to install again -
by all means copy the non-root areas but I would make a backup of
/root /var and /etc and re-install and then just copy the key system
files you need from the backup. If the disk is a replacement for the
same machine then a dd copy would be a good way to do it.

The key thing is that if the hardware is different then the initrd
file will not work in the new system - so you will need to use
mkinitrd to create a new ramdisk file.


On Thu, Dec 25, 2008 at 3:27 PM, Alex Howells <alex.howells at 0wn3d.us> wrote:
> 2008/12/25 mike cloaked <mike.cloaked at gmail.com>:
>> On Thu, Dec 25, 2008 at 11:35 AM, Patrick Dupre <pd520 at york.ac.uk> wrote:
>>> Hello,
>>>
>>> In the past (ie with fedora 7 and before), I was able to clone a
>>> machine by using cp -a. I did the same with fedora 10, but it looks like
>>> that it mess up the passwd file and the files related to.
>>> In fact the system starts like it should but I cannot login.
>>> How can I fix it ?
>>
>> You will have a tough time doing that!  Particularly since "cp -a"
>> does not copy across security contexts so there will be all manner of
>> problems since SElinux will prevent you doing a great many normal
>> things.
>>
>> I would suggest that you ask on the Fedora list if anyone can point
>> you to some information about cloning a machine - but in any event
>> cloning will lead to a situation where the other computer may have
>> different hardware - and then the boot process will fail unless you
>> re-run mkinitrd to create an initial ramdisk file for the new machine.
>>
>> Good luck anyway - certainly that is not something I would try to do
>> and I would do it very differently.
>
> You can use 'dd' if the disks are identically sized which will handle
> most things.
>
> Alternatively 'rsync -vaHPS --numeric-ids' is usually a good
> combination but I've no idea if it handles SELinux since I disable
> (hell, nuke it from orbit) that on everything - biggest overbearing
> pile of tosh to class itself as "required security" ever.
>
> If you use any other method than 'dd' you need to worry about the
> master boot record, and Grub.
>
> _______________________________________________
> York mailing list
> York at lists.lug.org.uk
> https://mailman.lug.org.uk/mailman/listinfo/york
>



-- 
mike



More information about the York mailing list