Monday, March 4, 2019

Moving Windows non-system partition and Linux to a new drive

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?

No comments:

Post a Comment

hard drive - Leaving bad sectors in unformatted partition?

Laptop was acting really weird, and copy and seek times were really slow, so I decided to scan the hard drive surface. I have a couple hundr...