You are not logged in.

#1 2024-03-20 22:44:52

granorangutan
Member
Registered: 2024-03-20
Posts: 1

How can I increase the size of root partition

Hello, first post here. I am in a bit of a pickle:
Due to lack of foresight I did not allocate enough space to my root partition (sda2) and I now would like to add some.
How should I go on about doing so?
Here is how the memory was split up:

>lsblk
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
sda      8:0    0 232.9G  0 disk
├─sda1   8:1    0     2G  0 part [SWAP]
├─sda2   8:2    0     8G  0 part /
└─sda3   8:3    0 222.9G  0 part /home
>df -h
Filesystem      Size  Used Avail Use% Mounted on
dev             466M     0  466M   0% /dev
run             477M  820K  476M   1% /run
/dev/sda2       7.8G  6.3G  1.2G  85% /
tmpfs           477M  2.8M  474M   1% /dev/shm
tmpfs           477M  8.0K  477M   1% /tmp
/dev/sda3       219G  339M  207G   1% /home
tmpfs            96M   12K   96M   1% /run/user/1000

Computer specs: Compaq mini (=>bios boot)

Last edited by granorangutan (2024-03-20 22:48:37)

Offline

#2 2024-03-20 23:10:56

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,230

Re: How can I increase the size of root partition

Back up what you can't afford to lose in case of desaster. Boot a Gparted Live disk, use gparted and shrink your /home, move it to the right, and grow your root partition. Gparted makes this process trivially easy but the underlying operations are anything but, and anything going wrong (power failure or so) during the moving process can thrash your data, it's better to have the backup and not need it than be sorry.

Offline

Board footer

Powered by FluxBB