Last active
September 19, 2022 07:17
-
-
Save alexalouit/37c6726d60f1ed19dcf95540331d90ff to your computer and use it in GitHub Desktop.
run alpine linux as ramdisk/iso/usb with zfs modules (modloop)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ mkdir /tmp/a | |
$ cd /tmp/a | |
$ unsquashfs /media/sd**/boot/modloop-lts | |
$ mv squashfs-root/ lib | |
$ tar -xzvf /etc/apk/cache/zfs-lts-*.apk | |
$ depmod -b /tmp/a | |
$ mksquashfs lib/ modloop-lts -noappend -always-use-fragments | |
$ mount -o rw,remount /media/sd** | |
# do backup but not as /filename or /boot/filename, alpine will be use it) | |
$ mv /tmp/a/modloop-lts /media/sd**/boot/modloop-lts | |
$ sync | |
$ mount -o ro,remount /media/sd** | |
# disable modloop signature verification | |
$ vi /etc/init.d/modloop | |
--- /etc/init.d/modloop | |
+++ /etc/init.d/modloop | |
@@ -31,7 +31,7 @@ | |
IFS="$oifs" | |
for line; do | |
img=${line%%:*} | |
- verify_modloop "$img" || eerror "Failed to verify signature of $img!" | |
+# verify_modloop "$img" || eerror "Failed to verify signature of $img!" | |
mount "$img" -o loop,ro /.modloop || continue | |
if [ -d /.modloop/modules/$kver ]; then | |
return 0 | |
@@ -88,7 +88,7 @@ | |
ebegin "Mounting modloop $modloop" | |
if [ -n "$modloop" ]; then | |
- verify_modloop "$modloop" || eerror "Failed to verify signature of $img!" | |
+# verify_modloop "$modloop" || eerror "Failed to verify signature of $img!" | |
mount -o loop,ro $modloop /.modloop | |
eend $? || return 1 | |
else | |
$ lbu add /etc/init.d/modloop | |
$ lbu ci | |
$ reboot |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yep, modloop_verify was added 1 year ago I think, this gist is pretty old.
Thank's for the update @gertjanvanzwieten !