0

My setup has two hard drives. A smaller hard drive with the Windows C: partition and GRUB, and a larger hard drive with a Windows D: partition, and a Linux install - separate / and /home partitions. The Windows D: is not a system partition, but has quite a lot of applications installed in addition to other data. This bigger hard drive is about to fail, it started making the click of death today, so I'm replacing it as soon as I can.

I want to move the D: partition and the Linux install to the new drive. I know how to clone to a hard drive of the same size, or when just one OS is involved, but here I am not entirely sure, and would rather double check before I break something.

For Windows, I assume the following should work. Connect the new drive, with an empty partition that would become E:. Copy all of D: to E:, then after unplugging the old drive the new one becomes D: and everything works because paths remain the same.

For the Linux /home partition there's no problem, re-creating it on the new drive and copying with any method should work.

The / partition is where I have no good ideas. I would rather not use dd because I expect the new drive to have different partition sizes. The failing drive is 750 gigs, the new one will be at least 1 TB, and space on /home is currently tight, so I'd rather assign more on the new drive. But this rules out dd I think. Would straight-up copying the root filesystem excluding /dev and /proc possibly work?

Finally, there's the boot loader. It's on the drive that will remain in the PC, so it should be simply a matter of booting a live Linux system to point GRUB to the new Linux partitions with their UUID once all is done. Any caveats here?

1 Answer 1

0

In your shoes, I would use dd to clone the old disk to the new one, and then use gparted from some live usb stick (Ubuntu) to re-size the /home partition. It is by far the simplest solution. Should you have any problem with the partition table at the end of this exercise, you can use the utility fixparts which is available in Ubuntu as well.

Still, I would suggest that, even before moving your data to their new permanent lair, and especially in consideration of both the unsafe condition of your external disk and of the moderately risky re-sizing operation, you perform a back-up of your data onto a different medium. This course of action is the one that would definitely minimize your chances of losing a part of your data.

2
  • Gparted essentially wraps dd to clone a drive while choosing the optimal block size for you. Use it for cloning too, if you're going to use it anyway later on. Nov 17, 2013 at 14:50
  • Fair enough. I dislike the 15-character rule. Nov 17, 2013 at 15:27

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .