Can't resize partitions to increase boot partition size

I use the Limine boot manager with BTRFS snapshots enabled (my root partition is BTRFS). My boot partition is 2GiB, which isn’t enough for me. I received a warning from snapper that the boot partition is running out of space. I wanted to increase the boot partition to 4GiB to prevent these issues, so I booted into a live USB and tried to use GParted to fix that. My current partitions setup:


I wanted to shrink the root partition (from the beginning) to give extra 2GiB to the boot partitions. Here’s how GParted looks after making these modifications:

When I tried to apply the changes, it failed on the first step (shrinking the root). I exported the details and got them here:

GParted 1.7.0

configuration --enable-libparted-dmraid

libparted 3.6

========================================
Device:	/dev/nvme0n1
Model:	KINGSTON SNV3S1000G
Serial:	50026B73839CB899
Sector size:	512
Total sectors:	1953525168
 
Heads:	255
Sectors/track:	2
Cylinders:	3830441
 
Partition table:	gpt
 
Partition	Type	Start	End	Flags	Partition Name	File System	Label	Mount Point
/dev/nvme0n1p1	Primary	2048	206847	boot, esp, no_automount	EFI system partition	fat32		
/dev/nvme0n1p2	Primary	206848	239615	msftres, no_automount	Microsoft reserved partition	unknown		
/dev/nvme0n1p3	Primary	239616	1951799295	msftdata	Basic data partition	ntfs		
/dev/nvme0n1p4	Primary	1951799296	1953521663	hidden, diag, no_automount		ntfs		

========================================
Device:	/dev/nvme1n1
Model:	KINGSTON SNV3S1000G
Serial:	50026B73839AF6DE
Sector size:	512
Total sectors:	1953525168
 
Heads:	255
Sectors/track:	2
Cylinders:	3830441
 
Partition table:	gpt
 
Partition	Type	Start	End	Flags	Partition Name	File System	Label	Mount Point
/dev/nvme1n1p1	Primary	2048	4196351	boot, esp		fat32		
/dev/nvme1n1p2	Primary	4196352	1953525134			btrfs		

========================================
Device:	/dev/sda
Model:	SanDisk Cruzer Blade
Serial:	4C530301650701122455
Sector size:	512
Total sectors:	62521344
 
Heads:	255
Sectors/track:	2
Cylinders:	122590
 
Partition table:	none
 
Partition	Type	Start	End	Flags	Partition Name	File System	Label	Mount Point
/dev/sda	Unpartitioned	0	62521343			iso9660	COS_202601	

========================================
Move /dev/nvme1n1p2 to the right and shrink it from 929.51 GiB to 927.51 GiB  00:00:10    ( ERROR )
     	
calibrate /dev/nvme1n1p2  00:00:00    ( SUCCESS )
     	
path: /dev/nvme1n1p2 (partition)
start: 4196352
end: 1953525134
size: 1949328783 (929.51 GiB)
check file system on /dev/nvme1n1p2 for errors and (if possible) fix them  00:00:10    ( ERROR )
     	
btrfs check '/dev/nvme1n1p2'  00:00:10    ( ERROR )
     	
Opening filesystem to check...
Checking filesystem on /dev/nvme1n1p2
UUID: 6a41d5df-4766-4d7c-9a5e-5ef04d7c8d71
found 169805975552 bytes used, error(s) found
total csum bytes: 157015640
total tree bytes: 2018836480
total fs tree bytes: 1696284672
total extent tree bytes: 120897536
btree space waste bytes: 322303363
file data blocks allocated: 275666472960
referenced 212547833856
[1/8] checking log skipped (none written)
[2/8] checking root items
[3/8] checking extents
[4/8] checking free space tree
We have a space info key for a block group that doesn't exist
[5/8] checking fs roots
[6/8] checking only csums items (without verifying data)
[7/8] checking root refs
[8/8] checking quota groups skipped (not enabled on this FS)

========================================
Grow /dev/nvme1n1p1 from 2.00 GiB to 4.00 GiB

I tried doing the same thing in KDE Partition manager and got the same error. I am new to managing partitions, and I am not sure what I am doing wrong. Can anyone help me shrink the root partition to increase the size of the boot partition?

I am seeing a similar problem resulting in
```
stopping snapshot boot entry creation: Boot partition usage will increase by 511.9 MiB from 75.0% to 100.1% and will exceed the 85.0% limit.
```

when doing updates. There is more that sufficient space on the disk so how do i go about increasing the size of the relevant partition/folder

My problem was solved using gparteded on the live usb image. It just took 2+ hours to move data around.

I tried the same, but it didn’t work. I get the errors mentioned above when using GParted from a live USB image.

You might need to boot normally and then use btrfs utilities to ensure your partitions don’t have issues before retrying gparted.

What do I need to do exactly? I booted normally and used “BTRFS Assistant” to run a scrub and a balance, which both succeeded. Then, I rebooted into the live USB to try GParted again. Got the same error. To clarify, I ran the same command GParted tried to run in the live mode sudo btrfs check '/dev/nvme1n1p2' and got the same error:

The obvious, but possibly unhelpul, advice here is to read the btrfs documentation for the check command.

I already ran sudo btrfs check /dev/nvme1n1p2 and showed the resulting output above. I can try to run it with the --repair option, but every source I checked, including the official documentation, recommends against that.

The strategy I was using was

  1. Try gparted on a live boot disk
  2. if gparted failed backup the content of the drive
  3. Delete the root partition
  4. resize boot partition
  5. restore content to a new root partition.
  6. if that failed, reinstall cachyos ensuring I allocated more space a boot
  7. copy needed content to the new installation from the contents backup I made.

You may have a different strategy.

I managed to solve the problem using the solution for the Arch forum. Basically, I had to run sudo btrfs rescue clear-space-cache v2 /dev/nvme0n1p2 from the live USB to clear the cache. I then regenerated it with sudo mount -o space_cache=v2 /dev/nvme0n1p2 /mnt and then sudo umount /mnt. That fixed the issue btrfs check /dev/nvme1n1p2 reported and allowed GParted to resize my partitions.

I would like to add small touch.
All commands should be done under root in live ISO.
sudo -i for root.