I don’t see why I should create and have yet another partition (and type) when Btrfs. At least I know SBC’s e.g. with Rockchip that have SPI-flash programmable with own bootloader, can have support for Btrfs, so you can then have just 1 Btrfs partition , no boot partition needed. That is just a bit background how I experience things.
But I have not read the whole topic thread, but if Btrfs for rootfs, you can fix this problem live without reboot. A properly implemented UEFI firmware can have the ESP anywhere, does not need to be number 1 nor physically located first in the block storage (NVME or SD-card or HDD or etc). So at least if using LABEL= or UUID= (not PARTUUID=) in fstab:
- note down label and uuid of the ESP
- copy its content to some backup folder on rootfs and umount ESP
- shrink rootfs and partition by 512M or so
- wipefs the ESP and set part type to empty
- create new FAT partition type ESP with label and uuid of the former/older
- mount and copy the files backed up to it
- then use efibootmgr or bootctl to recreate a bootentry as the URI in the firmware still is refering to the old. Else only option is EFI/boot/bootx64.efi (in case of Intel)
- I mostly just reinstall grub (in Debian) or also 'update-bootloader ’ should work (Tumbleweed)
- for a more nice parttion setup, one can temprary replace the rootfs partition to somewhere else and then cut that 512M the beginning.
- for secure boot, I have not used/done this
- for Ext4, one need unmounted rootfs to shrink, so need boot with liveCD or so.