Copying a drive without imaging software?

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
RobertPaul
Forum Contributor
Posts: 122
Joined: Sun Sep 18, 2005 8:54 pm
Location: OCNY

Copying a drive without imaging software?

Post by RobertPaul »

So I've got a drive that's on its last leg ... I have a new disk ready to roll but I don't really want to shell out for Norton Ghost just to mirror the drive. I can't do it while Windows is running, since it's picky about not copying files/directories that are in use. I can't boot to a prompt since ... well, WinXP can't boot to a prompt. I can't boot to a Linux live CD since Linux can't write to NTFS.

Any suggestions? =\
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Don't have the XP disc?

What about Bootdisk.com?
RobertPaul
Forum Contributor
Posts: 122
Joined: Sun Sep 18, 2005 8:54 pm
Location: OCNY

Post by RobertPaul »

I do indeed have an XP disc (legit, too!) but from what I understand, the Recovery Console (the closing thing to a prompt) is severely limited.

Bootdisk.com looks like it might have what I need ... I'll have to poke around.
Roja
Tutorials Group
Posts: 2692
Joined: Sun Jan 04, 2004 10:30 pm

Re: Copying a drive without imaging software?

Post by Roja »

RobertPaul wrote:So I've got a drive that's on its last leg ... I have a new disk ready to roll but I don't really want to shell out for Norton Ghost just to mirror the drive. I can't do it while Windows is running, since it's picky about not copying files/directories that are in use. I can't boot to a prompt since ... well, WinXP can't boot to a prompt. I can't boot to a Linux live CD since Linux can't write to NTFS.

Any suggestions? =\
Actually, Knoppix has an NTFS write driver now. Its experimental, but it works. That and dd, and you are all set. :)
RobertPaul
Forum Contributor
Posts: 122
Joined: Sun Sep 18, 2005 8:54 pm
Location: OCNY

Re: Copying a drive without imaging software?

Post by RobertPaul »

Roja wrote:Actually, Knoppix has an NTFS write driver now. Its experimental, but it works. That and dd, and you are all set. :)
What does dd do that cp doesn't (besides being much more complicated, judging by the man page)?
Roja
Tutorials Group
Posts: 2692
Joined: Sun Jan 04, 2004 10:30 pm

Re: Copying a drive without imaging software?

Post by Roja »

RobertPaul wrote:
Roja wrote:Actually, Knoppix has an NTFS write driver now. Its experimental, but it works. That and dd, and you are all set. :)
What does dd do that cp doesn't (besides being much more complicated, judging by the man page)?
cp copies, dd does binary imaging.

The difference is substantial. CP is for files, dd is for whole disk imaging. Its like comparing xcopy with norton Ghost - totally different.
RobertPaul
Forum Contributor
Posts: 122
Joined: Sun Sep 18, 2005 8:54 pm
Location: OCNY

Post by RobertPaul »

So just to clarify, since I don't fully understand the implications of dd... my brain is fried.

I've got a 40GB drive that's my main boot drive, and a 200GB drive that I want to be may main drive because the 40GB is about to fail. If I just dd if=/dev/hda5 of=/dev/hdb2 (where hda5 is the 40GB and hb2 is the 200GB) will I be able to boot* from from the 200GB? Will it affect the formatting/partitioning of the 200GB?


*Once I switch it over to Master, obviously!
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Post by Benjamin »

I recall windows has a volume shadowcopy system you may be able to use. That is what the standard windows backup system uses. You might want to look into that.

DO NOT write to an ntfs drive from linux. Even the developers who wrote the drivers for linux will tell you that. It is experimental and you may end up with corrupt files that you might not detect for months, and by then the original hd will probably be in the trash.
Gambler
Forum Contributor
Posts: 246
Joined: Thu Dec 08, 2005 7:10 pm

Post by Gambler »

will I be able to boot* from from the 200GB?

Yes.
Will it affect the formatting/partitioning of the 200GB?
Yes. I would recomment to use balnk unpartitioned drive.
Roja
Tutorials Group
Posts: 2692
Joined: Sun Jan 04, 2004 10:30 pm

Post by Roja »

agtlewis wrote:DO NOT write to an ntfs drive from linux. Even the developers who wrote the drivers for linux will tell you that. It is experimental and you may end up with corrupt files that you might not detect for months, and by then the original hd will probably be in the trash.
They tell you the opposite:

Are there any utilities on the knoppix disk to conveniently manage partitions , which points to: http://mlf.linux.rulez.org/mlf/ezaz/ntf ... ml#example , which is titled "How to resize NTFS without data loss?"

In fact, their comment is: "Choosing a distribution including ntfsresize version 1.11.2 or later is highly recommended because they are able to resize all type of fragmented NTFS safely, there isn't need for defragmentation in advance at all."

I've done so dozens of times in the last year, to no negative impact.
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

I'm sure the last time I compiled my kernel I stumbled across NTFS Write Support in there... They've been hacking to get this working for a good few years now.

Yeah... to image your drive just use `dd' from a linux boot disk... it will copy the boot sector too if that is on that partition and not the start of the disk itself. In fact, with dd you could copy *only* the boot sector if you really wanted to... this is done for allowing windows bootloader to boot linux but that's beside the point :P

Even if you copy the boot sector along with the partition you'll need to use fdisk to set the partition you copy it to as bootable though ;)

If it really is about to completely pack in (as you might have noticed my recent post in this forum yesterday since my drive packed in) then I'd image it asap, start using a new drive and keep the old drive as a spare for non-critical stuff.
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post by timvw »

dd also copies symlinks, fifo-files, ... (don't know how relevant that is on a windows filesystem though)
and offcourse, it's cool to write your own bootloader and copy it to the first 512 bytes of your harddisk ;)
RobertPaul
Forum Contributor
Posts: 122
Joined: Sun Sep 18, 2005 8:54 pm
Location: OCNY

Post by RobertPaul »

Well ... I'm set now. I think. Perhaps I'll chronicle my adventure when I have a chance to write it up. 8O

Thanks for the help, everyone.
Post Reply