3

Currently I am using a 320gb hard disk on my laptop. I have a newer 500gb one. I decided to migrate the 320gb HDD and its contents into the 500gb one.

Problem is that my 320gb HDD has multiple partitions in it, with bootable OS in each of them.

    sda1    primary     Windows   ntfs
    sda3    primary     Linux     ext4
    sda2    extended    
    L sda5   logical    Linux     ext4
    sda4    primary     Linux     ext4

I planned to use my desktop mobo with 2 sata connectors and a Lubuntu 14.04 USB drive to boot from and do the clone.

I planned to just use Gparted to create partitions on the new 500gb drive to the size that I want that's larger than the current partitions in 320gb and just do dd to each partition. That would preserve the files and OSes right? But then the boot would be screwed? How to fix the boot from here, can i just restore the grub from the USB boot will do ?

Or

Second option is to dd if=sda of=sdb, do it to the whole drive, not individual partitions, then resize the partitions using Gparted?

Will any of these work ?

p.s. I might not be able to reply in few hours until tomorrow again. Thanks

user590696
  • 41
  • 1
  • 5

1 Answers1

1

So yes. It all worked out. I moved all my 4 hard disk partitions to larger hard disk using primarily just gparted and dd.

  1. I connected the 2 HDDs to a PC Mobo w. 2 SATA wires.
  2. Booted Lubuntu 14.04 (or any Linux/newer could work) on USB.

  3. I opened GParted, created new larger partitions on the new larger HDD, that corresponds/similar layout to my smaller HDD (I think any order would work, but I did em similarly for easier / reduce human error)

  4. For each partition I use sudo dd if=/dev/sda1 of=/dev/sdb1 bs=8M with if(input file/source) and of(output/destination) and /dev/sdax or sdby corresponds to each of your partitions. I used block size (bs) of 8Mb, it reached above 100Mb/s. I found it to be the fastest on my HDD w. 8Mb cache.

I used route 1, make new larger partition first then transfer using dd. Not route 2 which is transfer using dd then use gparted to enlarge partition, becoz moving operation in Gparted is slow so it's like 2x the time.

  1. Restore grub on new HDD. Google how to restore grub or in my case I used this: https://askubuntu.com/questions/6317/how-can-i-install-windows-after-ive-installed-ubuntu/6321#6321

  2. Now grub should be on the new HDD's mbr and I was able to boot my Linux partitions. For the Windows 7, I got error on booting it. But the solution is on comment above.

  3. That's pretty much it. I was able migrate to larger hdd using just basic Linux utilities.

  4. If ur Windows 7 still recognizes it's old size on C:/ properties which was in my case. I fixed it w. a Win 7 installation dvd or any windows 10 could even work. I resized it's partition (on advance option install I guess) firstly reducing it (at the end..), then enlarge it again back to its size (but be careful, not to go over the other partitions).

Thx everyone and sorry for the delay in updating.

user590696
  • 41
  • 1
  • 5