I have a dual boot (Windows 7 + Ubuntu 18.04), with a data partition which is accessible for both OS.

I resized my windows partition and I want to allocate some of the free space to the Ubuntu OS and most to the data partition.

Unfortunately this will involve moving a lot of partitions since the unallocated space is located before my Ubuntu OS partitions; while the data partition is located at the end of the drive.

Please find a screenshot here: Screenshot current setup partitions

What would be the most safest procedure to divide the unallocated space among:


and most importantly,


Please consider also that I do not have important files in the Ubuntu OS (sda5, sda6, sda7) --- although I do appreciate my customized settings.

Would it therefore be recommended to do a re-installation of Ubuntu?

  • First cancel pending operation. Can try moving sda3 to the left, but sda2 is too full. Should have more free space itself, but win 7 is also out of support now. – crip659 Feb 9 at 21:59
  • @user535733, thank you for the tip. However, I do not want to create an extra partition. I simply want to allocate more space to sda3 and sda4. – sir_olf Feb 9 at 22:32
  • @crip659, thank you for the tips. Indeed the pending operation is a bit misleading. I just wanted to show that I have 200GB of free space in the middle. Win 7 doesn't have that so much space, but runs fine so far. I'm just using the data partition to store files. – sir_olf Feb 9 at 22:33

The Windows 7 part...

Note: Windows 7 is no longer supported

  • /dev/sda2 is FULL!
  • Boot into Windows 7
  • Start the Disk Management utility
  • Extend /dev/sda2 (C:) partition to give it more room

The Ubuntu part...

Make sure that you have a good backup of your important Ubuntu files, as this procedure can corrupt or lose data.

Keep these things in mind:

  • always start the entire procedure with issuing a swapoff on any mounted swap partitions, and end the entire procedure with issuing a swapon on that same swap partition

  • a move is done by pointing the mouse pointer at the center of a partition and dragging it left/right with the hand cursor

  • a resize is done by dragging the left/right side of a partition to the left/right with the directional arrow cursor

  • if any partition can't be moved/resized graphically, you may have to manually enter the specific required numeric data (don't do this unless I instruct you to)

  • you begin any move/resize by right-clicking on the partition in the lower pane of the main window, and selecting the desired action from the popup menu, then finishing that action in the new move/resize window

Do the following...

Note: if the procedure doesn't work exactly as I outline, STOP immediately and DO NOT continue.

  • Backup your important Ubuntu files
  • boot to a Ubuntu Live DVD/USB
  • start gparted
  • delete partitions /dev/sda5/6/7 and /dev/sda3 (you won't be able to boot at this point)
  • resize /dev/sda4 left side towards the left to the desired partition size
  • click the Apply icon
  • quit gparted
  • start the Ubuntu Installer from the desktop
  • do NOT manually partition the unallocated space, let Ubuntu do its own partitioning
  • reinstall Ubuntu using the "along side Windows" option
  • reboot into Ubuntu
  • restore Ubuntu files from previous backup
|improve this answer|||||
  • 1
    This is an excellent answer. Kudos for putting so much time into it. – user535733 Feb 10 at 4:13
  • 1
    Many thanks for this useful answer. Deleting partitions /dev/sda5/6/7 and /dev/sda3 (you won't be able to boot at this point) seems indeed to be exactly the right idea. I'll do this later tonight. One follow up question, does the reinstallation allow to specify where to install it? If so, would you recommend to install it again between Win 7 & the data partition? – sir_olf Feb 10 at 8:59
  • @sir_olf Yes, AFTER resizing sda2 and sda4, all of the unallocated space will be between them, and Ubuntu will install there when you choose to install "along side Windows" option. Don't manually setup partitions, your disk is too small. – heynnema Feb 10 at 13:21
  • @sir_olf status please... – heynnema Feb 11 at 16:19
  • @heynnema, my apologies for not providing an update yet. I had a few deadlines, so I postponed messing around with partitions until Friday. I'll give an update afterwards :) – sir_olf Feb 12 at 17:06

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.