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

5
  • There are multiple tutorials on how to do this on the internet, Google can be your friend here... We try not to provide tutorials, it isn't really the purpose of Superuser to guide you though something step-by-step that has established methods unless something doesn't go correctly and you need help. As much as I don't like to recommend specific software, look into Macrium Reflect Free, it does an excellent job of moving and resizing partitions, and there are multiple tutorials out there on using it specifically.
    – acejavelin
    Commented May 5, 2016 at 16:32
  • What part of the process specifically are you stuck at?
    – Ramhound
    Commented May 5, 2016 at 17:26
  • I'm doing it rite now. So far so good. TBHonest I just started.. but the backup earlier with dd was smooth. It should be done in few/couple more hours. I'll post update ltr/tomorow. Thx for infor and btw thx not deleting the thread.. yet.
    – user590696
    Commented May 6, 2016 at 13:11
  • So I did it. I used option 1. Everything is OK. But only the windows partition on sda1. Whenever i selected Windows7 on grub i got "windows boot 0xc000000e" error. I am working to solve it using google now..
    – user590696
    Commented May 7, 2016 at 10:45
  • superuser.com/questions/469793/… fixed the windows boot. My windows 7 boots right, everything seems to be in place. But only it still recognizes it's old size..
    – user590696
    Commented May 7, 2016 at 13:00

1 Answer 1

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.

You must log in to answer this question.

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