Copying a Hard Disk Containing Windows With Fedora

John Summerfield debian at herakles.homelinux.org
Sat Mar 15 00:13:38 UTC 2008


Oliver Ruebenacker wrote:
>      Dear friends,
> 
>   I need to copy the hard disk of a Windows computer to a new hard
> disk of equal size. I was thinking of connecting both drives
> (SATA/150), booting from the Fedora 8 Rescue Disk and then do
> 
>   dd if=/dev/hda of=/dev/hdb
> 
>   in hope that after that, the second hard disk can be used in place
> of the first one (including booting Windows, of course).
> 
>   Does this work? Thanks!

It probably will work[1], but I would worry that the disks' gemoetries 
may differ a little. Not all 120Gbyte drives have the same number of 
cylinders.

I copy Windows immmoderately often. My preferred tool is a bootable CD 
including ntfs-progs - think the latest Knoppix.

ntfsclone does an excellent job of copying a partition.
If you need to change a partition's size, there's ntfsresize.

I'd probably copy (extremely carefully) the first sector with dd, then 
use hdparm to make Linux reread the partition table on the target drive.

To be safe, I might resize the source partition(s) to a little smaller 
using ntfsresize.

Then copy with ntfsclone, and resize again at the destination to make 
sure the data fit snugly into the partition.

[1] I used dd to copy an 80 Gbyte drive to a 320 Gbyte drive. I'm happy 
with the results, but then if it went wrong I know what to try next. It 
would not work if the target drive was even one sector shorter. 
Depending on partitioning.



-- 

Cheers
John

-- spambait
1aaaaaaa at coco.merseine.nu  Z1aaaaaaa at coco.merseine.nu
-- Advice
http://webfoot.com/advice/email.top.php
http://www.catb.org/~esr/faqs/smart-questions.html
http://support.microsoft.com/kb/555375

You cannot reply off-list:-)




More information about the fedora-list mailing list