diff --git a/README.md b/README.md index 3f08bb2..9331f9e 100644 --- a/README.md +++ b/README.md @@ -5,9 +5,9 @@ with native encryption. This is a more automated way of following these guides: -- [Debian Bookworm Root on ZFS](https://openzfs.github.io/openzfs-docs/Getting%20Started/Debian/Debian%20Bookworm%20Root%20on%20ZFS.html) +- [Debian (Bookworm) Root on ZFS](https://openzfs.github.io/openzfs-docs/Getting%20Started/Debian/Debian%20Bookworm%20Root%20on%20ZFS.html) (via [OpenZFS Documentation](https://openzfs.github.io/openzfs-docs/)) -- [Install Proxmox VE on Debian 12 Bookworm](https://pve.proxmox.com/wiki/Install_Proxmox_VE_on_Debian_12_Bookworm) +- [Install Proxmox VE on Debian 13 Trixie](https://pve.proxmox.com/wiki/Install_Proxmox_VE_on_Debian_13_Trixie) (via [Proxmox VE official wiki](https://pve.proxmox.com/wiki)) ## Opinionated @@ -32,13 +32,24 @@ Only do the first item in the list (until _Open a terminal_). > **Tip!** > > If you want to boot much faster, and get dropped into a shell immediately, you -> may want to use `debian-live-12.*-amd64-standard.iso`! Download it from the +> may want to use `debian-live-13.*-amd64-standard.iso`! Download it from the > same place as the other ISO: > > [https://cdimage.debian.org/debian-cd/current-live/amd64/iso-hybrid/](https://cdimage.debian.org/debian-cd/current-live/amd64/iso-hybrid/) > > Log in as `user`, with password `live`, if asked. +Also, it might be helpful to install openssh and connect to it from another machine: +```bash +sudo apt install openssh-server +``` + +Make sure that the drives you want to install to are empty, as the script will only use the free (unformatted) space before and you might get errors due to lack of space: + +```bash +wipefs -a /dev/disk-device +``` + Instead of editing files etc. manually, launch this automated script from the terminal: @@ -68,6 +79,15 @@ sudo NON_INTERACTIVE=true \ https://raw.githubusercontent.com/hugojosefson/proxmox-root-on-encrypted-zfs/main/src/cli.ts \ debian ``` +If the installation fails with an error about ZFS module not being loaded, try this first + +```bash +sudo apt install -y zfs-dkms zfsutils-linux +sudo apt install linux-headers-$(uname -r) +sudo dpkg-reconfigure zfs-dkms +sudo modprobe zfs +``` +and then re-run the installation script. > If you want to inspect the chroot: > @@ -92,8 +112,8 @@ encryption key. Login as `root`. Continue manually at -[Install Proxmox VE Kernel etc](https://pve.proxmox.com/wiki/Install_Proxmox_VE_on_Debian_12_Bookworm#Install_the_Proxmox_VE_Kernel) -in the _Install Proxmox VE on Debian 12 Bookworm_ guide. +[Install Proxmox VE Kernel etc](https://pve.proxmox.com/wiki/Install_Proxmox_VE_on_Debian_13_Trixie#Install_the_Proxmox_VE_Kernel) +in the _Install Proxmox VE on Debian 13 Trixie_ guide. ## Opinionated: Specifics @@ -198,7 +218,7 @@ Skip the rest; ### Proxmox VE -#### Install a standard Debian 12 Bookworm (amd64) +#### Install a standard Debian 13 Trixie (amd64) ##### Add an /etc/hosts entry for your IP address @@ -220,6 +240,17 @@ Skip the rest; leaving it up to manual installation and configuration. See -[Install Proxmox VE Kernel](https://pve.proxmox.com/wiki/Install_Proxmox_VE_on_Debian_12_Bookworm#Install_the_Proxmox_VE_Kernel) -and the following sections in the _Install Proxmox VE on Debian 12 Bookworm_ +[Install Proxmox VE Kernel](https://pve.proxmox.com/wiki/Install_Proxmox_VE_on_Debian_13_Trixie#Install_the_Proxmox_VE_Kernel) +and the following sections in the _Install Proxmox VE on Debian 13 Trixie guide. + +#### Additional notes about Dropbear +- use ```zfsunlock``` to get the password prompt when you login to Dropbear-initramfs +- use the user 'root' +- to generate a compatible key (run on a client computer): ```ssh-keygen -t rsa -f ~/.ssh/pve-dropbear``` +- then copy the generated .pub to ``` /etc/dropbear/initramfs/authorized_keys``` +- if you want dropbear to only ask for the password, add this in front of the public key in auhtorized_keys: +``` no-port-forwarding,no-agent-forwarding,command="/bin/zfsunlock" ssh-rsa ...``` +- to update initramfs after updating the key, run +``` update-initramfs -u -k all ``` + diff --git a/src/commands/chroot-proxmox.ts b/src/commands/chroot-proxmox.ts index b5a8216..09c9ed5 100644 --- a/src/commands/chroot-proxmox.ts +++ b/src/commands/chroot-proxmox.ts @@ -10,11 +10,10 @@ echo EDITOR=vim >> /etc/environment byobu-enable apt install -y wget -echo "deb [arch=amd64] http://download.proxmox.com/debian/pve bookworm pve-no-subscription" > /etc/apt/sources.list.d/pve-install-repo.list +echo "deb [arch=amd64 signed-by=/usr/share/keyrings/proxmox-archive-keyring.gpg] http://download.proxmox.com/debian/pve trixie pve-no-subscription" > /etc/apt/sources.list.d/pve-install-repo.list -cd /etc/apt/trusted.gpg.d/ -wget https://enterprise.proxmox.com/debian/proxmox-release-bookworm.gpg -O proxmox-release-bookworm.gpg -echo '7da6fe34168adc6e479327ba517796d4702fa2f8b4f0a9833f5ea6e6b48f6507a6da403a274fe201595edc86a84463d50383d07f64bdde2e3658108db7d6dc87 *proxmox-release-bookworm.gpg' | sha512sum --check --strict +wget https://enterprise.proxmox.com/debian/proxmox-archive-keyring-trixie.gpg -O /usr/share/keyrings/proxmox-archive-keyring.gpg +echo '136673be77aba35dcce385b28737689ad64fd785a797e57897589aed08db6e45 /usr/share/keyrings/proxmox-archive-keyring.gpg' | sha256sum --check --strict apt update apt full-upgrade -y @@ -24,4 +23,4 @@ apt install -y --download-only proxmox-default-kernel proxmox-ve ); export const chrootProxmox = Command.custom("chrootProxmox") - .withDependencies([chrootBasicSystemEnvironment]); + .withDependencies([chrootBasicSystemEnvironment]); \ No newline at end of file diff --git a/src/commands/chroot-tmpfs.ts b/src/commands/chroot-tmpfs.ts index f253edc..85ccc7b 100644 --- a/src/commands/chroot-tmpfs.ts +++ b/src/commands/chroot-tmpfs.ts @@ -4,8 +4,8 @@ import { chrootZfsBpool } from "./chroot-zfs-bpool.ts"; export const chrootTmpfs = inChrootCommand( "chrootTmpfs", ` -cp /usr/share/systemd/tmp.mount /etc/systemd/system/ +cp /usr/lib/systemd/system/tmp.mount /etc/systemd/system/ systemctl enable tmp.mount `, ) - .withDependencies([chrootZfsBpool]); + .withDependencies([chrootZfsBpool]); \ No newline at end of file diff --git a/src/commands/debian-3-system-installation.ts b/src/commands/debian-3-system-installation.ts index 0cd9d36..e6295a7 100644 --- a/src/commands/debian-3-system-installation.ts +++ b/src/commands/debian-3-system-installation.ts @@ -42,7 +42,7 @@ mkdir /mnt/run mount -t tmpfs tmpfs /mnt/run mkdir /mnt/run/lock -debootstrap bookworm /mnt +debootstrap trixie /mnt mkdir /mnt/etc/zfs cp /etc/zfs/zpool.cache /mnt/etc/zfs/ diff --git a/src/commands/files/etc/apt/sources.list b/src/commands/files/etc/apt/sources.list index 3ec89fb..522a8e9 100644 --- a/src/commands/files/etc/apt/sources.list +++ b/src/commands/files/etc/apt/sources.list @@ -1,8 +1,8 @@ -deb http://deb.debian.org/debian bookworm main contrib non-free-firmware -# deb-src http://deb.debian.org/debian bookworm main contrib non-free-firmware +deb http://deb.debian.org/debian trixie main contrib non-free-firmware +# deb-src http://deb.debian.org/debian trixie main contrib non-free-firmware -deb http://deb.debian.org/debian-security bookworm-security main contrib non-free-firmware -# deb-src http://deb.debian.org/debian-security bookworm-security main contrib non-free-firmware +deb http://deb.debian.org/debian-security trixie-security main contrib non-free-firmware +# deb-src http://deb.debian.org/debian-security trixie-security main contrib non-free-firmware -deb http://deb.debian.org/debian bookworm-updates main contrib non-free-firmware -# deb-src http://deb.debian.org/debian bookworm-updates main contrib non-free-firmware +deb http://deb.debian.org/debian trixie-updates main contrib non-free-firmware +# deb-src http://deb.debian.org/debian trixie-updates main contrib non-free-firmware diff --git a/src/commands/zfs-reboot-instructions.ts b/src/commands/zfs-reboot-instructions.ts index 230df2f..da4582b 100644 --- a/src/commands/zfs-reboot-instructions.ts +++ b/src/commands/zfs-reboot-instructions.ts @@ -39,7 +39,7 @@ password for zfs: ------------------------------------------------------------- Continue installing Proxmox VE Kernel etc, at -https://pve.proxmox.com/wiki/Install_Proxmox_VE_on_Debian_12_Bookworm#Install_the_Proxmox_VE_Kernel +https://pve.proxmox.com/wiki/Install_Proxmox_VE_on_Debian_13_Trixie#Install_the_Proxmox_VE_Kernel ============================================================= `);