LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   Clone with dd if=/dev/hda of=/dev/hdb question (https://www.linuxquestions.org/questions/linux-hardware-18/clone-with-dd-if%3D-dev-hda-of%3D-dev-hdb-question-259790/)

wrc1944 11-27-2004 07:00 AM

Clone with dd if=/dev/hda of=/dev/hdb question
 
I have a dual boot 20GB drive with winxp (4 partitions, FAT32), and Mandrake 10.0 (4 partitions, reiser3).

Is there any way to use dd if=/dev/hda of=/dev/hdb from a knoppix live cd boot, to copy the 20GB into a 40GB or larger drive, having it bootable, and also have dd expand all the copied partitions into proportional sizes on the larger drive, using the entire drive? In otherwords, like Drive Image would handle a winxp only installation.

I was just about try this, but then luckily read where expert Neddy Seagoon on the Gentoo formum says not to use dd for this, as it will only make an exact 20GB copy, including the MBR partition table, and thus make the remaining free space on the new drive unusable. Is this correct, and is there any way around this limitation? I've googled for many hours, read the Gentoo and knoppix forums, and can't find anything explaining my exact circumstances.

I need winxp to run professional Music sequencing etc. software- Rosegarden is just not well-developed enough yet (hopefully soon!), compared to Cubase or Cakewalk Sonar4. I use Gentoo for everything else, but unfortunately in this case it appears I'm going to have to use winxp. I need to clone my xp to a new larger faster drive, on the same box.

Thanks,
wrc1944

jailbait 11-27-2004 10:52 AM

"Is there any way to use dd if=/dev/hda of=/dev/hdb from a knoppix live cd boot, to copy the 20GB into a 40GB or larger drive, having it bootable, and also have dd expand all the copied partitions into proportional sizes on the larger drive, using the entire drive?"

No.

"I was just about try this, but then luckily read where expert Neddy Seagoon on the Gentoo formum says not to use dd for this, as it will only make an exact 20GB copy, including the MBR partition table, and thus make the remaining free space on the new drive unusable. Is this correct, "

Yes.

"is there any way around this limitation?"

Before you start make a boot floppy so that you can get back into your old Mandrake system if something doesn't work right.

Boot into Mandrake. Use fdisk to partition the new drive. Use mkfs to format the new Linux partitions. Use tar to copy the Linux partitions to the new partitions. Edit your grub.conf or lilo.conf on your new drive. chroot to / on new Mandrake and run lilo or grub-install. Boot into the new Mandrake and copy Windows using dd. The Windows file structure is simple minded enough that copying Windows that way should work.

---------------------------
Steve Stites

aus9 11-28-2004 09:10 AM

if you have nothing to lose try this

1) dd as above
2) knoppix run qt_parted which you use to resize your partitions
3) hopefully when you click on apply it should overwrite the mbr

4) workaround if above fails....see if qtparted sees your partitions as PRIMARY if they are change one to extended then add a partition for the free space then resize and delete/shrink the newly created one

just a thought never tried it myself


All times are GMT -5. The time now is 12:50 AM.