Forked from gushmazuko/Install any OS on Hetzner VDS | Proxmox with ZFS on Hetzner VDS.md
Last active
May 10, 2025 15:01
-
-
Save geraldurbas/fb34a77fbb1e5c8ce9526df8bbfcaa5f 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
# Proxmox VE Installation on Hetzner Server via Rescue System | |
Follow these steps to install Proxmox VE on a Hetzner server via the Rescue System. The Rescue System is a Linux-based environment that can be booted into to perform system recovery tasks. We'll be using it to install Proxmox VE. | |
In order to complete the process, it is indeed necessary to first boot into the Rescue System and then connect to it via SSH. This will allow you to run the commands for installing Proxmox VE. Here are the steps: | |
### Starting the Rescue System | |
1. Log into the Hetzner Robot. | |
2. Under "Main Functions; Server" select the desired server and then open the tab "Rescue". | |
3. Here, you can activate the desired variant (choose Linux 64bit). | |
4. You will be given a password which you will use to login as "root" via SSH. | |
### Restarting the Server | |
1. To load the Rescue System, the server must be restarted. | |
2. If you no longer have access to the server, you can use the reset function in the Robot. You will find this under the "Reset" tab of the desired server. | |
**Note:** The activation of the Rescue System is only valid for one boot. If you want to boot your server to the Rescue System again, you will have to activate it in the Hetzner Robot again. If you do not reboot your server within 60 minutes after the activation, the scheduled boot of the Rescue System will automatically become inactive. If the server is restarted later, the system will boot from the internal drive(s). | |
### Connecting to the Rescue System via SSH | |
1. Once the server has been restarted and the Rescue System is active, you can connect to it via SSH. | |
2. You can connect using the following command, replacing `<SERVER_IP>` with the IP address of your server: | |
```bash | |
ssh root@<SERVER_IP> | |
``` | |
3. You will be prompted to enter the password you were given when you activated the Rescue System. After entering the password, you should be logged in as the root user on your server running the Rescue System. | |
After connecting to the Rescue System via SSH, you can then proceed with the steps for installing Proxmox VE as outlined in this guide. | |
## 1. Fetch the Proxmox VE ISO | |
First, retrieve the ISO image of the latest Proxmox VE version. Execute the following commands in the Rescue System: | |
```bash | |
ISO_VERSION=$(curl -s 'http://download.proxmox.com/iso/' | grep -oP 'proxmox-ve_(\d+.\d+-\d).iso' | sort -V | tail -n1) | |
ISO_URL="http://download.proxmox.com/iso/$ISO_VERSION" | |
or | |
ISO_URL="http://download.proxmox.com/iso/proxmox-ve_7.4-1.iso" | |
or | |
ISO_URL="http://download.proxmox.com/iso/proxmox-ve_8.0-2.iso" | |
curl $ISO_URL -o /tmp/proxmox-ve.iso | |
get UEFI | |
wget -qO- /root http://www.danpros.com/content/files/uefi.tar.gz | tar -xvz -C /root | |
``` | |
## 2. Acquire Network Configuration | |
Obtain the network configuration, i.e., the network interface name, IP address, CIDR, and gateway: | |
```bash | |
INTERFACE_NAME=$(udevadm info -q property /sys/class/net/eth0 | grep "ID_NET_NAME_PATH=" | cut -d'=' -f2) | |
IP_CIDR=$(ip addr show eth0 | grep "inet\b" | awk '{print $2}') | |
GATEWAY=$(ip route | grep default | awk '{print $3}') | |
IP_ADDRESS=$(echo "$IP_CIDR" | cut -d'/' -f1) | |
CIDR=$(echo "$IP_CIDR" | cut -d'/' -f2) | |
``` | |
## 3. Initiate QEMU and Start Proxmox Installation | |
Kick off QEMU for Proxmox installation using the downloaded ISO: | |
```bash | |
Check disks with | |
lsblk | |
>> Maybe adjsut the "sed -n 3p or 4p" part | |
# Get the primary and secondary disks | |
PRIMARY_DISK=$(lsblk -dn -o NAME,SIZE,TYPE -e 1,7,11,14,15 | sed -n 1p | awk '{print $1}') | |
SECONDARY_DISK=$(lsblk -dn -o NAME,SIZE,TYPE -e 1,7,11,14,15 | sed -n 2p | awk '{print $1}') | |
# Kick off QEMU with CDROM | |
qemu-system-x86_64 -daemonize -enable-kvm -m 10240 \ | |
-drive file=/dev/$PRIMARY_DISK,format=raw,media=disk,if=virtio \ | |
-drive file=/dev/$SECONDARY_DISK,format=raw,media=disk,if=virtio \ | |
-cdrom /tmp/proxmox-ve.iso \ | |
-bios /root/uefi.bin \ | |
-boot d -vnc :0,password -monitor telnet:127.0.0.1:4444,server,nowait | |
# Set VNC password | |
echo "change vnc password <VNC_PASSWORD>" | nc -q 1 127.0.0.1 4444 | |
``` | |
Replace `<VNC_PASSWORD>` with your desired VNC password. Now, you can access the Proxmox VE installation interface via a VNC viewer at 'YourIPAddress:5900' using the password you set above. | |
## 4. Stop QEMU and Reboot into Proxmox VE | |
After you've finished the Proxmox installation manually, stop QEMU: | |
```bash | |
# Stop QEMU | |
printf "quit\n" | nc 127.0.0.1 4444 | |
``` | |
## 5. Configure QEMU Startup After Installation | |
Once you've finished the Proxmox installation manually, you need to restart QEMU without the CDROM: | |
```bash | |
# Kick off QEMU without CDROM | |
qemu-system-x86_64 -daemonize -enable-kvm -m 10240 \ | |
-drive file=/dev/$PRIMARY_DISK,format=raw,media=disk,if=virtio \ | |
-drive file=/dev/$SECONDARY_DISK,format=raw,media=disk,if=virtio \ | |
-bios /root/uefi.bin \ | |
-vnc :0,password -monitor telnet:127.0.0.1:4444,server,nowait \ | |
-net user,hostfwd=tcp::2222-:22 -net nic | |
# Set VNC password | |
echo "change vnc password <VNC_PASSWORD>" | nc -q 1 127.0.0.1 4444 | |
``` | |
## 6. Transfer Network Configuration and Update Nameserver | |
Now, transfer your network configuration to your Proxmox VE system: | |
```bash | |
cat > /tmp/proxmox_network_config << EOF | |
auto lo | |
iface lo inet loopback | |
iface $INTERFACE_NAME inet manual | |
auto vmbr0 | |
iface vmbr0 inet static | |
address $IP_ADDRESS/$CIDR | |
gateway $GATEWAY | |
bridge_ports $INTERFACE_NAME | |
bridge_stp off | |
bridge_fd 0 | |
EOF | |
# transfer the network configuration file to Proxmox VE system | |
sshpass -p "<ROOT_PASSWORD>" scp -o StrictHostKeyChecking=no -P 2222 /tmp/proxmox_network_config root@localhost:/etc/network/interfaces | |
# update the nameserver | |
sshpass -p "<ROOT_PASSWORD>" ssh -o StrictHostKeyChecking=no -p 2222 root@localhost "sed -i 's/nameserver.*/nameserver 1.1.1.1/' /etc/resolv.conf" | |
``` | |
Replace `<ROOT_PASSWORD>` with the root password for your Proxmox system. | |
## 7. Gracefully Shutdown QEMU | |
After you've finished any necessary manual configurations via VNC or SSH, you can gracefully shut down QEMU: | |
Recommend to Check startup via VNC | |
and to login vi ssh from Rescuesystem | |
```bash | |
ssh -p 2222 localhost | |
> in your your proxmox shutdown now | |
``` | |
doesnt work if youre fast | |
```bash | |
printf "system_powerdown\n" | nc 127.0.0.1 4444 | |
``` | |
## 8. Reboot into Proxmox VE | |
Lastly, you'll need to reboot your Hetzner Rescue System into Proxmox VE: | |
```bash | |
shutdown -r now | |
``` | |
After the reboot, your Proxmox VE system should be up and running. You can access the Proxmox VE interface at `https://<YourIPAddress>:8006`. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Finally the aproach worked by using EFI Boot laoder as mentioned here:
https://forum.proxmox.com/threads/install-pve-pbs-from-iso-on-hetzner-without-kvm-tutorial.94464/