Open wbehrens-on-gh opened 2 years ago
one of the errors is caused by a missing dependency: squashfs-tools
however, I'm not sure this will work at all, based on the other error messages. I added squashfs-tools and tried your dockerfile/script myself, and the image generated is 5 times smaller than it should be and does not contain a proper efi partition.
My guess as to what's happening is it's not able to mount and unmount things from inside the container:
[7/9] Generating GRUB support for EFI systems...
umount: /root/tmp.nZsHeKVuRp: not mounted.
[8/9] Cleaning up rootfs...
[9/9] Generating squashfs image (xz) from rootfs...
mount: /mklive/tmp.oNBnYLJ9hV/tmp-rootfs: wrong fs type, bad option, bad superblock on /dev/loop0, missing codepage or helper program, or other error.
dmesg(1) may have more information after failed mount system call.
umount: /mklive/tmp.oNBnYLJ9hV/tmp-rootfs: not mounted.
also, the images from dockerhub are old and no longer supported, use ghcr.io/void-linux/void-linux:latest-full-x86_64
one of the errors is caused by a missing dependency:
squashfs-tools
however, I'm not sure this will work at all, based on the other error messages. I added squashfs-tools and tried your dockerfile/script myself, and the image generated is 5 times smaller than it should be and does not contain a proper efi partition.
My guess as to what's happening is it's not able to mount and unmount things from inside the container:
[7/9] Generating GRUB support for EFI systems... umount: /root/tmp.nZsHeKVuRp: not mounted. [8/9] Cleaning up rootfs... [9/9] Generating squashfs image (xz) from rootfs... mount: /mklive/tmp.oNBnYLJ9hV/tmp-rootfs: wrong fs type, bad option, bad superblock on /dev/loop0, missing codepage or helper program, or other error. dmesg(1) may have more information after failed mount system call. umount: /mklive/tmp.oNBnYLJ9hV/tmp-rootfs: not mounted.
Do you have any more insight on this? like what specifically is being mounted since searching for mounting issues in docker just returns results about the VOLUME
function.
no clue, sorry
so, I was able to get this to work in Github CI in a void docker container, using the following:
...
container:
image: 'ghcr.io/void-linux/void-linux:20230204RC01-full-x86_64'
options: --privileged
volumes:
- /dev:/dev
env:
PATH: '/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin:/usr/local/bin:/tmp/bin'
REPO: "${{ inputs.mirror }}"
steps:
- name: Prepare container
shell: sh
run: |
# Switch to repo-ci mirror
mkdir -p /etc/xbps.d && cp /usr/share/xbps.d/*-repository-*.conf /etc/xbps.d/
sed -i 's|https://repo-default.voidlinux.org/current|'"$REPO"'|g' /etc/xbps.d/*-repository-*.conf
# Sync and upgrade once, assume error comes from xbps update
xbps-install -Syu || xbps-install -yu xbps
# Upgrade again (in case there was a xbps update)
xbps-install -yu
# Install depedencies
xbps-install -yu bash make git kmod xz lzo qemu-user-static outils dosfstools e2fsprogs
...
(it then goes on to clone the repo and build things, see #331)
the important parts are:
--privileged
to docker run
/dev
in the container, so loopback devices can work (they get mounted properly and the kernel tree can see them, but the filesystem nodes are not added without this)DISCLAIMER: I have no clue what this will do on a machine that isn't some throwaway CI VM, so be careful.
I'm trying to build a custom void .iso in a docker container to test since the system I'm on currently isn't running void. I've included the commands & dockerfile I've been using to try and build as well as the error error
build_iso.sh
Dockerfile
docker run:
docker run --privileged --cap-add=SYS_ADMIN -v ${OUTDIR}:/output -v ${CONFIG}:/config -e NAME=${NAME} -e ARCH=${ARCH} -e VERSION=${VERSION} ${NAME}:${TAG}