OT: Cloning windows XP with dd

Vaughn Treude vltreude at deru.com
Sat Oct 8 18:26:01 MST 2005


On Sat, 2005-10-08 at 11:00, Kurt Granroth wrote:
> On Oct 8, 2005, at 6:45 AM, Vaughn Treude wrote:
> > On Fri, 2005-10-07 at 20:09, Kurt Granroth wrote:
> >> On Oct 7, 2005, at 6:10 PM, Vaughn Treude wrote:
> >>>     A while back I posted a question about cloning a Windows XP
> >>> drive using
> >>> a Linux live CD such as Knoppix.  The suggestion to use "dd" was a
> >>> good
> >>> one.  I googled this command and found detailed instructions on
> >>> www.nilbus.com for doing this.  In short, they said to:
> >>>     Use fdisk to create partitions on the new drive identical to
> >>> those on
> >>> the old drive (using the -u option to display sectors rather than
> >>> cylinders, which ensure that they'll be the same.)
> >>>     Use dd to copy the 440 bytes of the boot partition.
> >>>     Use dd to copy the contents of the other partitions.
> >>>
> >> [snip]
> >>
> >> Heh, what a coincidence.  I cloned a WinXP partition using dd on
> >> Wednesday for the first.  It worked like a charm.
> >>
> >> The one thing I did different was in copying the MBR.  Instead of
> >> copying parts of the boot partition (is there such a thing with
> >> Windows?), I copied the entire 512 bytes of the MBR.
> [snip]
> > Hmmm, that's interesting.  The instructions said to copy only 440  
> > bytes
> > because the partition table lived in the rest.  Since you did that  
> > last,
> > I'm surprised it didn't mess something up.  Though the partitions were
> > the same, I don't know if the actual contents of the table could  
> > differ
> > at all due to disk geometry.  If not, no problem.  I will try copying
> > the MBR again, at least those first 440 bytes.
> 
> Well, the instructions that said 440 bytes are definitely wrong.   
> Basically,
> the 512 bytes includes 446 bytes of the MBR and the rest is the  
> partition
> table.  Or better yet, rather than rely on my memory (which can be  
> horribly
> faulty), here is a reference page:
> 
> http://www.ntfs.com/mbr-damaged.htm

I stand corrected.  I rechecked the original source and it was indeed
446, and I was following the written instructions when I did that.  The
440 figures my own faulty memory at work.  :-)  That NTFS reference is
interesting, though. From the symptoms they describe, it looks like the
MBR got damaged somehow after I copied it, and I need to copy or create
it again.
> 
> So at minimum, you'll have to copy over the first 446 bytes.
> 
> HOWEVER, I would recommend copying it all.  Remember that you created  
> the
> partitions on the new drive to be identical to the old one so the
> partition table should be identical.  FWIW, when I was doing my own  
> research
> last Wednesday, every site I went to recommended the entire 512.
> 

Yeah, I just didn't know how the table was kept internally, so I didn't
know if there was any dependence on the number of cylinders, which would
in turn depend on disk geometry.  Assuming that the actual numbers in
there are sector-based, and that the cylinder info is just for the
benefit of us humans, it should have worked either way.

> > More likely though, it's something to do with that darned hidden
> > partition.  It appears the system you cloned didn't have one.  I have
> > been researching this issue and have found some venomous comments  
> > about
> > Compaq/HP's weird setup.  The hidden partition contains not only
> > recovery info but it has files necessary for the boot.  I know  
> > that's a
> > common thing in the Linux world, but at least for us, everything's
> > documented.  I haven't yet found much useful info on this "feature".
> 
> Hmm.. you're right that this system didn't have a recovery partition
> (although it was a Compaq/HP).  As long as you replicate that exactly on
> the new drive as well, why would it be a problem?
> 

That's what I can't figure out!  I was thinking there might be some evil
checksum or special code somewhere that the HP's BIOS might be checking
before allowing it to boot.  But I will try recopying the MBR (or
perhaps make a startup disk and try doing a FIXMBR from the recovery
console.)

> Good luck!
> Kurt

Thanks.  Hopefully I can get this done soon so I can go back to
concentrating on a better designed OS.

Vaughn

> ---------------------------------------------------
> PLUG-discuss mailing list - PLUG-discuss at lists.plug.phoenix.az.us
> To subscribe, unsubscribe, or to change  you mail settings:
> http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss
> 
> 



More information about the PLUG-discuss mailing list