3

I Installed Ubuntu 16.04 LTS next to Windows 10. I decided to increase my Ubuntu partition because I don't have enough space for apps, So i went to Windows 10 and shrink my larger Partition and now I have 50 GB of unallocated space.. So my question is:

How can I safely expand my Ubuntu partion using this unallocated space? I also have a bootable pendrive with Ubuntu .iso "nieprzydzielone" means unallocated, sorry, gparted is in Polish, the Orange one is the partition I want to expand

  • Add a current-window-only screenshot of gparted /dev/sda to your original question, and I'll take a look for you. You'll need a Ubuntu Live DVD to manage the partition. If you don't already have one, burn one now. – heynnema Apr 8 '17 at 22:07
  • @heynnema look at my screenshot – Daniel Dutkowski Apr 9 '17 at 7:20
1

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

The use of an extended partition (sda3) makes this a little difficult. I'll outline the easiest way first, and we can add more to the procedure if we have to.

Keep these things in mind:

  • 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 part 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.

  • boot the a Ubuntu Live DVD/USB
  • start gparted or run the following command to open gparted:

    sudo -i gparted &
    

Step #1

  • right-click on sda5 and select swapoff
  • right-click on sda3 and select resize
  • resize the left side of sda3 all the way to the left
    • it may be difficult to grab the left side of sda3, if so, STOP here
  • you'll see that the unallocated space is now used by sda3
  • close the move/resize window
  • click the Apply icon

Step #2

  • right-click on sda5 and select swapoff (already done in Step #1)
  • right-click on sda5 and select move
  • note (write down) the numeric partition size before the move
  • move sda5 all the way to the left (inside of sda3)
    • be carefull not to resize sda5. If you do, cancel and start Step #2 again
  • close the move/resize window
  • click the Apply icon

Step #3

  • right-click on sda6 and select resize
  • resize the left side of sda6 all the way to the left
  • close the move/resize window
  • click the Apply icon
  • this may take a while so be patient
  • right-click on sda5 and select swapon

Now quit gparted and reboot your computer, being sure to remove the USB flash pen at the appropriate time.

  • So I just have to resize sda3 and sda6 will expand itself? – Daniel Dutkowski Apr 9 '17 at 14:23
  • Wait until my answer is completed... – heynnema Apr 9 '17 at 14:30
  • @DanielDutkowski Now my answer is complete. – heynnema Apr 9 '17 at 14:41
  • I cannot pass first step because sda 3 is busy and I can't resize this (I'm using live USB at the moment) Should I swapoff Linux-swap first? – Daniel Dutkowski Apr 9 '17 at 14:44
  • Yes, swapoff sda5. I'll update my procedure. – heynnema Apr 9 '17 at 14:47

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.