0

I'm currently having a problem with reallocating partitions. I want to take some of Windows' space and give it to the Ubuntu partition. This is my partition list at the moment

My partition map:

enter image description here

Anyways, here's the problem. When I remove some of the Windows partition, it shows up as unallocated, but I can't add it to the Ubuntu partition.

Why is that? Please help.

Thanks in advance

P.S. My question is different from that related one, because I want to move a part of the partition, not the whole one.

Hizqeel
  • 1,895
  • 3
  • You can't just add unallocated space to any partition you like. You need to move partitions. – Pilot6 Jul 02 '16 at 09:35
  • @Pilot6 How do I move the partition? –  Jul 02 '16 at 09:42
  • it is a duplicate, but in his case it is a bit mor complex as in general, as the linux stuff is all i a extentded partion. First you need to make a backup of your importnt data, as this process can earse all you data if something goes horrible wrong. – Kupferdrache Jul 02 '16 at 09:53
  • I suggenst you are read the output of resizefs --help and man 8 resizefs as well. – Kupferdrache Jul 02 '16 at 09:59
  • 1
    Presumably yr unallocated partition comes out of /dev/sdb1 and/or /dev/sdb2, i.e. the NTFS partitions located before the extended partition containing Linux. Prbm is you can't just move partition around. What you could do, but it's a little involved, is: a) start from any Live Linux, equipped with GParted. b) With GParted, free enough space in /dev/sdb1 or 2, bit-to-bit copy the full contents of yr ext4 partition, e.g. using dd, c) recreate yr swap space, d) rebuild yr grub. -- Yr mileage may vary depending on whether you deal with a BIOS-MBR or a EUFI-GPT configuration. – Cbhihe Jul 02 '16 at 10:07
  • Boot from LiveUSB, then extend sdb3, then sdb5. – Pilot6 Jul 02 '16 at 10:30
  • 1
    @Cbhihe There is no need to do anything with swap. – Pilot6 Jul 02 '16 at 10:30
  • @Cbhihe You can extend either left or right as long as there aren't other partitions in the way (and for the OP, there are none in the way); I just tested it. – insert_name_here Jul 02 '16 at 11:23
  • @insert_name_here: Did you actually try extending left from an extended partition ??? If all you deal with is a "regular" primary partition, I'd agree that all you need is space, left or right. The case is you have an extended partition as /dev/sdb3 here. Some time ago, I had this very issue and could not extend left, I beleive because of the extended nature of the partition (fs was ext3 in my case)... – Cbhihe Jul 02 '16 at 12:49
  • @Cbhihe Yes; I created an NTFS and an extended partition (the extended one is to the right of the NTFS partition, of course), shrunk the NTFS partition, and extended the extended partition. It worked fine and I was then able to give the space to the logical partitions inside the extended partition. – insert_name_here Jul 02 '16 at 13:04
  • @insert_name_here: o_O ?!!?! Congrats to you but I am really surprised on this side of the world. I've got to go back to the box I had trouble with and see what I did wrong. Let's now see what OP says to this. – Cbhihe Jul 02 '16 at 13:38

1 Answers1

1
  1. Back up any important data. This should work fine, but if something goes wrong, your partition table could be corrupted.
  2. Boot from a live CD or USB as Ubuntu cannot resize partitions while they're in use.
  3. If there's a symbol that looks like a key on your swap partition, right-click on it and click "Swapoff".
  4. If you haven't already, resize your NTFS partition. Make sure the amount of new free space is in the "Free space following" field, not the "Free space preceding" one.
  5. Right-click on your extended partition, select "Resize/Move", set the new size to the maximum size, then click "Resize/Move".
  6. Right-click on your Ubuntu partition, select "Resize/Move", and set the new size to the maximum size, then click "Resize/Move". A warning message might be displayed; just click "OK".
  7. Click the green checkmark near the top of the window, then click "Apply".
  8. Wait until GParted finishes resizing your partitions, then close it.
  9. You're done; shut down, remove/unplug your Live CD/USB, then power on again.

Tested in VirtualBox with Ubuntu 16.04.