Skip to content

Instantly share code, notes, and snippets.

@alexalouit
Last active September 19, 2022 07:17
Show Gist options
  • Save alexalouit/37c6726d60f1ed19dcf95540331d90ff to your computer and use it in GitHub Desktop.
Save alexalouit/37c6726d60f1ed19dcf95540331d90ff to your computer and use it in GitHub Desktop.
run alpine linux as ramdisk/iso/usb with zfs modules (modloop)
$ 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
@alexalouit
Copy link
Author

Yep, modloop_verify was added 1 year ago I think, this gist is pretty old.
Thank's for the update @gertjanvanzwieten !

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