1

My Ubuntu system often runs out of space. When I installed Ubuntu, I unintentionally installed it on a small partition of just under 38 GB, and now it is causing issues for me.

I have 20 GB of free unallocated space that I want to merge with the Ubuntu partition. How can I do this?

gparted screenshot of partitions

/dev/sda7 is my Ubuntu partition; I want it to resize and extend it.

I can't use a live cd or USB drive to live boot to accomplish this as I don't have these.

8
  • hi @user535733, I have seen that it works without a live USB or DVD but in my case it is different and I am unable to fix it. Mar 18, 2022 at 11:56
  • 1
    To work with the drive it MUST be unmounted and not in use in any way. You download the Ubuntu iso and make a live media.
    – David
    Mar 18, 2022 at 12:02
  • as far you have no LVM activated you have 3 methods (1-reinstall all (might be very useless and boring), 2 - use a DVD or USB sitck or boot as standalone maintenance mode "recovery" I think the good name 3 - backup all destroy sda7 & recreate it in LVM to the end of the disk & restore datas !!!!! ** ALL METHODS NEEDS A BACKUP FIRST ** !!! just in case even if risk is very low
    – francois P
    Mar 18, 2022 at 12:07
  • Oh I see. So it looks like i'll have to choose option 3 but again I am using dual boot (windows 10 & Ubuntu) on SSD 125 GB. Mar 18, 2022 at 12:18
  • You can do this without live media on usb/dvd/cd. One way is to use the procedure described here. askubuntu.com/questions/24027/…
    – PonJar
    Mar 18, 2022 at 13:06

1 Answer 1

0

The comments about this question are correct in that you cannot use the copy of GParted that is installed on your system to make a change to sda7, your root partition. That is because GParted cannot modify mounted partitions. Usually you get around this by booting a live disk containing GParted. The questioner makes it clear he does not have access to live media. So what can you do?

The answers to this question How can I resize an ext root partition at runtime? use two approaches that work for increasing the size of a mounted partition. The fdisk solution deletes the partition first (without deleting the underlying filesystem), then it creates a larger partition, at the same start point as the original. Finally the filesystem is resized to make full use of the enlarged partition. There is also a parted solution (not GParted) that makes use of its resizepart option.

The other approach to this problem (which is perhaps safer) is to boot live media but rather than place it on a usb/dvd/cd, boot it from an iso file saved on your filesystem somewhere. To do this you add a custom item to grub or systemd-boot, depending on what you use. My question and answer here gives the procedure. How to modify partitions without a live USB/CD

In this case the questioner has free space near, but not adjacent to the partition he wants to enlarge (sda7). The sda5 partition is not mounted so the first step to enlarge sda7 is to boot into the Ubuntu system, open GParted and move sda5 fully to the right. That has the effect of moving the unused space next to sda7. Then it’s a case of choosing one of the approaches described above to enlarge sda7.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .