I have a mess of partitions. This picture pretty much sums it up. I don't understand why there are small unallocated areas. My goal is to move the whole /dev/sda4 partition to a new hard drive (including swap). Then increase the remaining space in Storage (/dev/sda3).

Thank you in advance.

enter image description here

  • Curious to hear how it goes.
    – Ben West
    Jun 19 '14 at 16:59
  • It went perfect I just installed a new ubuntu installation on the new hard drive. I moved the home folder to the new ubuntu installation. I deleted the ubuntu partition (which includes moving the swap) with a live cd. After Being done with ubuntu I booted into Windows and moved all the other partitions up to the beginning. Finally, I extended the Storage partition. This last part took the longest.
    – Luis Liz
    Jun 20 '14 at 18:09

You'll want to partition the new drive as you like, then, you can use, for example, a liveUSB or LiveCD to boot the system.

Copy the files using cp -p (preserve permissions) as root (use sudo) from the old drive to the new.

Then you'll want to sudo chroot into the environment (this is an advanced topic) and run grub install from within the chroot. (this may be easier if you remove the original drive)

Then, if you have not already done so, remove the existing drive and confirm the secondary system boots. It may take several attempts to get grub configured properly to do this. confirm you have no data loss on the transferred system.

Lastly, you may remove the linux system from the old drive. Once done, you can put both drives into the system. Further grub configuration may be required at that time.

Bonus, resizing the NTFS/Window partitions will best be done with windows disk management

  • Note that it may be easier to reinstall linux to the new system and copy your files over(or use a backup tool) rather than to do as you plan (and follow the above steps)
    – Ben West
    Jun 17 '14 at 1:27
  • I thought this would be easier but I guess you're right. Would the backup tool move everything?
    – Luis Liz
    Jun 17 '14 at 1:38
  • I've recently looked at the new tool that ships with ubuntu (unsure of your distribution) which appears able to move system files as well as personal files, etc. There are probably several tools that will do this.
    – Ben West
    Jun 17 '14 at 1:40
  • Ubuntu 14.04 would the normal backup tool be enough?
    – Luis Liz
    Jun 17 '14 at 12:00
  • Very Probably. Again, verify that the restored backup works first, then make changes to the original.
    – Ben West
    Jun 17 '14 at 17:02

I cannot speak to how safe this method is, all I can tell you is that it worked for me like a charm in a similar situation. Your mileage may vary. In my case I was fully backed up and prepared to reinstall from scratch if necessary.

Reboot your system and boot into an Ubuntu LiveCD ... then just use the graphical GParted Partition Manager to adjust the size of the partitions.

One gotcha I encountered is that the LiveCD mounts Linux Swap Partitions automatically. So before you can edit those partitions or extended ones they are part of you need to right-click on them and select "Swap Off" for each Linux Swap Partition.

After doing this I was able to resize and manipulate my root partition. I think attempting my method is quicker than a clean reinstall and restore. Good luck!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.