Created
July 1, 2024 13:35
-
-
Save julian-klode/c66a07f41390908c1ba3bffe923bbd2a to your computer and use it in GitHub Desktop.
This file contains hidden or 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
#!/bin/bash | |
set -e | |
#mv @ @old | |
if [ -e @next ]; then | |
echo "@next already exists" | |
exit 1 | |
fi | |
#btrfs sub snap @install @next | |
btrfs sub create @next | |
/home/jak/Projects/Stable/eatmydata-sc/eatmydata-sc mmdebstrap \ | |
--components="main universe" \ | |
--aptopt='Apt::Install-Recommends "true"' \ | |
--aptopt='Acquire::http { Proxy "http://127.0.0.1:8000"; }' \ | |
--include="minimal^" --include="standard^" --include="ubuntu-desktop-minimal^" --include="ubuntu-desktop^" \ | |
--include="linux-generic,shim-signed,amd64-microcode,intel-microcode" \ | |
--include=language-pack{,-gnome}-{en,de} \ | |
--include=hunspell-{de-de-frami,en-ca,en-gb,en-us} \ | |
--include=hyphen-{de,en-ca,en-gb,en-us} \ | |
--include=libreoffice-help-{de,en-gb,en-us} \ | |
--include=thunderbird-locale-{en,de} \ | |
--include=wamerican,wbritish,wngerman,wogerman \ | |
--include="xfsprogs,btrfs-progs,cryptsetup-initramfs,lvm2" \ | |
--setup-hook='cp /etc/fstab "$1/etc/fstab"' \ | |
--customize-hook='chroot "$1" apt-mark minimize-manual -y' \ | |
--customize-hook='find "$1/etc/apt" -name "*.list" -o -name "*.sources" -delete' \ | |
--customize-hook='cp /etc/apt/sources.list.d/ubuntu.sources "$1/etc/apt/sources.list.d"' \ | |
--essential-hook='cp /etc/locale.conf "$1/etc/"' \ | |
--essential-hook='cp /etc/crypttab "$1/etc/crypttab"' \ | |
--essential-hook='chroot "$1" debconf-set-selections << EOF | |
locales locales/default_environment_locale select en_US.UTF-8 | |
keyboard-configuration keyboard-configuration/layoutcode string de | |
keyboard-configuration keyboard-configuration/variantcode string nodeadkeys | |
tzdata tzdata/Areas select Europe | |
tzdata tzdata/Zones/Europe select Berlin | |
EOF | |
' \ | |
oracular @next | |
exit | |
mount --bind /dev @next/dev | |
mount --bind /dev/shm @next/dev/shm | |
mount --bind /sys @next/sys | |
mount --bind /etc/resolv.conf @next/etc/resolv.conf | |
mount -t proc proc @next/proc | |
chroot @next | |
umount @next/proc @next/etc/resolv.conf @next/sys @next/dev/shm @next/dev |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment