From d6f53b8a68e08cee0f29e135c29496ca8c2ccff1 Mon Sep 17 00:00:00 2001 From: jacob Date: Wed, 11 Jun 2025 08:05:52 -0400 Subject: [PATCH 1/4] Include #317 in Compat Table --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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. From 35d09d99a2955d0bed63796d620da9e2533ac3ff Mon Sep 17 00:00:00 2001 From: xmb9 <64978924+xmb9@users.noreply.github.com> Date: Wed, 25 Jun 2025 04:49:24 -0400 Subject: [PATCH 2/4] feat: check filesystem after expanding --- rootfs/usr/local/bin/expand_rootfs | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/rootfs/usr/local/bin/expand_rootfs b/rootfs/usr/local/bin/expand_rootfs index 0374c611..d12890a6 100755 --- a/rootfs/usr/local/bin/expand_rootfs +++ b/rootfs/usr/local/bin/expand_rootfs @@ -47,6 +47,36 @@ 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" + +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" +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 / From 1c49eb3524c62fd1898f31c528b262cb9355e059 Mon Sep 17 00:00:00 2001 From: xmb9 <64978924+xmb9@users.noreply.github.com> Date: Wed, 25 Jun 2025 04:54:19 -0400 Subject: [PATCH 3/4] fix: forgot failsafe --- rootfs/usr/local/bin/expand_rootfs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rootfs/usr/local/bin/expand_rootfs b/rootfs/usr/local/bin/expand_rootfs index d12890a6..5d2477ac 100755 --- a/rootfs/usr/local/bin/expand_rootfs +++ b/rootfs/usr/local/bin/expand_rootfs @@ -50,7 +50,7 @@ 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" +tune2fs -c 1 "$root_dev" || true if [ ! "$(pidof systemd)" ]; then echo -e "Please run sudo tune2fs -c ${mountcount} ${root_dev} on the next boot." From 55fecff1506e6dcf373c61e05aaaeeaf6728b2b3 Mon Sep 17 00:00:00 2001 From: xmb9 <64978924+xmb9@users.noreply.github.com> Date: Wed, 25 Jun 2025 07:04:16 -0400 Subject: [PATCH 4/4] fix: shebang --- rootfs/usr/local/bin/expand_rootfs | 1 + 1 file changed, 1 insertion(+) diff --git a/rootfs/usr/local/bin/expand_rootfs b/rootfs/usr/local/bin/expand_rootfs index 5d2477ac..333cd066 100755 --- a/rootfs/usr/local/bin/expand_rootfs +++ b/rootfs/usr/local/bin/expand_rootfs @@ -69,6 +69,7 @@ ExecStart=/usr/local/bin/fscheck 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