[ltp] Upgrade HD
Jim Harvey
linux-thinkpad@linux-thinkpad.org
Sun, 13 Feb 2005 10:47:21 -0600
David Sudjiman wrote:
> Dear All,
>
> I'm using my previous 30 GB for
>
> /dev/hda1 winxp (ntfs)
> /dev/hda2 fat32
> /dev/hda4 extended
> /dev/hda5 linux-swap
> /dev/hda6 linux (ext3)
>
> Now, It is replaced with bigger 80 GB HD and I've done copying my
> /dev/hda2 and /dev/hda6. Full description on
> http://davidsudjiman.blogspot.com/2005/02/upgrading-my-thinkpad-hd.html
>
> I put my previous 30GB hd on external usb-cable casing and trying to keep
> it intact as I haven't succeed with any of winxp partition copy.
>
> Here what I did:
> 1. dd .. did not work
> 2. norton ghost .. did not work, Now I don't have any M$ installed on my
> laptop so I don't think I can do any M$ stuff.
> 3. captive-ntfs .. did not work. It did not write, "operation not
> permitted" it said
> 4. partimage .. did not work.
>
> What should I do?
Try the tar trick. Mount the new partition as /mnt/new, cd to the old partition and:
tar cf - ./* | (cd /mnt/new ; tar xf -)
I've had good luck copying windows 98. No XP or NTFS here to try it out. This will not copy the bootloader. You have to fdisk /mbr to get windows booting and then redo LILO or GRUB from a rescue CD. The last time I did a win 98 copy was (larger drive in laptop, same as your situation) I also had to use the DOS system command to reinstall the second stage boot loaders before windows would come up.
I have quite a collection of commands from various mailing lists on this subject.
cp -a /source /mnt/new
tar -cf - ./ | (cd /mnt/new && tar -xvf -)
tar cpsSf - , | )cd /mnt/new && tar xvpsSf -)
tar clf - . | (umask 0 ; cd /mnt/new ; tar xvf - )
--
Jim Harvey, Naperville, Ill. Linux person - WB8NBS/9
He who dies with the most software wins.