I found out that you can compress the whole of a Btrfs filesystem by defragmenting it with -clzo or -czlib, but is it possible to uncompress it again? I'm asking because I managed to stop my system from booting, as /boot wasn't in a separate partition so ldlinux.c32 got compressed.

I fixed this by reinstalling syslinux from a chroot after disabling compression from the fstab, but I would like to know if it's possible to uncompress a filesystem completely (and automatically). I'm using Arch Linux by the way.

Before reinstalling syslinux, I also tried defragmenting the filesystem again without specifying the compression options, but this didn't work, so my guess is that defragmenting doesn't disable compression automatically.


You could use the compress tool with the --decompress option. This will recursively remove the +c (compression) flag, then copy and then the delete the original files and folders. Easiest way is probably to boot using the Arch Linux install medium (CD, USB, etc.), mount the root directory you want to decompress and run the command.

An alternative solution would be to simply re-install the Syslinux (I assume that's what you're using) files using syslinux-install_update -i from the Arch Linux install medium. Of course, make sure you've mounted the root partition without enabling compression.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.