been using Garuda Linux as my daily driver for a while now and really love all the tools you build to make the arch experience so much easier!
Today I just updated my laptop and forgot that I had no space left on my root partition, which resulted in the update running into errors during the package extraction and corrupted my initramfs.
Anyways, I already got it fixed and running again, just wanted to suggest to maybe add an if case, to check if enough storage for package extraction is available and otherwise cancel the update.
Should help the next guy, who forgets he has no free storage xD
During the update I did get a warning that I have no storage space left, but at that point it was too late.
During the general use, I can’t remember if I got a notification regarding the storage space.
This is already a feature in pacman. If you are facing an issue with it, you will need to reproduce it on Archlinux and report it to the archlinux developers. See CheckSpace.
The CheckSpace feature does not work correctly on systems where the binaries, libraries, configuration files, etc that Pacman is installing are captured in Btrfs snapshots. Essentially, Pacman is counting on a certain amount of disk space being released when the files are deleted, but the space does not get released due to being preserved in the Btrfs snapshots that were taken before the Pacman transaction. These snapshots “remember” the old files after they are deleted.
Back in 2020 someone opened an issue related to this, but it kind of petered out without going anywhere:
Because this issue comes up from time to time here in the Garuda Linux forum, I made an effort to revive the issue back when Arch migrated to GitLab for tracking issues, but so far this reiteration of the issue hasn’t gone anywhere either.
What would be ideal would be an option for CheckSpace to assume no space will be released after the upgrade, cancelling the transaction and giving the user an opportunity to free up some disk space before proceeding.
It is fortunate @Lioxx23 was able to get it fixed; crashing during an upgrade can be really difficult to recover from in some cases. Welcome to the community by the way @Lioxx23!
Free disk space is now being double-checked by Garuda Update in version 4.13.0 to account for CoW snapshots! The transaction is automagically rejected if needed.
And just like that! Nobody will have to face the issue the OP faced again!
Thanks, been thinking of joining for some time now, and now I’ve finally made it.
Love your summary of the problem, it was interesting to learn.
Yeah, I luckily had a backup kernel, which still worked, so I could boot and fix it.
I guess I’ll upvote or comment on the posts you mentioned to give them some traction.
Also, nice work @TNE. I didn’t expect a fix this quickly!