Created
November 29, 2024 12:05
-
-
Save julian-klode/99a0294ab691221d9c9f4076be48f018 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='chroot "$1" useradd -G adm,cdrom,sudo,dip,plugdev,lpadmin --shell /bin/bash -p \'$y$j9T$a04/BRfB77SX7qn0m6X/c.$cLaH9amPKLP4h5bOdMdhW8UrZ4PYszbpelB1bhYbMX9\' jak' \ | |
| --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