I have a netbook with Windows XP installed on it. I'd like to play around with it a bit(read: install another OS), but before I set out to do that, I'd like to make a complete image of the harddrive. I can not take the harddrive out(without a lot of work unscrewing things and violating my warranties). So what is the best way to backup the harddrive? The harddrive is only 16g big, but I don't have a 16g flash drive, so I must resort to backing it up via network. Also, just to be clear: I would like to backup the entire harddrive including the MBR and partition tables and such so that I can restore it to exactly the same way it was.

How would I do this though? I'm comfortable using dd, and I have a flash drive I can boot off of with OpenBSD installed. I'm just not sure how to send it through the network, and also if I can maybe do some kinda compression first.

Also, I do not want to have to buy any software/hardware to do this.

link|improve this question

64% accept rate
feedback

5 Answers

up vote 1 down vote accepted

If you "zero" the free space first (for instance using the -z option of sdelete) to improve the overall compression rate, you will probably find the backup will fit on an 8Gb flash drive compressed. If you don't have a lot on there it may even fit on a 4Gb drive.

As for backing up over the network, I back up my netbook to a Samba share by booting from a "live CD" USB stick (such as Ubuntu netbook boot CD, though most live CDs will do just as well) and doing the following:

# ensure relevanrt bits installed 
# (replace apt-get with yum here for some distros, you may need to alter package ames too)
aptitude install cifs pv

# mount the share (you'll be prompted for password before the mount succeeds)
mount -tcifs //server/sharename /mnt -ousername=UserNameOnServer

# copy both drives
# (replace pv with cat if you don't have pv, but the progress indication from pv is handy)
# (also, of course, update drive device name(s) as needed, you probably only have one drive to copy too)
pv /dev/sdb > /mnt/subdirectory/sdb.img
pv /dev/sdb > /mnt/subdirectory/sdc.img

(if your LiveCD of choice does not have pv avaialable or installable, you can grab the source from the program's home page)

If you don't have a convient SMB/Samba share on your network, you could try the very handy netcat. On the receiving end run netcat -l -p 1234 > /dir/to/write/to/sda.img and on the sending end pv /dev/sda | netcat 111.222.333.444 -p 1234 (there 111.222.333.444 is the address of the receiving machine and again replacing pv with cat if pv is not available)

Edit

Your mention of sftp reminds me - you could just copy via SSH:

cat /dev/sda | ssh user@hostname "cat > /dir/to/save/to/sda.img"
link|improve this answer
Ah, I was just thinking too complicated, like that sftp or rsync would need to be used and such.. +1 for the neat netcat solution. – Earlz Feb 24 '10 at 20:52
feedback

Just load up BSD, mount a network share from a different machine, and dd the drive to that.

I would say that samba is your best bet if the other computers are running windows, it's worked well for me when I have to dirty my hands with windows.

link|improve this answer
feedback

Driveimage XML is free and ok. If you look for even an easier way, ready to spend a few bucks, and want to optimize even more (excluding pagefile automatically, scheduling backup automatically), Trueimage from Acronis is a longtime winner ...

link|improve this answer
feedback

You could use FOG, it is a Linux-based, free and open source computer imaging solution for Windows XP and Vista.

link|improve this answer
feedback

You could try DriveImageXML, the private edition (which is all a regular person needs) is free and takes a full image of the harddrive, excluding empty space of course. It can compress the drive image, which should save you some time when you copy to a network share or ftp server.

link|improve this answer
That URL isn't working – Earlz Feb 24 '10 at 20:46
Looks like the site is having issues, probably temporary. Here is the google cache: 74.125.95.132/search?q=cache:6CCqO5HiS3AJ:www.runtime.org/… – Millhouse Feb 24 '10 at 21:07
You can download from download.cnet.com/DriveImage-XML/3000-2242_4-10443230.html as well. – Millhouse Feb 24 '10 at 21:17
feedback

Your Answer

 
or
required, but never shown

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