Page 1 of 1

To backup a hard drive?

Posted: Fri Jun 01, 2007 3:14 pm
by sholah

I will like to know what it takes to copy the image of an entire hard drive with linux OS on it?Do i just copy the partition or do i also make an image of the MBR.

My main purpose for this is to install the image on multiple hard drives without prior partitions on them.

Can someone inform/refer me on how to do this.


Posted: Fri Oct 05, 2007 3:17 pm
by kkendall
I would like to be able to do the same thing. What I found was that partimage makes images of individual partitions and can't be used for the entire drive.

I needed to make a disaster recovery image of an entire drive before a major OS change in case things went south. To test another approach, I booted the SystemRescueCd and mounted a large NFS volume. Then I did a dd of the entire drive to a file on an NFS mount

* boot SystemRescueCd
* mkdir /mnt/nfs
* mount <ipaddr_of_nfs-server>:/<path to mount> /mnt/nfs
* dd if=/dev/sda of=/mnt/nfs/backup_file

I tested the restore by deleting a couple of partitions and saving the partition table.

Then to restore

* boot SystemRescueCd
* mkdir /mnt/nfs
* mount <ipaddr_of_nfs-server>:/<path to mount> /mnt/nfs
* dd if=/mnt/nfs/backup_file of=/dev/sda

When it was done, I had to run fdisk and save the partition table

* fdisk /dev/sda
* p (verify the partition table is correct)
* w (save it)
* reboot

It would be nice if partimage could be used for the entire disk and get everything (MBR, etc).