[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [debian-user] How to copy a laptop HD?



On Tuesday 20 May 2008 01:47:03 pm Javier Vasquez wrote:
> I did a copy of the contents of each partitions, except by /proc under
> root, into the new created ones, but I used "cp -a" instead of "dd".
> This might have prevented copying the boot sector, necessary for the
> boot sector probably...
>
> Do you suggest using "dd" instead?  Would it work even if the destine
> partition is bigger (I read somewhere it works perfectly when source
> and destine are the same size, but I never read it works perfectly
> when destine is bigger)...

You did it the right way the first time.  dd only works with same-size block 
devices anyway.

> What about the HD MBR?  I've tried already using "dd if=/dev/hda
> of=~/full_mbr.bin bs=512 count=1 && dd if=~/full_mbr.bin of=/dev/sda
> bs=446 count=1", but it didn't seem to work...  I wouldn't know if
> using count=2 to include the boot sector would work since the boot
> partition is the 2nd one (the swap is the 1st one)...

Don't try to copy it, reinstall it.  Less messy, less prone to failure.

> Any ways, I'm still on trials, but I haven't gotten grub to work yet.
> I tried also "grub-install" on sda, but that doesn't seem to work, it
> only does with chroot to the mounted root of sda and with a bind to
> the mounted boot of sda, however partially since it doesn't get to
> read stage2.  Running manually grub over the chroot seems to overcome
> the stage2 thing, but I still don't get grub to work after booting.

You're on the right track, I remember getting it to work from approximately 
that point, I just can't remember what I had to change to get it to work from 
there.

-- 
Paul Johnson
baloo@ursine.ca

Explaination of .pgp part: http://linuxmafia.com/faq/Mail/rant-gpg.html

Attachment: signature.asc
Description: This is a digitally signed message part.


Reply to: