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.

5 Answers 5


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)


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"
  • 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, 2010 at 20:52

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.


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 ...


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


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.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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