Created
October 8, 2021 10:36
-
-
Save therealromster/e090153f3a2984428f0d60a63d58ac07 to your computer and use it in GitHub Desktop.
CRUX lxc container
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
# download crux iso image, mount and cd to it then run this to make a LXC container. | |
fakeroot -- /bin/bash - << 'EOF' | |
VERSION="$(cat crux-media)" | |
mkdir -p rootfs/var/lib/pkg | |
touch rootfs/var/lib/pkg/db | |
for pkg in crux/core/*.pkg.tar.xz | |
do | |
pkgadd -r rootfs "$pkg" | |
done | |
cat > metadata.yaml << EOF2 | |
architecture: x86_64 | |
creation_date: $(date +%s) | |
properties: | |
description: CRUX Linux $VERSION | |
os: CRUX | |
release: $VERSION | |
EOF2 | |
tar -c -f - rootfs/ metadata.yaml | xz -9 > "crux-$VERSION.tar.xz" | |
EOF | |
VERSION=`cat crux-media` | |
lxc image import "crux-$VERSION.tar.xz" --alias "crux-$VERSION" | |
lxc launch crux-$VERSION crux-36 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment