Skip to content

Instantly share code, notes, and snippets.

@TheSnowfield
Created November 13, 2024 00:34
Show Gist options
  • Save TheSnowfield/09eb2a84240bfb31434d99f148370191 to your computer and use it in GitHub Desktop.
Save TheSnowfield/09eb2a84240bfb31434d99f148370191 to your computer and use it in GitHub Desktop.
Armbian fsck get a newer version of e2fsck

image This problem caused by the host used a newer mke2fs(>=1.47) to created the root filesystem, however Armbian packed the old version e2fsck(<=1.46).

This is a stupid problem, we completely know the root file system is healthy, but we can not skip the check. :(

To deal with this problem, if you're an Armbian maintainer/developer, add the hook script under packages/bsp/common/etc/initramfs-tools/hooks/upgrade-e2fsck.sh, make sure the script file has execture permission: "chmod +x upgrade-e2fsck.sh"

#!/bin/sh
# Upgrade e2fsck for initrd
#

curl http://ftp.us.debian.org/debian/pool/main/e/e2fsprogs/e2fsck-static_1.47.1-1+b1_armhf.deb \
     -o /tmp/e2fsck-static_1.47.1-1+b1_armhf.deb

dpkg -x /tmp/e2fsck-static_1.47.1-1+b1_armhf.deb \
     /tmp/e2fsck-static

cp /tmp/e2fsck-static/usr/sbin/e2fsck.static \
   "${DESTDIR}"/sbin/e2fsck

rm -rf /tmp/e2fsck-static

exit 0

and then, re-build the image file, and flash into the board.

reference: https://packages.debian.org/en/sid/armhf/e2fsck-static

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment