diff --git a/README.md b/README.md index 352ca2fe..b69bafcf 100644 --- a/README.md +++ b/README.md @@ -73,7 +73,7 @@ Driver support depends on the device you are using shimboot on. The `patch_rootf 1. The kernel is too old.
2. 5ghz wifi networks do not work, but 2.4ghz networks do.
-3. You may need to compile the wifi driver from source. See issue #69.
+3. You may need to compile the wifi driver from source. See [#69](https://github.com/ading2210/shimboot/issues/69) and [#317](https://github.com/ading2210/shimboot/issues/317).
4. X11 and LightDM might have some graphical issues.
5. You need to use Wayland instead of X11. diff --git a/rootfs/usr/local/bin/expand_rootfs b/rootfs/usr/local/bin/expand_rootfs index 0374c611..333cd066 100755 --- a/rootfs/usr/local/bin/expand_rootfs +++ b/rootfs/usr/local/bin/expand_rootfs @@ -47,6 +47,37 @@ if [ "$luks" ]; then fi resize2fs "$root_dev" || true +mountcount=$(dumpe2fs "$root_dev" 2>/dev/null | awk -F': *' '/Maximum mount count/ { print $2 }') || true + +echo "Setting flags to run filesystem check on next boot..." +tune2fs -c 1 "$root_dev" || true + +if [ ! "$(pidof systemd)" ]; then + echo -e "Please run sudo tune2fs -c ${mountcount} ${root_dev} on the next boot." +else + cat < "/lib/systemd/system/filesystem-check.service" +[Unit] +Description=Disable filesystem check + +[Service] +Type=simple +Restart=always +RestartSec=1 +ExecStart=/usr/local/bin/fscheck + +[Install] +WantedBy=multi-user.target +EOF + cat < "/usr/local/bin/fscheck" +#!/bin/bash +tune2fs -c "$mountcount" "$root_dev" +systemctl disable filesystem-check +rm /usr/local/bin/fscheck +EOF + chmod +x /usr/local/bin/fscheck || true + systemctl enable filesystem-check || true +fi + echo echo "After:" df -h /