From 58b87bef284983b08e3d37feee1ac774f8621a5a Mon Sep 17 00:00:00 2001 From: Daniel Gray Date: Thu, 7 Aug 2025 17:07:12 +0000 Subject: [PATCH 1/2] Use deb822 format --- Proxmox-8.sh | 34 +++++++++++++++++++++------------- 1 file changed, 21 insertions(+), 13 deletions(-) diff --git a/Proxmox-8.sh b/Proxmox-8.sh index 1067a7b..f3680d7 100644 --- a/Proxmox-8.sh +++ b/Proxmox-8.sh @@ -43,18 +43,26 @@ systemctl daemon-reload systemctl restart sshd # Setup repositories -sed -i '1 {s/^/# /}' /etc/apt/sources.list.d/pve-enterprise.list -sed -i '1 {s/^/# /}' /etc/apt/sources.list.d/ceph.list - -echo 'deb https://deb.debian.org/debian/ bookworm main contrib non-free non-free-firmware - -deb https://security.debian.org/debian-security/ bookworm-security main contrib non-free non-free-firmware - -deb https://deb.debian.org/debian/ bookworm-updates main contrib non-free non-free-firmware - -deb https://deb.debian.org/debian/ bookworm-backports main contrib non-free non-free-firmware - -deb http://download.proxmox.com/debian/pve bookworm pve-no-subscription' | tee /etc/apt/sources.list +echo "Enabled: no" >>/etc/apt/sources.list.d/pve-enterprise.sources +echo "Enabled: no" >>/etc/apt/sources.list.d/ceph.sources + +echo "Types: deb +URIs: https://deb.debian.org/debian/ +Suites: trixie trixie-updates trixie-backports +Components: main contrib non-free non-free-firmware +Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg + +Types: deb +URIs: https://security.debian.org/debian-security/ +Suites: trixie-security +Components: main contrib non-free non-free-firmware +Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg" | tee /etc/apt/sources.list.d/debian.sources + +echo "Types: deb +URIs: http://download.proxmox.com/debian/pve +Suites: trixie +Components: pve-no-subscription +Signed-By: /usr/share/keyrings/proxmox-archive-keyring.gpg" | tee /etc/apt/sources.list.d/proxmox.sources # Update packages apt-get update @@ -104,4 +112,4 @@ curl -s https://raw.githubusercontent.com/Metropolis-nexus/Common-Files/refs/hea tuned-adm profile virtual-host # Enable fstrim.timer -systemctl enable --now fstrim.timer \ No newline at end of file +systemctl enable --now fstrim.timer From b41aa7beeb3103468882a77f4e68d637d197d457 Mon Sep 17 00:00:00 2001 From: Daniel Gray Date: Thu, 7 Aug 2025 17:10:22 +0000 Subject: [PATCH 2/2] By default seems there is no /etc/sysctl.conf so you will get this error: sysctl: cannot open "/etc/sysctl.conf": No such file or directory --- Proxmox-8.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Proxmox-8.sh b/Proxmox-8.sh index f3680d7..c1848d6 100644 --- a/Proxmox-8.sh +++ b/Proxmox-8.sh @@ -87,7 +87,7 @@ proxmox-boot-tool refresh # Kernel hardening curl -s https://raw.githubusercontent.com/Metropolis-nexus/Common-Files/main/etc/modprobe.d/server-blacklist.conf | tee /etc/modprobe.d/server-blacklist.conf > /dev/null curl -s https://raw.githubusercontent.com/Metropolis-nexus/Common-Files/main/etc/sysctl.d/99-server.conf | tee /etc/sysctl.d/99-server.conf > /dev/null -sysctl -p +sysctl -p /etc/sysctl.d # Rebuild initramfs update-initramfs -u @@ -112,4 +112,4 @@ curl -s https://raw.githubusercontent.com/Metropolis-nexus/Common-Files/refs/hea tuned-adm profile virtual-host # Enable fstrim.timer -systemctl enable --now fstrim.timer +systemctl enable --now fstrim.timer \ No newline at end of file