bootc icon indicating copy to clipboard operation
bootc copied to clipboard

composefs backend lacks garbage collection for /boot and sysroot

Open bketelsen opened this issue 2 months ago • 1 comments

Observed: After running a few updates, /boot/EFI/Linux fills up and prevents bootc update from finishing, which leaves the system in a bad state.

/sysroot/composefs/images also doesn't appear to be pruned after updates.

Expected: After an update, any un-reachable kernels and composefs images would be removed, freeing disk space. Un-reachable probably means that it's not listed in a boot loader entry somewhere, but there may be more nuance.

Thanks for making the composefs backend, we're having tons of fun with Debian :)

bketelsen avatar Nov 25 '25 20:11 bketelsen

cc https://github.com/containers/composefs-rs/issues/196

cgwalters avatar Nov 25 '25 20:11 cgwalters

Would it make sense to first start GCing boot entries here in bootc and then hooking up the relevant areas in composefs to clean up the images where the boot entry no longer exists? Or is there another plan for GC in the composefs backend?

gerblesh avatar Dec 06 '25 03:12 gerblesh

Currently bootc doesn't have automatic gc for composefs backend, but it does have a GC command which should clean up boot entries and dangling objects in the composefs repository. There'll be some substantial changes in the composefs repository when https://github.com/containers/composefs-rs/pull/185 lands

Johan-Liebert1 avatar Dec 08 '25 08:12 Johan-Liebert1

thanks for your response @Johan-Liebert1. I see bootc internals cfs gc which seems to work on the composefs repo, but what is the command to gc the boot entries? Is there anything that specifically cleans up \EFI\Linux?

bketelsen avatar Dec 08 '25 14:12 bketelsen