Why I'm seeing a lock besides the partition I'm trying to modify with gparted?
I wanted to create more space for Ubuntu on my hard disk in favor of my Windows partition. I booted the livecd and resized the NTFS partition to 100 GB. Then I wanted to resize my Ubuntu (ext4) partition to fill up the created unallocated space.
A screenshot of my current disk. (With the livecd there's no 'key' icon after sda6)
My first thought was just right click on sda6 → move/resize → done. Unfortunately I cannot resize or move the partition. However I can resize the NTFS partition.
I guess it is because the extended sda4 partition is locked. I couldn't see an unlock possibility though…
So how do I resize the ext4 partition anyway, probably by unlocking the extended partition, but how?
You cannot resize a mounted filesystem, that's why you see a lock icon.
You were doing well, you booted into a Live CD and resized the NTFS partition.
Now you need to enlarge the Extended partition, partitions "inside" that extended partition cannot "escape" outside.
- Make sure that
/dev/sda6
is unmounted. If a lock icon is visible, right click on it and choose for Unmount - Make sure that the swap partition
/dev/sda5
is unmounted. Right click on it and choose for Swapoff - Select
/dev/sda4
and choose for Resize. Use the free space on the left side - Select
/dev/sda6
and resize it on the right side - Apply the changes and you're done.
For a start boot with your live CD.
Press Start and type Gparted
:
Once you open the program you will see a list with your partitions. Now to make any changes, we have to unmount the partitions we want to edit. Right-Click on the partition, and choose Unmount:
Let's assume that I want to decrease the size of sda1 and add it in sda3. Right-Click on sda1 and choose Resize/Move
A new windows will pop out were we can make our changes. Now to decrease the size, drag the Right arrow to the left. You can also type a custom value next to the option New size (MB):. Once you choose the new size click on the button Resize/Move
Now a new box will appear with the label unallocated. We will now add this free space at sda3 partition.
Right-Click on sda3 and choose Resize/Move
Drag the left arrow to the left as shown below:
Hit the button Resize/Move to submit the change.
Finally, click on the "tick" button to apply all your changes.
A partition cannot be resized when Ubuntu is running off of it, or it is mounted.
You can use a live CD:
-
Boot the setup CD(live CD) and select to "Try Ubuntu".
-
Once it boots, start GParted and right-click the partition. Unmount it.
-
Then, delete or resize any partitions to the left or the right of the partition in question.
-
Now, right-click the partition and resize it.
-
Click Apply on the GParted window and let it finish.
You need to "Apply" since the changes are not done until this step. They are only queued up when you perform operations in GParted.