[Ilugc] how to clone a Linux OS

  • From: kapil@xxxxxxxxxxx (Kapil Hari Paranjape)
  • Date: Wed May 14 16:56:03 2008

Hello,

On Wed, 14 May 2008, swapan karmakar wrote:

how can we  create an exact clone of LinuxOS installed on a HDD to another 
HDD...?

Suppose the file-system you want to copy is mounted at /source
Suppose the file-system you want write is mounted at /target

        cd /source
        find . -depth | cpio -pdumv /target

Note that this will not work properly if '/source' is '/'. You need
to exclude all the virtual filesystems for that.

Secondly, it will not create the master boot record on the target
HDD. You need to install the boot loader on HDD separately.

Read 'man find' and 'man cpio' before running the above commands and
understand what they do or you may damange your system beyond repair!
        ***You have been warned***

Regards,

Kapil.
--

Other related posts: