Skip to content

Instantly share code, notes, and snippets.

@alexalouit

alexalouit/README

Last active Dec 14, 2020
Embed
What would you like to do?
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment