Clone a system

You need more HD space, change the partitions of a drive, move from ext2 to ext3, make a backup of a small embedded PC or you add a new hard disc, you are not happy with your partition scheme or you want to move your system to a Solid State Disk without do a complete re-installation? This task is easy:

  1. Add the new disk to your computer that will be cloned.

  2. Start your PC with a Live CD, this is to avoid to copy the pseudo file systems as /sys /proc, ... or remove the disk from your PC and add it to an other PC.

  3. In case you want to copy it to a new disk, partition the new hard disk (you could do this also without liveCD). The command ls -lR /dev/disk or fdisk -l will show you the /dev file.

  4. Copy the system partitions over: cp -arT<source><destination>

  5. Install the MBR (Master Boot Record) of your boot loader on the new disk, so it boots from there. For grub legacy (versions below 1) to install the MBR on the first hard disk on pointing that the rest of grub is in the first hard disk first partition:

    1. grub --no-floppy

    2. root (hd0,0)

    3. setup (hd0)

    4. quit

  6. Verify BIOS so the boot order is correct and reboot

  7. Fine tuning and checks as vmstat -d to see how often the disks are accessed.

Linurs startpage