Btrfs and separate /boot ext4 partition?

I’m not sure but I have to have separated /boot partition with ext4 if I use btrfs as / for my manjaro system. I think this mixed up timeshift snapshots somehow. Any advises here?
I’ve spotted this partition layout in Fedora default installer… and believe was some reasons for this approach

The thing is that if you install Manjaro on btrfs, then /boot is only a directory on the root filesystem, and then the version of GRUB that gets installed is the one with btrfs support. If you split /boot off onto a separate partition, then grub-btrfs will not work, and the regular version of GRUB does not support btrfs — it also doesn’t support xfs, for that matter.

So, yes, the bottom line is that without grub-btrfs, you get a version of GRUB which only supports ext2, ext3 and ext4, and which cannot handle btrfs snapshots. And therefore, if you then still prefer btrfs for your root filesystem, then you need a separate partition for /boot, formatted as ext4.

I have a similar setup on my own system here. I use btrfs, but without snapshots, and with separate partitions instead of subvolumes. :point_down:

[aragorn] >  lsblk -o NAME,MOUNTPOINT,FSTYPE
├─sda1  /boot/efi  vfat
├─sda2  /boot      ext4
├─sda3  /          btrfs
├─sda4  /usr       btrfs
├─sda5  /usr/local btrfs
├─sda6  /opt       btrfs
├─sda7             btrfs
├─sda8  /srv       btrfs
├─sda9  /home      btrfs
├─sda10            swap
└─sda11 /var       btrfs

@Aragorn The package grub-btrfs enables grub-mkconfig to search btrfs snapshots. GRUB can still boot from a btrfs partition without it.

1 Like

Not in my experience, but things may have changed in the meantime. I’ve never had to reinstall my system. :man_shrugging:

Thanks for answer, but what puzzle me great - snapshots feature… if I have each after system upgrade (which is good of course), but I’m also free to select kernels in grub. Which is weird if for example I have 6.1 kernel and installed 6.6 and this action created snapshot(before install) and in grub I should not able to select 6.6 but I can… and it doesn’t work so sometimes boot with snapshots kinda ‘search right combination’. I thought that separated /boot address exactly this problem, never thought that grub need something special for btrfs.

Well, the snapshot is only loaded after the kernel has booted. You always need to boot a kernel first and have it running off of the initramfs before it mounts the on-disk root filesystem (or snapshot thereof).

You need to rollback kernels together with the main system !

So if you take snapshots of / , and you do not snapshot /boot (because it is separate) You may end in an unbootable state.

You need :

  • grub.cfg (inside /)
  • kernel (inside /boot)
  • initrd (inside /boot)
  • modules (inside /)

So if you want to perform simple rollbacks, you must not use an additional /boot.

exacl unbootable right now… if you select kernel which is not in snapshot I believe. So cause I have to remember exact kernel for snapshot…Or I’m wrong in this way?

(No, but) it is best to have /boot and / on the same filesystem, when using the snapshot-feature of btrfs.

1 Like