Using Dd To Ghost An Ntfs Windows Drive


Recommended Posts

I am in the middle of ghosting my windows drive. I used this command. I read using a 64 byte blocksize was more efficient

dd if=/dev/hda conv=sync,noerror of=/dev/hdb bs=64

it has been running for about one half hour, do you see any flaws in this method?

Edited by shanenin
Link to post
Share on other sites

I just made a 14gb gzipped file like this

dd if=/dev/hda conv=sync,noerror bs=64 | gzip -c  > /mnt/backup/windows.gz

I then deleted all of my partitions from /dev/hda(where windows resided), now I am seeing if I can recreate my system doing the reverse. I am guessing this will take a couple hours

gzip -d /mnt/backup/windows.gz | dd of=/dev/hda conv=sync,noerror bs=64

this is just my play system, so if I screw something up it does not matter.

assumbing this works. could this be done with a 100gb system? the single file that would create would be huge.

edit add later//

I think my above command to uncompress it is flawed, it does not seem to be writing to the disk.

Edited by shanenin
Link to post
Share on other sites

I see why you reccomended using the -c option, you would need it to write to standard output. None-the-less, it did not seem to work. I mean using cfdisk or fdisk, it does not show a partition table.

I need a reliable way to backup customers harddrives before performing possibly risky procedures, I thought maybe dd would be a possible way to go. I think I will purchase a copy of ghost. Becasue ghost uses activation, I am not sure if that will be a problem.

Edited by shanenin
Link to post
Share on other sites

I thought I would try harddrive to harddrive backup(one last time)

my windows was installed on a 20 gb harddrive, /dev/hda. I copied it to my 40 gb drive on /dev/hdb using the following command:

dd if=/dev/hda conv=sync,noerror of=/dev/hdb

I then erased my harddrive partitions on /dev/hda using cfdisk.

the first time I tried to copy it back I used this command. I figured it would run out of space, but did not think it would matter

dd if=/dev/hdb conv=sync,noerror of=/dev/hda

it seemed to copy correctly, I was able to mount the partation /dev/hda1, but when I tried to boot windows i got an error about a missing ntldr

So I tried one more time specifing the size of my 20.5 gb drive. This time it copyied without error(running out of space), but I still am getting the same missing ntldr error at reboot

dd if=/dev/hdb conv=sync,noerror of=/dev/hda bs=512 count=40088160

any ideas to why I am getting the missing ntldr error?

Link to post
Share on other sites

I believe booting a windows cd and running fixboot in repair console should fix that. It seems that it is common when cloning a windows drive to corrupt ntldr or ntdetect.

Link to post
Share on other sites

thanks for the suggestion, but no luck. When I ran fixmbr, it told me my mbr had an irregular configuration. It told me it may be unsafe to run fixmbr, but I did anyways. Upon reboot, i got the same error.

since dd is doing a bit for bit copy, I wonder why it would get corrupted.

edit added later//

I think one of the two drives I was using is going bad, so that may have factored in. i may give it a try again with a new drive.

Edited by shanenin
Link to post
Share on other sites

see if this site helps

http://www.pccitizen.com/driveimage.htm

here is a note on ntfs from partimage.

The NTFS (Windows NT File System) is currently not fully supported: this means you will be able to save an NTFS partition if system files are not very fragmented, and if system files are not compressed. In this case, you will be able to save the partition into an image file, and you will be able to restore it after. If there is a problem when saving, an error message will be shown and you won't be able to continue. If you have successfully saved an NTFS NTFS partition, you shouldn't have problems as you restore it (except in the case of bugs). Then the best way is to try to save a partition to know if it is possible. If not, try to defragment it with diskeeper or another tool, and try to saving the partition again.

also see the tool ntfsclone

http://linux-ntfs.sourceforge.net/man/ntfsclone.html

also using conv=sync,noerror on a restore has been known to case errors in data out..

see http://www.inference.phy.cam.ac.uk/saw27/n...tions.html#ntfs

I use Puppy Linux on a USB pen drive for this work, save the image on a file server, this way you can set up a restore method from network, PXE is a great way to boot linux.

if you need to Knoppix has a PXE boot option and contains partimage.. so you would boot to image to back up a drive and boot it to restore a drive.. great for an admin as they only need to setup teh PXE server and choose in BIOS to boot from network to backup or restore..

http://www.kegel.com/linux/pxe.html

http://www.babytux.org/articles/howto/how2netknoppix.php

Edited by iccaros
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...