Compare commits
4 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8a5c799936 | ||
|
|
49eac7883d | ||
|
|
009bde06d5 | ||
|
|
0e5516ff54 |
4 changed files with 36 additions and 2 deletions
|
|
@ -3,5 +3,6 @@
|
||||||
lb config noauto \
|
lb config noauto \
|
||||||
--architectures amd64 \
|
--architectures amd64 \
|
||||||
--distribution buster \
|
--distribution buster \
|
||||||
--bootappend-live "boot=live components initrd=/live/initrd.img"
|
--backports true \
|
||||||
|
--bootappend-live "boot=live components initrd=/live/initrd.img" \
|
||||||
"${@}"
|
"${@}"
|
||||||
|
|
|
||||||
30
build-live-cd.sh
Executable file
30
build-live-cd.sh
Executable file
|
|
@ -0,0 +1,30 @@
|
||||||
|
BASEDIR=/var/lib/machines
|
||||||
|
ID=$(uuidgen | tr -d -)
|
||||||
|
NAME=debian-live-cd-$ID
|
||||||
|
DIR=$BASEDIR/$NAME
|
||||||
|
|
||||||
|
echo "Generating container under $DIR"
|
||||||
|
zfs snapshot ztstor/ROOT/archie/var/lib/machines/buster-template@${ID}
|
||||||
|
zfs clone \
|
||||||
|
-o mountpoint=$DIR \
|
||||||
|
ztstor/ROOT/archie/var/lib/machines/buster-template@${ID} \
|
||||||
|
ztstor/ROOT/archie/var/lib/machines/$NAME
|
||||||
|
|
||||||
|
mkdir $DIR/var/live-build/
|
||||||
|
rsync -av . $DIR/var/live-build/
|
||||||
|
|
||||||
|
# Execute stuff inside container
|
||||||
|
systemd-nspawn -q --pipe -D $DIR /bin/bash << EOF
|
||||||
|
apt update
|
||||||
|
apt install -y live-build binutils
|
||||||
|
cd /var/live-build/
|
||||||
|
lb clean --purge
|
||||||
|
lb config
|
||||||
|
lb build
|
||||||
|
EOF
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
echo "---"
|
||||||
|
echo "Image lying under /var/lib/machines/$NAME"
|
||||||
|
#echo "Removing container..."
|
||||||
|
#zfs destroy ztstor/ROOT/archie/var/lib/machines/$NAME
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
include menu.cfg
|
include menu.cfg
|
||||||
default vesamenu.c32
|
default vesamenu.c32
|
||||||
prompt 0
|
prompt 0
|
||||||
timeout 0
|
timeout 50
|
||||||
|
|
|
||||||
3
config/package-lists/zfs.list.chroot
Normal file
3
config/package-lists/zfs.list.chroot
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
linux-headers-amd64
|
||||||
|
zfs-dkms/buster-backports
|
||||||
|
zfsutils-linux/buster-backports
|
||||||
Loading…
Add table
Add a link
Reference in a new issue