upgrading to larger hard drives with multiple OSes

sciencewhiz

Diamond Member
Jun 30, 2000
5,885
8
81
I just bought new, larger, harddrives for two laptops. Both are partitioned, and the partition sizes need to expand. I have partition magic 7, and I have access to a linux machine, a OpenBSD machine, or a Windows 2000 machine to put the harddrives in and copy the data.

One computer runs Windows 2000 (Fat32), 2 different distributions of linux (all Ext3 partitions), and has an IBM hidden recovery partition. The other runs Windows XP (NTFS) and has a Dell hidden recovery partition.

I've come up with two options for moving the data and would like opinions on those or any other ideas.

One is to use the program that comes with the harddrives and copy the data to the new drives then use partition magic/parted to resize the partitions. The second is to recreate the partition structure with the new sizes on the new drive and use dd to copy each filesystem over.

As for the first idea, I think I remember partitioning programs not being able to move the beginning of an ext2/ext3 partition. For the second one, will dd correctly move everything to the larger partition? Any other suggestions?

I'll obviously make a backup before doing anything.
 

cubby1223

Lifer
May 24, 2004
13,518
42
86
Symantec Ghost - the new versions still ship with Ghost 2003 included, copy the ghost executable to a bootable floppy.
 

sciencewhiz

Diamond Member
Jun 30, 2000
5,885
8
81
Originally posted by: cubby1223
Symantec Ghost - the new versions still ship with Ghost 2003 included, copy the ghost executable to a bootable floppy.

reading through the Ghost manual, it doesn't look like it lets you manually choose the new parition sizes, either it automatically chooses or you get the same as before. Can you confirm that? If that's the case, there's no reason to use Ghost over the free tools I mentioned.

Acronis Trueimage's manual is much more detailed and seems to do what I want.

 

drag

Elite Member
Jul 4, 2002
8,708
0
0
You could try...

Take both disks, put one as master on one ide channel and the other the master on the other ide channel.

Boot up with Knoppix and go:

dd if=/dev/xxx of=/dev/yyy

were xxx is the source drive, and yyy is the destination. Don't get those mixed around or they'll erase your data.

That will make a copy of the first drive onto the second drive and everything should be the same and it should boot.

Then resize the partitions to fill up the new drive using qparted or partition magic or whatnot.

Not sure with how well all that will go with all the different filing systems and whatnot.

You could just copy it over and extend the extended partition to fill up the new space and then divide up the disk space into logical partitions as mounts and drive letters for the other OSes. Like make one new partition /home for Linux, or drive :E for Windows or whatnot.

Although Windows tends to flip out with stuff like that. It's pretty fragile when it comes to removing or adding new drive letters sometimes...

At least no matter what you do don't format the old drive until you know the new drive is running well. That way any mistakes or bad things that you do you can always just start over from scratch without loosing any data... Just as long as you don't accidently format the original drive.
 

TonyRic

Golden Member
Nov 4, 1999
1,972
0
71
I did this very thing when I replaced the HDD in my lappy.

I used dd from the PCLinuxOS Live CD to copy over the Windows partition (which I did not want resized. Verified that it could be booted.

Then I again booted up on the PCLinuxOS Live CD and created the exact same partition structure that I had with Linux, except that I used the new partition sizes and formatted them with the same filesystem (XFS in my case). Then I used a tarpipe.

For instance, I would be booted off the Live CD. I would mount the old disk root partition under /mnt/old and the new root partition under /mnt/new then execute the following command:

(cd /mnt/old && tar cf - . ) | (cd /mnt/new && tar xvfp -) rinse and repeat for all partitions.

Then assuming that /, /boot, /usr and /var are all on the same filesystem (partition), remount that as /mnt/new and then 'cd /mnt/new' and execute the command 'chroot'. Then reinstall your bootloader by running 'lilo' or 'grub --install' (I may have the command switch for grub incorrect because I don't use grub often, I prefer lilo. Then type exit a few times until your window goes away and reboot the system removing the Live CD.

This is just how I prefer to do it because it cleanly allows you to resize your filesystems, without worry about blowing up your partition table or some other potential issue.
 

sciencewhiz

Diamond Member
Jun 30, 2000
5,885
8
81
Originally posted by: TonyRic
I used dd from the PCLinuxOS Live CD to copy over the Windows partition (which I did not want resized. Verified that it could be booted.

Do you use the wndows bootloader to load lilo or lilo to load the windows bootloader? Basically, how did you boot to windows if you didn't copy the bootloader?
 

TonyRic

Golden Member
Nov 4, 1999
1,972
0
71
I always install Windows first and use Lilo to boot into Windows. I have never liked the Windows bootloader so I never use it. Lilo can boot windows easily. This is my lilo config sextion for Windows:

other=/dev/hda1
label="win_c"