Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I want to make a complete copy of my hard drive (and I have the capability to boot off external media to allow for unmounting of hard drive partitions). However, the majority of "ghosting" software I find only allows me to make images that are not really mountable or explorable ... in other words, I want a complete and total copy of hard drive, but I want to be able to explore so that I can recover individual files or folders if need be, and the best solution I have found is to build an ISO from my hard drive and mount it whenever I feel like it.

My real question, though, is: which software would recommend for this purpose - and do you think this is even the best solution anyway?

share|improve this question

4 Answers 4

up vote 0 down vote accepted

Using linux you can pull this off pretty easily with dd. dd is a Linux command line utility that allows you to mirror/copy a drive or a partition from a drive to either a file or another drive. It copies the partitions byte for byte, including any unused space on the filesystem.

Can I assume from your username and icon that you're using Ubuntu? :-) I'm assuming some knowledge here, so feel free to ask in the comments if you have any questions.

Note: If you're not using Linux and are on Windows, you have a few options. You can use dd for windows or boot from an Ubuntu disc/USB drive. You can then mount the file in Windows using one of the tools linked in the comments below.

Determine which partition you want to clone

So let's say the drive you want to copy is /dev/sda. (If it is an external drive, it might be /dev/sdb, /dev/sdc, etc...) For you to be able to mount it (the partition you're interested in) later, you'll want to copy the individual partitions, not the full drive image. If you already know which partition you want (ie. the 3rd partition, /dev/sda3), you can go ahead and skip this part. If you're not sure or want to check, use the fdisk tool to list out your partitions:

$ sudo fdisk -l /dev/sda

example output

You're probably interested in the largest one, measured in blocks. Let's say it's /dev/sda3

Copy the partition to a file

Let's assume that you want to copy that drive's contents to /media/thumbdrive/backup.img

Check out the man dd manpage for details on what all the arguments to dd mean. I'll provide a working example here:

dd if=/dev/sda3 of=/mount/thumbdrive/backup.img bs=1M

Showing progress

dd does not normally give any output while it works, and it can take a long time. You can get dd to show its progress by sending it a USR1 signal. You do this with the kill command.

Open another terminal, and run

killall dd -USR1

dd will then output its progress in the other terminal.

Mounting the partition later

After the copy is done, you can mount that backup.img file as if it were a device, using the -o loop option to the mount command. Let's say you want to mount it onto /media/backup:

sudo mkdir -p /media/backup # create a directory for it to mount onto
sudo mount -o loop /media/thumbdrive/backup.img /media/backup
ls /media/backup # you will see the files that are on the drive you copied

You can unmount the file later:

sudo umount /media/backup

Note that you can edit or add files inside backup.img while it's mounted. Changes will be persisted as long as you unmount properly.

share|improve this answer
    
Could I have the setup: --computer with its internal HDD --one of the partitions on the external HDD be boot-able --and the other partitions (or just images if I only wanted one partition) on the external be loop-mounts on the external drive back to the external drive? –  willbuntu Nov 23 '12 at 15:53
    
Yes, I don't see any problem with that working –  nilbus Nov 23 '12 at 15:56
    
@willbuntu: You can always use Acronis True Image or Ghost if you want a Windows solution. There's also dd for Windows. –  Karan Nov 23 '12 at 22:40
    
@nilbus: "You can still boot from an Ubuntu disc/USB drive and use dd to back up the partition, but you won't be able to mount it in Windows." - Why not? Free: OSFMount, P2 eXplorer, Sleuth Kit/Autopsy, ImDisk, VhdTool to convert to VHD and mount using Virtual PC or Gizmo Drive and so on... –  Karan Nov 23 '12 at 22:41
    
@nilbus: (Contd.) Non-Free: Forensics software such as those from EnCase, FTK etc., Mount Image Pro and so on... There are any number of ways to access raw disk (dd) images on Windows. –  Karan Nov 23 '12 at 22:42

Those are somewhat incompatible goals: either it's a completely accurate image of the filesystem, or it's reorganised to be an ISO.

Are you using Linux? What you could do then is burn an image of the filesystem as a file within an ISO, and then mount it as a loopback device.

If your hard drive fits on a DVD, it's a very small drive...

share|improve this answer
    
I wasn't intending for the ISO to fit on a DVD. The ISO was to be archived to an external HDD. And no, I wish I was using Linux, but I am not, so loopback-mounting is unfortunately out of the question. –  willbuntu Nov 23 '12 at 13:43

I want a complete and total copy of hard drive, but I want to be able to explore so that I can recover individual files or ...

You can use some commercial software which supports this (e.g. Ghost and use ghostwalker to open an 'explorer window' to the inside of the image, or you could create a full backup with dd and mount that via loopback.

But as .iso? No, not quite the way.

share|improve this answer

If you are just backing up to another hard drive, and are on Windows, you can use RoboCopy to simple copy all the files themselves off to the other drive. It doesn't need to be any more complicated than that. I have 2 drives and I was going to RAID mirror them, but decided it was just easier to set up a scheduled task to copy all the files from one drive to the other every night. If you want compression, you can probably just put everything in a big 7-zip archive on the other hard drive.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.