void-linux / void-mklive

The Void Linux live image maker
https://voidlinux.org
Other
331 stars 194 forks source link

'mklive.sh' does not work with Debian #36

Closed philipgg closed 5 years ago

philipgg commented 5 years ago

https://github.com/void-linux/void-mklive/blob/master/mklive.sh.in#L275

    "$VOIDHOSTDIR"/usr/bin/mksquashfs "$BUILDDIR/tmp" "$IMAGEDIR/LiveOS/squashfs.img" \
-comp "${SQUASHFS_COMPRESSION}" || die "Failed to generate squashfs image"

That command does not work. (Tested with Debian 9.7) I got the error:

# ./mklive.sh
[...]
[5/9] Generating isolinux support for PC-BIOS systems...
[6/9] Generating GRUB support for EFI systems...
[7/9] Cleaning up rootfs...
[8/9] Generating squashfs image (xz) from rootfs...
./mklive.sh: 275: ./mklive.sh: /mnt/void-mklive/tmp.Er3cNzlFR7/void-host/usr/bin/mksquashfs: not found
ERROR: Failed to generate squashfs image

Regards.

philipgg commented 5 years ago

A workaround to this problem is to install squashfs-tools and xorriso from Debian repos:

# apt-get install squashfs-tools xorriso

And then change these two lines in the script:

--- mklive.sh.in.orig   2019-02-04 15:03:12.808000888 +0100
+++ mklive.sh.in    2019-02-04 15:03:39.788000891 +0100
@@ -272,7 +272,7 @@
     umount -f "$BUILDDIR/tmp-rootfs"
     mkdir -p "$IMAGEDIR/LiveOS"

-    "$VOIDHOSTDIR"/usr/bin/mksquashfs "$BUILDDIR/tmp" "$IMAGEDIR/LiveOS/squashfs.img" \
+    /usr/bin/mksquashfs "$BUILDDIR/tmp" "$IMAGEDIR/LiveOS/squashfs.img" \
         -comp "${SQUASHFS_COMPRESSION}" || die "Failed to generate squashfs image"
     chmod 444 "$IMAGEDIR/LiveOS/squashfs.img"

@@ -281,7 +281,7 @@
 }

 generate_iso_image() {
-    "$VOIDHOSTDIR"/usr/bin/xorriso -as mkisofs \
+    /usr/bin/xorriso -as mkisofs \
         -iso-level 3 -rock -joliet \
         -max-iso9660-filenames -omit-period \
         -omit-version-number -relaxed-filenames -allow-lowercase \

That worked for me!

the-maldridge commented 5 years ago

Interesting. I'm going to chalk this up to some library level incompatibility with Debian. However, given that our bootstrap reference is Alpine, this is a wontfix for Void.