[uhfhhuih] btrfs first partition

July 18, 2019

If you put /boot in a btrfs filesystem, perhaps in its own partition or in a partition with the rest of the root filesystem, avoid making it the first partition, or else GRUB install might fall:

grub-installer: grub-install: warning: your core.img is unusually large. It won't fit in the embedding area.

grub-installer: grub-install: error: filesystem `btrfs' doesn't support blocklists.

Ubuntu 18.04.2 server installer, MBR partitioning.

(Unfortunately, a later attempt at doing exactly this could not replicate this error -- install completed successfully -- so maybe this precaution and workarounds below are unwarranted.)

A simple workaround is to make a small (e.g., 1 MB) ext4 partition as the first partition.  Or, you could also reorder your partitions so the first one is not btrfs.  Or, put btrfs in LVM.

One reason to put /boot in btrfs is to take snapshots, for example with snapper, to track how your initrd changes.  initrd is customized for your computer, e.g., crypttab, so you can't just download an old version.

Incidentally, the version of grub included in this version of Ubuntu cannot read btrfs compress=zstd: "error: compression type 0x3 not supported".  So, for btrfs /boot, your choices are lzo and zlib, which can be pushed up to zlib:9.  zstd is checked into the trunk of GRUB but not yet released.

Share this

Related Posts

Previous
Next Post »