2
0
mirror of https://github.com/xcat2/confluent.git synced 2026-01-04 23:22:30 +00:00

Add proxmox ve example scripts to debian profile

This commit is contained in:
Jarrod Johnson
2025-05-01 10:23:42 -04:00
parent 62988117f1
commit b3ffd632a5
6 changed files with 33 additions and 1 deletions

View File

@@ -3,5 +3,6 @@ sed -i 's/label: debian/label: Debian/' $2/profile.yaml && \
ln -s $1/linux $2/boot/kernel && \
ln -s $1/initrd.gz $2/boot/initramfs/distribution && \
mkdir -p $2/boot/efi/boot && \
rm $2/distribution && \
mcopy -i $1/boot/grub/efi.img ::/efi/boot/* $2/boot/efi/boot

View File

@@ -0,0 +1,4 @@
#!/bin/bash
# Add this to firstboot.d
apt-get install proxmox-ve postfix open-iscsi chrony

View File

@@ -0,0 +1,18 @@
#!/bin/bash
# This script would run in post.d
#
echo "deb [arch=amd64] http://download.proxmox.com/debian/pve bookworm pve-no-subscription" > /etc/apt/sources.list.d/pve-install-repo.list
wget https://enterprise.proxmox.com/debian/proxmox-release-bookworm.gpg -O /etc/apt/trusted.gpg.d/proxmox-release-bookworm.gpg
sum=$(sha512sum /etc/apt/trusted.gpg.d/proxmox-release-bookworm.gpg)
if [ "$sum" -ne "7da6fe34168adc6e479327ba517796d4702fa2f8b4f0a9833f5ea6e6b48f6507a6da403a274fe201595edc86a84463d50383d07f64bdde2e3658108db7d6dc87" ]; then
echo "Mismatch in fingerprint!"
exit 1
fi
apt-get update && apt-get full-upgrade
apt-get install proxmox-default-kernel
apt-get remove linux-image-amd64 'linux-image-6.1*'
update-grub
apt-get remove os-probec

View File

@@ -441,8 +441,17 @@ def check_debian(isoinfo):
if diskbits[0] == b'Debian':
if b'mini.iso' not in diskbits:
raise Exception("Debian only supports the 'netboot mini.iso' type images")
version = diskbits[2].decode()
major = diskbits[2].decode()
arch = diskbits[4].decode()
buildtag = diskbits[-1].decode().strip() # 20230607+deb12u10
minor = '0'
if '+' in buildtag:
_, variant = buildtag.split('+')
variant = variant.replace('deb', '')
if 'u' in variant:
minor = variant.split('u')[1]
version = '{0}.{1}'.format(major, minor)
if arch != 'amd64':
raise Exception("Unsupported debian architecture {}".format(arch))
arch = 'x86_64'