4

As you can see from the figure below I have 19.34gb unallocated space. I want this space to be added to my root partition sda11. How can I do that? I read few posts related to this but some of them suggest to use live usb and in some posts they asked only to add this command sudo resize2fs /dev/sda11. I don't know which procedure to follow. I tried to run the above command but I get this message The filesystem is already 5594368 blocks long. Nothing to do!.

Also some posts suggested to move up or down my sda11 and then run the command but I don't know how to move sda11 up or down.

So for now I have read and tried above things. And I still don't know ho to increase/merge my root sda11 and 19.34gb space. Please help.

Note: I am using dual boot and linux mint, gparted.

enter image description here

6

You can't. Partitions must be continuous, and yor unallocated space and your sda11 is not adjacent. If it had been, you would need to boot from something else (a live usb is a typical choice) as you shouldn't try editing partitions in use.

If you had used LVM you could create another partition in the unallocated space, create a physical volume on that, add it to the volume group your root partition is on, expand the logical volume that would be your root partition and then finally resize the filesystem.

  • I suppose this answer perfectly(!) shows how Linux disks system is ugly and ancient. Why cannot so simple task as moving\resizing partitions be performed in Linux? Why on Windows I can just run whatever tool, make the required manipulations (in this case - moving all the partitions up in order to have free space adjacent to the partition I work with and then resize the partition), press big "Finish" button and it will make everything? Without any LiveCD, just during reboot. I would definitely assume that humanity had invented solution since ages, but... "boot from liveCD" - in 2017.No comments – The Godfather Jul 4 '17 at 13:04
  • @Henrik, I have the same issue here and my Linux partition is LVM - /dev/sda11 1351596032 1874862079 523266048 249.5G Linux LVM . Unallocated space and /dev/sda11 is not continuous. What to do to extend root partition to include unallocated space? – Om Prakash Jul 30 '17 at 3:52
  • I already wrote that in the answer. Read the second paragraph again. – Henrik Jul 30 '17 at 6:34
  • @Henrik, I put unallocated space adjacent to fedora partition using GParted. See this image. Now, what command to execute to do as you said. Sorry, I am a noob in Linux. – Om Prakash Jul 30 '17 at 13:05
  • Find a guide online, or ask a new question instead of abusing the comments on someone else's question. Then someone else might also see it and offer some help (I don't have the time right now). – Henrik Jul 30 '17 at 13:12
0

Taken from How to extend root partition. Worked just perfect for me.

First thing to do is back up any important information.

You can't modify the systems's partitions (and parent extended partitions, like /dev/sda11) when the system is using them - so you need to modify the partitions from outside the system - the Ubuntu install disk should do for that. So first you need to boot from the disk, and open GParted.

Note about Gparted: Once you initiate a task, you must click the green check mark to execute the task. You should only do one of these tasks at a time for this session.

Now that you are booted up in a LIVE USB and using Gparted, you can navigate to the (sda7) and delete this partition, making sure that you back up any data on that partition first. This will leave a grey area that says UNALLOCATED.

Net you will need make sure that this empty space is right next to your root partition (sda11) on the RIGHT of the home partition. If there is a small partition called SWAP in between (or any other partition in between) it will need to be moved to the right of the grey unallocated space.

Note - Do not move your home partition, or you will need to fix your BOOT partition.

Now that the home partition and the unallocated space are contiguous, you should be able to resize the home partition (sda11) by clicking on on it, then clicking resize, then by dragging the right edge of the rectangle in the pop up menu. After you tell GParted you want those operations to be done, you have to tell it to apply them (click the green check mark). It may take a while, but it should work without problems.

After this reboot into your normal install of Ubuntu (not the live disk), and check the partitions again with Gparted to ensure everything went as planned.

NOTE: Normally things go smoothly i.e without any problem but sometime they don't and therefore it is important that you backup your data before making any changes to your hardisk. Its better to be safe than sorry!

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.