PDA

View Full Version : Linux Image Backup of Win/Dos



17-07-2001, 12:04 AM
I am dual booting Linux/Windows. I want to make a backup or ghost/image of my Win/Dos partition in Linux. I believe I need to mount my dos/win partition? Then run a dd command. Something like dd if=/dev/hda1 of=windows.img
Am I on the right track? Can someone please post me a step by step guide to doing this along with command lines. Also if I do the above, how do I restore the image file when I need to reinstall win/dos?

Thank you in advance.

25-07-2001, 01:58 PM
You've pretty much solved the whole thing. Say your windows partition is /dev/hda2 (primary master, second physical partition in dos FDISK language) then you can
back it up using

% dd if=dev/hda2 of=windows.img

_Alternativly_ you can mount the partition

% mkdir /mount/windows
% mount -tfat32 /dev/hda2 /mnt/windows

Have a look around to make sure it is there. You can't use automatic mounting because it defaults to MSDOS rather than FAT which means you lose your long filenames

Now you can make a backup using standard backup tools (kbackup, retrospect) or even tar

% tar -zcf windows.tgz /mnt/windows

To restore the dd version use dd if=windows.img of=/dev/hda2

To restore the tar version, put the tar file in the destination directory and replace the c with an x
% tar -zxf windows.tgz

Corrin