Skip to content

Raspberry Pi 5 16GB

My Raspberry Pi 5 16GB is being used as another arm64 Proxmox server.

โš™ Config

๐Ÿ“Ÿ Enable PCIe

Tip

When connecting the PCIe adapter to the pi, ensure that the correct end of the ribbon cable is being plugged into the correct connector. Typically, the ribbon cable ends are labeled.

/boot/firmware/config.txt

echo "dtparam=pciex1_gen=3" | sudo tee -a config.txt
echo "dtparam=pciex1" | sudo tee -a config.txt
dtparam=pciex1_gen=3
dtparam=pciex1

๐Ÿ•ต Enable auto detection PCIe and booting from NVMe

rpi-eeprom-config --edit
sudo rpi-eeprom-config --edit
PCIE_PROBE=1

BOOT_ORDER=0xf416

The 6 means to enable booting from nvme. Reboot Raspberry Pi 5 and try to use lsblk or lspci -vvv to get more details of the PCIe device.

๐Ÿ”Œ Enable 5A PSU

If apt is slow, it might be due to the pi reducing the power input.

rpi-eeprom-config --edit
sudo rpi-eeprom-config --edit
PSU_MAX_CURRENT=5000

๐Ÿ“บ Set Resolution

When using a TV as a temporary monitor, usually when troubleshooting the booting from a USB or NVMe drive, the text size can be way too small. This is how to change the resolution on boot of the command line so that it can be read more easily on the TV.

Warning

This does not seem to work for the Raspberry Pi 4 for some reason. Perhaps it's the display port mapping?

/boot/firmware/cmdline.txt

sed -i `1s/$/ video=HDMI-A-1:1920x1080M@60D/' /boot/firmware/cmdline.txt
video=HDMI-A-1:1920x1080M@60D

Proxmox

Setup LVM first

Setup Raspberry Pi OS.

Create a tmp dir

cd "$(mktemp -d)"

Download image

wget https://downloads.raspberrypi.com/raspios_lite_arm64/images/raspios_lite_arm64-2024-11-19/2024-11-19-raspios-bookworm-arm64-lite.img.xz -O 2024-11-19-raspios-bookworm-arm64-lite.img.xz

Extract image

xz -d 2024-11-19-raspios-bookworm-arm64-lite.img.xz

Write image to SD card

dd if=2024-11-19-raspios-bookworm-arm64-lite.img /dev/mmcblk0 status=progress

Mount boot partition

(
  [ -d /media/sd ] || mkdir /media/sd
  sudo mount -a /dev/mmcblk0p1 /media/sd
)

Change to boot partition

cd /media/sd

Create Username & Password

/boot/firmware/userconf.txt

echo 'nicholas:' "$(openssl passwd -6)" | sed 's/ //g' | sudo tee -a userconf.txt
nicholas:<hash>

๐Ÿ’ป Enable SSH

/boot/ssh

touch ssh

๐Ÿ“„ Kernel Page Size

You should use the Kernel with 4K pagesize

/boot/firmware/config.txt

kernel=kernel8.img # to end of line

CT Notes

Is the container summary memory usage and swap usage always shows 0?

/boot/firmware/cmdline.txt

sed -i '1s/$/ cgroup_enable=cpuset cgroup_enable=memory cgroup_memory=1/' cmdline.txt
cgroup_enable=cpuset cgroup_enable=memory cgroup_memory=1

Unmount SD card, plug into the Raspberry Pi and boot

Proxmox Installation

Tip

Alternatively, the ISO may be downloaded and installed as a removable media.

Log into the Raspberry Pi using SSH.

Switch to root user. Default password is blank for Raspberry Pi OS."

sudo su root

Set root password so that you can log into Proxmox web GUI

passwd

Add an /etc/hosts entry for your IP address.

Please make sure that your machine's hostname is resolvable via /etc/hosts, i.e. you need an entry in /etc/hosts which assigns an address to its hostname.

Make sure that you have configured one of the following addresses in /etc/hosts for your hostname:

1 IPv4 or 1 IPv6 or 1 IPv4 and 1 IPv6

Note

This also means removing the address 127.0.1.1 that might be present as default.

Get IP address

hostname -I | awk '{print $1}'

For instance, if your IP address is 192.168.15.77, and your hostname prox4m1, then your /etc/hosts file could look like:

/etc/hosts

127.0.0.1       localhost.localdomain localhost

::1             localhost ip6-localhost ip6-loopback
ff02::1         ip6-allnodes
ff02::2         ip6-allrouters

192.168.1.192   pve02.nicholaswilde.io pve02

Test if your setup is ok using the hostname command

hostname --ip-address

should return your IP address here

192.168.1.192

๐Ÿ’พ Install Proxmox VE

Add the Proxmox VE repository

/etc/apt/sources.list.d/pveport.list

echo 'deb [arch=arm64] https://mirrors.apqa.cn/proxmox/debian/pve bookworm port'>/etc/apt/sources.list.d/pveport.list
https://mirrors.apqa.cn/proxmox/debian/pve bookworm port

Add the Proxmox VE repository key

curl -L https://mirrors.apqa.cn/proxmox/debian/pveport.gpg -o /etc/apt/trusted.gpg.d/pveport.gpg 

Update repository and system

apt update && apt full-upgrade

Install ifupdown2 and Proxmox VE packages

apt install ifupdown2 proxmox-ve postfix open-iscsi

Configure packages which require user input on installation according to your needs (e.g. Samba asking about WINS/DHCP support). If you have a mail server in your network, you should configure postfix as a satellite system, your existing mail server will then be the relay host which will route the emails sent by the Proxmox server to their final recipient.

If you don't know what to enter here, choose local only and leave the system name as is.

๐Ÿ’ป Reenable SSH

/etc/ssh/sshd_config

sudo sed -i 's/^#?\s*PermitRootLogin\s+.*/PermitRootLogin yes/' /etc/ssh/sshd_config
PermitRootLogin yes

Finally, you can connect to the admin web interface (https://youripaddress:8006).

Network

Missing vmbr0

Warning

This should be done before reboot, else you won't be able to connect to the network!

Create vmbr0 network interface in GUI

<node> -> Network -> Create
Name: vmbr0
IPv4: 192.168.1.192/24
Gateweay: 192.168.1.1 
Bridge Ports: eth0

/etc/network/interfaces

auto lo
iface lo inet loopback

iface eth0 inet manual

auto vmbr0
iface vmbr0 inet static
        address 192.168.2.192/24
        gateway 192.168.2.1
        bridge-ports eth0
        bridge-stp off
        bridge-fd 0

Where eth0 is the current existing network interface

โŒ Repository 'http://deb.debian.org/debian buster InRelease' changed its 'Version' value from '' to '10.0' Error

apt --allow-releaseinfo-change update

Proxmox VE Helper-Scripts

(
  bash -c "$(wget -qLO - https://github.com/community-scripts/ProxmoxVE/raw/main/misc/update-repo.sh)" &&
  bash -c "$(wget -qLO - https://github.com/community-scripts/ProxmoxVE/raw/main/misc/post-pve-install.sh)"
)

๐Ÿงน Swap

The Raspberry Pi uses dphys-swapfile to manage it's swap.

For Proxmox, I'm using a logical volume instead of a swap file.

๐Ÿ“ Change Swap Size

Check the free space

free -h

Turn of swap

dphys-swapfile swapoff

Update size in /etc/dphys-swapfile

CONF_SWAPSIZE=2048

Resetup swap and turn it back on

(
  dphys-swapfile setup
  dphys-swapfile swapon
)

Check for the new size

free -h

๐Ÿšซ Disable Permanently

Disable dphys-swapfile temporarily

dphys-swapfile swapoff

Stop the service

systemctl stop dphys-swapfile

Disable the service

systemctl disable dphys-swapfile

Remove the swap file to save disk space

rm /var/swap

๐Ÿ’พ LVM

See LVM.

๐Ÿ”— References