On 2016-09-12 10:09, Henk Slager wrote:
FWIW, I use BTRFS for /boot, but it's not for snapshotting or even the COW,
it's for DUP mode and the error recovery it provides.  Most people don't
think about this if it hasn't happened to them, but if you get a bad read
from /boot when loading the kernel or initrd, it can essentially nuke your
whole system.  I run BTRFS for /boot in DUP mode with mixed-bg (because I
only use 512MB for boot) to mitigate the chance that a failed read has any
impact, and ensure that if it does, it will refuse to boot instead of
booting with a corrupted kernel or initrd.

Suppose kernel and initrd are on a BTRFS fs with data, metadata and
system all single profile. Will a bootloader then just continue
booting up a system even when there are csum errors in kernel and/or
initrd files?  Suppose the bootloader is grub2.

Assuming I understand how they implemented their BTRFS support in GRUB, it should still be checking csums just like the kernel implementation, and thus should throw a read error when a block is corrupted. For a stock upstream version of GRUB2, this would mean that it will refuse to boot that entry, and may try to auto-boot a fallback entry (which will probably fail given how most distros set up their fallback entries).
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to