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.

My laptop's current setup dual boots into Windows XP and Linux Mint. The harddrive seems to be going bad, so I want to backup all the data from the Windows partition.

This laptop was a loyal servant for my 5 years in college for Computer Science, and as you can imagine, I have a lot of development files spread across all parts of the filesystem, so picking and choosing directories to copy to my thumbdrive will be very time consuming.

My ideal solution would be to create an image of the partition on an external harddrive, in a way so that I can later browse the files, should i ever need to find some old code files I had written.

It seems that my two options are to either create a disk image that I can later restore on another machine (via Clonezilla, DriveImage XML, TrueImage, or Ghost) , or create a virtual image where I can later mount in a virtual machine (via VirtualBox, VMWare, Virtual PC).

My question is: Can I create a partition image in a way that I can simply browse and run file searches on the file structure, without having to reload/restore the entire OS on another machine, load the entire image in a virtual machine, or extract the entire .iso file in a program like MagicISO, each time I want to access it? I just want to jump right in to view the files. I do not expect to write to the image - only read from.

Thanks for reading!!


UPDATE:

the path I have chosen thus far is to use the linux 'dd' tool (as recommended by Gilles). the reason is because I tried to install on my Windows partition Macrium Reflect and DriveImage XML or creating an image, and Disk2vhd for creating a virtual/mountable harddisk, but windows craps out on me when I do certain tasks related to explorer.exe and other processes. this is obviously due to the failing drive. the only downside is that I have to do this from a live Linux Mint disk, as the linux partition on the laptop won't even load because of corrupt/dirty disk sectors - a problem i once circumvented to obtain some files long ago, but don't have time to deal with now. which brings me to the task of having to monitor the two hour process each couple of minutes so the live cd screensaver doesn't come on and crap out the entire process... (oy vey!)

for anyone who wants to know, this is the command line process i put together:

create a mount location

sudo mkdir /mnt/usbdrive

find the location of my external usb harddrive (sdb1)

sudo fdisk -l

mount it as a drive

sudo mount /dev/sdb1 /mnt/usbdrive

perform the backup command, disregarding any errors

sudo dd if=/dev/sda2 of=/mnt/usbdrive/sda2.image bs=16M conv=noerror

in another terminal window, while 'dd' is working, we can trigger the process to spit out status updates every 2 minutes:

watch -n 120 sudo pkill -USR1 dd

Thanks for all the suggestions, and Happy Linux-ing! :)

share|improve this question

4 Answers 4

If you create a raw image of the partition as a file, you can mount it later from Linux as if it was a partition:

mount -o loop partition.image /mnt

This won't (easily) work if you have a compressed image.

By the way one way (out of many!) to create the image from Linux is

dd if=/dev/sda1 of=/media/usb/sda1.image bs=16M

where /dev/sda1 is the partition you want to back up (fdisk -l lists your partitions, make sure you select the right one), /media/usb is where the external drive you're backing up to is mounted, and bs=16M says how much to copy in one go and is only there for efficiency.

share|improve this answer

I wouldn't bother with an image but would create a folder on the external hard drive and copy everything from the Windows partition into it. You could either not bother copying or delete the \Windows and \Program Files and any other unneeded directories.

Alternatively, how about just whacking the whole partition into a zip file if space is at a premium (how long would it take to open the zip?), the zip file managers I use allow one to look at a single file within the whole.

share|improve this answer
    
well, in the event that one day i would like to completely restore the partition (god forbid), i'd like for the entire partition to be in tact. this would require registry values and such also being backed up. i did consider this, but i guess i'm just not sure what i may need in the long run... –  haferje Aug 8 '10 at 19:07

Norton Ghost can. You use Ghost Explorer http://service1.symantec.com/support/on-technology.nsf/docid/2001110808002125?Open&src=w

No doubt acronis trueimage can (since many people prefer it to Ghost)

Maybe the other ones you mention can too. Including freeware ones.

share|improve this answer
    
would they also allow me to do file searches on specific in-file text? i would like to use my favorite search app AgentRansack or some functionality similar to it. AgentRansack is great for regular expression searches! –  haferje Aug 8 '10 at 19:11
    
I just know that i've extracted folders from an image with Ghost Explorer.. I don't know if it has a search.. though if it did then I doubt it'd be as advanced as to support regex searches within files. You may have to extract the directories for that(then agent ransack). You could do both a clone image and copy all the folders over somewhere(zipped for tidyness)! powergrep is very good for regex searches, it can do PDFs too, though it's not freeware, and even then, I doubt it can search partition images from various proprietary programs. –  barlop Aug 8 '10 at 19:50
    
btw, googling.. norton ghost explorer may be a bit old now. (no new version for a while). downloadable but not included in later versions of ghost so may be better alternatives. –  barlop Aug 8 '10 at 19:52
    
You could make both a clone, and extract all files and folders. though that would need twice as much space. Or, if your regex searches are only on paths and filenames, then just do dir c:\ /b/s/a >c:\filelist.txt and then you have a file you can keep alongside the image and can do regex searches on to locate files/folders. And if you find one you want, then you can extract it. –  barlop Aug 11 '10 at 12:28

I use Acronis to do exactly what you want, the image created can be mounted as a drive letter in Windows Explorer, files and folders can then be read or copied, even modified within the image if needed.

http://www.acronis.com/homecomputing/products/trueimage/index.html

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.