0

I'm confident that there are already quite a lot of answers to this topic. However, it is always important how the particular setup is configured. I'm new to Linux and would not like to execute commands which I do not understand and which are not tailored for my case. So I would be grateful if somebody would post instructions.

My setup:

  • sda: contains Ubuntu 20.04 partitions and an ntfs partition which I intend to use for data exchange for Windows and Linux
  • sdb: Windows 10

I installed Ubuntu manually, so Grub loader should be (hopefully) installed on the sda only.

enter image description here

My aim is to extend the space on root as originally I didn't know that programs are installed there.

I have backup of my disks by Acronis True Image 2020 (run from Windows).

As you see I already could free up some space taken from home (boot from live USB). Resizing of / dind't work straight forward. As I read so far I should move some partitions and (most likely) do something with Grub loader. That's are the two things where I am not sure what to do in my case.

as5
  • 251
  • The space needs to be next (ideally after) the partition you want to expand/resize, so you'll need to move /home, then swap (or I'd just re-create swap) then you can re-size your / partition. The partitions need to be unmounted, so a live system is easiest (ie. your Ubuntu install media). – guiverc Oct 08 '20 at 08:46

1 Answers1

0

You will need to do that in a live CD/USB(or other instance of linux if there is another one on the pc.)
Unmount the swap partition then and delete it. (I would also go into /etc/fstab and comment out the swap partition entry for now)
Then you can grow/resize your ubuntu(/dev/sda3) by 9 more gigs. The unallocated space needs to be adjacent(preferably to the right) to the partition you are resizing.

You can rebuild your swap partition in the 45G of unallocated space at the end... When you do this, you will need to correct the UUID in the swap entry in /etc/fstab... The new swap partition will have a new UUID. The UUID is displayed under "information" when you right click on the partition in gparted... or in a terminal use blkid. You should do this before you reboot.
(personally, I wouldn't waste so much space on swap... 1G is my limit for home computers...If I am using 1 gig of swap then my pc is most likely running like #%@^ and it will be rebooted at that point.... but I never get to even a quarter of that.... personal preference though) .
.
.
If you want more than that (meaning that 45G of unused space).... you'd have to do the same thing but instead of growing the /home directly, you will be moving the space from the right to the left of /home... and then again like above, growing the "/" directory. This is where "risk" to your data starts to become a threat... Now you are moving partitions(/home) to the right... whenever that is the case, you need to weigh the risks/rewards.... I personally have never lost any data doing it, but I can see why it is said to be risky.

WU-TANG
  • 3,071