I have a laptop that I use for work, it is a dual-boot Win7/Gentoo GNU/Linux machine, that unfortunately needs repair due to my clumsiness. I have an extended warranty on the hardware so the insurer requires that if I want my laptop fixed that I need to take the hardware into an established computer repair shop (they will not pay for me to fix it myself). Before I take the laptop into a computer repair shop I want to make backup of my entire hard drive including all partitions, (Win 7 (ntfs), swap, root (ext4), boot (ext2) and an extra ntfs partition). Is it possible for me to make an image of the entire drive (partition layout and all) and back it up to a spare hard drive that I have laying around?

`dd if=/dev/sda of=/dev/sdb bs=64M`
where /dev/sda is damaged device and /dev/sdb is a new one (phisical devices, not partitions' numbers) - make sure you replace paths with correct one.
Devices with equal size are preferred since it will make a copy, but if you use bigger target drive you can repartition it afterwards to reclaim unused space

You can use the dcfldd command instead of dd, you will see a progress output that dd do not show.

If you try to restore the backup to an other drive than the one who Windows was installed in, Windows can refuse to boot. Windows memorise the exact first sector where it start on the partition and if that have change after the restauration it will not boot.

I ever had this problem before. A Gentoo user in this forum told me I have to use an hexadecimal editor on the Windows partition to change the written first sector where Windows memorise it to correspond to the starting new one after the restauration.

Again, you see that manipulating Windows filesystems can be more complicated than the Linux ones. This example is only one licence restriction consequence._________________Paul

This clonezilla program does not appear to be in portage. Also I just realized I will not be able to use dd because I am backing up a 500GB drive and the largest back-up drive I hava available is only 320GB which means I am going to have to do a full reinstall =(.

This clonezilla program does not appear to be in portage. Also I just realized I will not be able to use dd because I am backing up a 500GB drive and the largest back-up drive I hava available is only 320GB which means I am going to have to do a full reinstall =(.

Clonezilla is not necessary to be in portage to perform this task. Its very easy to download the clonezilla live booting .iso image into a USB drive and transfer all your partitions to another drive. I do this on a daily basis. No failures in the last 6 months.

Clonezilla is a bootable image - CD/USB, whatever. Can do all the partitions or just pick the ones you want. Its quick and produces relatively small images because it only looks at the used parts of the file systems. It knows about a lot of file system types, but will use dd to do a sector copy if its not one of these. You can restore into the same sized or larger disk. Used it at work to image W7/XP pcs, and on a mixture of PCs at home - never really had any problems with it. The website does have a very good step by step guide - which you wouldn't need after the first couple of times.

The command it uses is shown to you at some point so you can re-use the same one later without having to go through the menus again.

Problem with DD is it copies the "empty" space as well_________________The best argument against democracy is a five-minute conversation with the average voter
Great Britain is a republic, with a hereditary president, while the United States is a monarchy with an elective king