Manjaro KDE Partition - Grow Partition Using Unallocated Space

I have a dual boot (Win10/Manjaro KDE) Dell XPS 13 laptop. I am running out of space on my Root partition, soI freed up about 20GB from my Home partition that I want to add to my current Root partition of Manjaro KDE. I have booted into a Live USB and tried to use GParted and KDE Partition Manager, but as soon as I ‘shrink’ my Home Partition, I cannot see a way for me to ‘grow’ my Root partition using the new unallocated space. Neither App will let me grow the Root Partition using the unallocated space.

So how can I do this? Anyone that can offer any help / assistance would be greatly appreciated!

First provide

sudo parted -l
sudo blkid
sudo efibootmgr -v
cat /etc/fstab

Hmmm it’s actually a performance hit to have a separate root and /home directory I think - I stopped after running out of root space on a previous (320GB) disk some years back; I’d be looking to hook up a backup drive to do a timeshift and then maybe go ahead and put it all in one.

So yes, start with Wollie’s requests and work it out from there. Do you have any external storage big enough for a full timeshift backup? (I mean including everything - hidden and not).

Output:

sudo parted -l

> [aahmad@aahmad-pc ~]$ sudo parted -l
[sudo] password for aahmad: 
Model: PM951 NVMe SAMSUNG 256GB (nvme)
Disk /dev/nvme0n1: 256GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: 
Number  Start   End    Size    File system     Name                          Flags
 1      1049kB  524MB  523MB   ntfs            Basic data partition          hidden, diag
 2      524MB   629MB  105MB   fat32           EFI system partition          boot, esp
 3      629MB   646MB  16.8MB                  Microsoft reserved partition  msftres
 4      646MB   113GB  112GB   ntfs            Basic data partition          msftdata
 5      113GB   160GB  47.2GB  ext4
 6      160GB   164GB  4194MB  linux-swap(v1)                                swap
 7      164GB   256GB  91.7GB  ext4

sudo blkid

> [aahmad@aahmad-pc ~]$ sudo blkid
/dev/nvme0n1p1: BLOCK_SIZE="512" UUID="4CB29579B295686A" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="f78e0fed-c6a8-4aa0-8c41-7596bacaab19"
/dev/nvme0n1p2: UUID="38B4-DDC3" BLOCK_SIZE="512" TYPE="vfat" PARTLABEL="EFI system partition" PARTUUID="bd1620a7-fcb4-443c-9396-38443fd2e290"
/dev/nvme0n1p4: LABEL="DRIVE" BLOCK_SIZE="512" UUID="022401A424019C33" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="a5ddea0e-e13e-42e9-a788-337e36e0e591"
/dev/nvme0n1p5: UUID="f6a1d0ce-d328-4151-87d1-2500901e49e9" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="a17eb767-0e79-4327-bf17-f69e481e5193"
/dev/nvme0n1p6: UUID="fc440987-1c94-45a3-9c45-fcc91942087e" TYPE="swap" PARTUUID="10b26b97-406d-44a3-9ecd-234b1d8c7c16"
/dev/nvme0n1p7: UUID="26de23b6-af2b-4302-ac31-f6eb9caea968" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="432b96d5-840e-4d56-b307-b3386a3d4181"
/dev/nvme0n1p3: PARTLABEL="Microsoft reserved partition" PARTUUID="67fd2abc-41d2-4583-8c36-9219e1fb60b4"

sudo efibootmgr -v

>[aahmad@aahmad-pc ~]$ sudo efibootmgr -v
BootCurrent: 0001
Timeout: 2 seconds
BootOrder: 0001,0000
Boot0000* Windows Boot Manager  HD(2,GPT,bd1620a7-fcb4-443c-9396-38443fd2e290,0xfa000,0x32000)/File(\EFI\manjaro\grubx64.efi)WINDOWS.........x...B.C.D.O.B.J.E.C.T.=.{.9.d.e.a.8.6.2.c.-.5.c.d.d.-.4.e.7.0.-.a.c.c.1.-.f.3.2.b.3.4.4.d.4.7.9.5.}...e................
Boot0001* manjaro       HD(2,GPT,bd1620a7-fcb4-443c-9396-38443fd2e290,0xfa000,0x32000)/File(\EFI\manjaro\grubx64.efi)

cat /etc/fstab

> [aahmad@aahmad-pc ~]$ cat /etc/fstab
#/etc/fstab: static file system information.
#Use 'blkid' to print the universally unique identifier for a device; this may
#be used with UUID= as a more robust way to name devices that works even if
#disks are added and removed. See fstab(5).
#<file system>             <mount point>  <type>  <options>  <dump>  <pass>
UUID=38B4-DDC3                            /boot/efi      vfat    umask=0077 0 2
UUID=f6a1d0ce-d328-4151-87d1-2500901e49e9 /              ext4    defaults,noatime 0 1
UUID=fc440987-1c94-45a3-9c45-fcc91942087e swap           swap    defaults,noatime 0 2
UUID=26de23b6-af2b-4302-ac31-f6eb9caea968 /home          ext4    defaults,noatime 0 2

If you need any additional information, please let me know. Thanks @Wollie !

Just to reiterate I want to shrink my /home partition and add space to my /root partition if possible. Tried using LiveCD (Gparted and KDE Partition Manager) and nothing was allowing me to grow my /root partition once I had the unallocated space available.

Thanks @Ben, I appreciate the comments. This laptop is a bit older (XPS 13 from 2015), y so being the ‘quickest’ really isn’t a concen right now, and I don’t really have the time right now to do a ‘rebuild’ of my machine. I’d rather just shrink and grow my partitions accordingly for now.

However, I am interested if there are any posts / blogs out there that talk about combining everything into one partition? Eventually, when I do a rebuild it would be good to have things configured the ‘speedy’ way from the start of a fresh install.

Thanks for your time and help, it is greatly appreciated!

Not so much a rebuild - I have a 250GB SSD, with one 232GB partition which is my entire system including /home (from USB it takes only 6 minutes to do a basic install of KDE).

After doing that, I ran Timeshift to move my stuff back in… this uses the entire disk for root and home. If you start running out of space, then you’d need to look at extra storage for /home contents to allow your root to grow.

Timeshift isn’t great if you change partitions, I had a lot of work figuring out how to update/change/delete hooks etc. and clean up my hibernation act (using a swapfile with a single partition…) but you can physically copy your config files back in easily - still a fair few hours work.

Hmm but it seems you have Windows installed also, and I have no recent experience with that. I think Wollie will have better skills to develop a plan than I.

I assume you’ve had a good ‘clean’.
‘paccache -rvuk0 && sudo journalctl --vacuum-time=2weeks’ it’s a good candidate for an alias. I run Plex, which bloats up some folders in my root also (notably some caches can bloat up a few GiB).

Anyway, good luck with the resize.

This is all pretty much speculation and I have never used the KDE partitioning tool but only gparted:
To me it looks like that your swap partition is in between your /home partition and your / partition
so they don’t appear to be physically next to each other.

I’d guess that the swap partition is in the way and needs to go before it’s possible to grow the / partition.

I have once, a long time ago, tried to shrink and grow two partitions and … it took a very long time. Probably because much or all of the data will need to be relocated/read and written again.

It could also be that the live ISO you are booting from is just using the available swap space on your hd and that this prevents the tool to alter it.

Maybe these things only matter with spinning drives. I have never used ssd/nvme and don’t know if they are different in regard to partition layout.
… just some input - nothing definitive

1 Like

I think @Nachlese is right. You have first to move the swap partition into the free space you gained by shrinking your /home partiton, then you can extend your / partition. All this is super easy when you boot the live ISO and use GParted.

Since you are not changing the start secor of your / partition and you use UUID’s in your fstab after this partition manipulations you should have no issues after a reboot.

Nevertheless, first backup up valuable data. Not because these operations are risky, just because you could do something wrong.

That was it, thanks guys. Got it all sorted out.

3 Likes

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.