Tuesday, 21 August 2007

ghost or copy a partition to another drive- create identical system

I used this procedure copy my Fedora Linux OS.
Boot server in rescue mode

Boot the server from CDROM with rescue mode. At the boot prompt:
linux rescue

Choose mount filesystem when it is asked.

Create folder under root
mkdir /destination

Mount your destination partition under
mount /dev/hdb1 /destination

Copy all of them, because all files are not used by any process you will not have any problem
cp -ar /mnt/sysimage /destination

or copy all disk
dd if=/dev/hda of=/dev/hdb

If you are copying your boot partition you have to install grub for booting system
move hdb to hda (You have to switch master slave jumpers for both of disks)
Boot with rescue mode, mount filesystem (if you have problem, you know partitin location mount /dev/sda1 /mnt/sysimage)
chroot /mnt/sysimage

Now you have copy of the system...

No comments: