The balena bootloader initramfs contains the rootfs module and that will get the rootfs mounted but not checked first for errors. This is problematic because at first boot with network connectivity available, time will sync but the rootfs will still have the last mount time in
If at that point the rootfs gets corrupted then at next boot the rootfs' initramfs module from balena-bootloader will try to mount the rootfs without checking it first and then after that the filesystem check triggered by the fsck module from the actual kernel initramfs will fail like this:
[init][INFO] Running filesystem checks on partition resin-rootA (/dev/disk/by-state/resin-rootA) resin-rootA contains a file system with errors, check forced. resin-rootA: Inodes that were part of a corrupted orphan linked list found.
resin-rootA: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.
(i.e., without -a or -p options)
This commit will add the fsck module to balena bootloader's initramfs which will trigger filesystem checks before the rootfs module runs.
'Approve' if this change would be acceptable in the codebase (even if there are minor or cosmetic tweaks that could be improved).
'Request Changes' if this change would not be acceptable in our codebase (e.g. bugs, changes that will make development harder in future, security/performance issues, etc).
'Comment' if you don't feel you have enough information to decide either way (e.g. if you have major questions, or you don't understand the context of the change sufficiently to fully review yourself, but want to make a comment)
The balena bootloader initramfs contains the rootfs module and that will get the rootfs mounted but not checked first for errors. This is problematic because at first boot with network connectivity available, time will sync but the rootfs will still have the last mount time in
[init][INFO] Running filesystem checks on partition resin-rootA (/dev/disk/by-state/resin-rootA) resin-rootA contains a file system with errors, check forced. resin-rootA: Inodes that were part of a corrupted orphan linked list found.
resin-rootA: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY. (i.e., without -a or -p options)
This commit will add the fsck module to balena bootloader's initramfs which will trigger filesystem checks before the rootfs module runs.
Change-type: patch
Contributor checklist
Change-type
present on at least one commitSigned-off-by
is presentReviewer Guidelines