babelbox-packer/scripts/setup-babelbox.sh
Jan Dittberner 20e2a485ce Start port to Debian 12
- qemu installation works
- babelbox installation works
- system is broken after the first demo installation
2024-02-09 10:17:42 +01:00

45 lines
1.3 KiB
Bash

#!/bin/sh
set -e
FDISK_VERSION=2.38.1-5+b1
cd /srv
curl -L -O http://ftp.debian.org/debian/dists/stable/main/installer-amd64/current/images/hd-media/gtk/initrd.gz
curl -L -O http://ftp.debian.org/debian/dists/stable/main/installer-amd64/current/images/hd-media/gtk/vmlinuz
curl -L -O http://ftp.debian.org/debian/pool/main/u/util-linux/fdisk-udeb_${FDISK_VERSION}_amd64.udeb
mkdir initrd_with_fdisk
cd initrd_with_fdisk
gunzip -c ../initrd.gz | cpio -id
dpkg-deb -x ../fdisk-udeb_${FDISK_VERSION}_amd64.udeb .
find . | cpio --create --format='newc' | gzip -9 > ../initrd.gz
cd ..
rm -rf initrd_with_fdisk fdisk-udeb_${FDISK_VERSION}_amd64.udeb
git clone https://salsa.debian.org/installer-team/babelbox.git
cd babelbox
cat babelbox-grub >> /etc/grub.d/40_custom
update-grub
./cronscript
cat > /etc/systemd/network/80-dhcp.network <<EOD
[Match]
Name=en*
[Network]
DHCP=yes
EOD
systemctl enable systemd-networkd.service
apt-get install --yes systemd-resolved
cat >> /home/demo/.bashrc <<EOD
DEBIAN_VERSION=12.4.0
if [ ! -f /srv/debian-\${DEBIAN_VERSION}-amd64-DVD-1.iso ]; then
echo "downloading Debian amd64 DVD ISO into /srv"
curl -L -O https://cdimage.debian.org/debian-cd/current/amd64/iso-dvd/debian-\${DEBIAN_VERSION}-amd64-DVD-1.iso
sudo mv debian-\${DEBIAN_VERSION}-amd64-DVD-1.iso /srv/
fi
EOD