-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path40-configure_debian.sh
executable file
·50 lines (36 loc) · 1.34 KB
/
40-configure_debian.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#!/bin/bash
set -e
BOOT_DISK=$1
POOL_DISK=$2
BOOT_PART=$3
POOL_PART=$4
BOOT_DEVICE=$5
POOL_DEVICE=$6
HOSTNAME=$7
ROOT_PASSWORD=$8
echo $HOSTNAME > /etc/hostname
echo -e "127.0.1.1\t$HOSTNAME" >> /etc/hosts
echo -e "$ROOT_PASSWORD\n$ROOT_PASSWORD" | passwd root
export DEBIAN_FRONTEND=noninteractive
cat <<EOF > /etc/apt/sources.list
deb http://ftp.de.debian.org/debian bookworm main contrib
deb-src http://ftp.de.debian.org/debian bookworm main contrib
deb http://ftp.de.debian.org/debian-security bookworm-security main contrib
deb-src http://ftp.de.debian.org/debian-security/ bookworm-security main contrib
deb http://ftp.de.debian.org/debian bookworm-updates main contrib
deb-src http://ftp.de.debian.org/debian bookworm-updates main contrib
deb http://ftp.de.debian.org/debian bookworm-backports main contrib
deb-src http://ftp.de.debian.org/debian bookworm-backports main contrib
EOF
apt update
apt install -y nala
nala install -y locales keyboard-configuration console-setup
dpkg-reconfigure locales tzdata keyboard-configuration console-setup
nala install -y linux-headers-amd64 linux-image-amd64 zfs-initramfs dosfstools
echo "REMAKE_INITRD=yes" > /etc/dkms/zfs.conf
systemctl enable zfs.target
systemctl enable zfs-import-cache
systemctl enable zfs-mount
systemctl enable zfs-import.target
update-initramfs -c -k all
nala install -y efibootmgr curl