mirror of
https://github.com/Noratrieb/vmlab.git
synced 2026-01-14 16:45:11 +01:00
wtf
This commit is contained in:
parent
f6c317b38b
commit
9e5ec91834
3 changed files with 20 additions and 9 deletions
|
|
@ -1,5 +1,7 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -eu
|
||||||
|
|
||||||
# https://mvallim.github.io/kubernetes-under-the-hood/documentation/create-linux-image.html
|
# https://mvallim.github.io/kubernetes-under-the-hood/documentation/create-linux-image.html
|
||||||
|
|
||||||
SCRIPT=$(dirname "$0")
|
SCRIPT=$(dirname "$0")
|
||||||
|
|
@ -61,7 +63,7 @@ if ! [ -d "$BUILD/chroot/bin" ]; then
|
||||||
--variant=minbase \
|
--variant=minbase \
|
||||||
--components "main" \
|
--components "main" \
|
||||||
--include "ca-certificates,cron,iptables,isc-dhcp-client,libnss-myhostname,ntp,ntpdate,rsyslog,ssh,sudo,dialog,whiptail,man-db,curl,dosfstools,e2fsck-static" \
|
--include "ca-certificates,cron,iptables,isc-dhcp-client,libnss-myhostname,ntp,ntpdate,rsyslog,ssh,sudo,dialog,whiptail,man-db,curl,dosfstools,e2fsck-static" \
|
||||||
bookworm \
|
bullseye \
|
||||||
"$BUILD/chroot" \
|
"$BUILD/chroot" \
|
||||||
http://deb.debian.org/debian/
|
http://deb.debian.org/debian/
|
||||||
else
|
else
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,16 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -eu
|
||||||
|
|
||||||
SCRIPT=$(dirname "$0")
|
SCRIPT=$(dirname "$0")
|
||||||
BUILD="$SCRIPT/build"
|
BUILD="$SCRIPT/build"
|
||||||
|
|
||||||
sudo umount "$BUILD/chroot/"
|
sudo umount "$BUILD/chroot" || true
|
||||||
rm -r "$BUILD"
|
|
||||||
|
sudo umount "$BUILD/chroot/dev/pts" || true
|
||||||
|
sudo umount "$BUILD/chroot/dev" || true
|
||||||
|
sudo umount "$BUILD/chroot/sys" || true
|
||||||
|
sudo umount "$BUILD/chroot/proc" || true
|
||||||
|
sudo umount "$BUILD/chroot/run" || true
|
||||||
|
|
||||||
|
sudo rm -rf "$BUILD"
|
||||||
|
|
|
||||||
|
|
@ -21,14 +21,14 @@ info "Configuring the system"
|
||||||
|
|
||||||
echo "debian-image" > /etc/hostname
|
echo "debian-image" > /etc/hostname
|
||||||
cat <<EOF > /etc/apt/sources.list
|
cat <<EOF > /etc/apt/sources.list
|
||||||
deb http://deb.debian.org/debian/ bookworm main contrib non-free
|
deb http://deb.debian.org/debian/ bullseye main contrib non-free
|
||||||
deb-src http://deb.debian.org/debian/ bookworm main contrib non-free
|
deb-src http://deb.debian.org/debian/ bullseye main contrib non-free
|
||||||
|
|
||||||
deb http://deb.debian.org/debian/ bookworm-updates main contrib non-free
|
deb http://deb.debian.org/debian/ bullseye-updates main contrib non-free
|
||||||
deb-src http://deb.debian.org/debian/ bookworm-updates main contrib non-free
|
deb-src http://deb.debian.org/debian/ bullseye-updates main contrib non-free
|
||||||
|
|
||||||
deb http://deb.debian.org/debian-security bookworm-security main
|
deb http://deb.debian.org/debian-security bullseye-security main
|
||||||
deb-src http://deb.debian.org/debian-security bookworm-security main
|
deb-src http://deb.debian.org/debian-security bullseye-security main
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
cat <<EOF > /etc/fstab
|
cat <<EOF > /etc/fstab
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue