Skip to content

Raspberry Pi 4 8GB

I use my Raspberry Pi 4 8GB as another Proxmox server.

๐Ÿ“‹ TL;DR

(
  sudo su root  && \
  passwd  && \
  echo "<ip address> <hostname>" | tee -a /etc/hosts  && \
  hostname --ip-address  && \
  echo 'deb [arch=arm64] https://mirrors.apqa.cn/proxmox/debian/pve bookworm port'>/etc/apt/sources.list.d/pveport.list && \
  curl -L https://mirrors.apqa.cn/proxmox/debian/pveport.gpg -o /etc/apt/trusted.gpg.d/pveport.gpg && \
  apt update && \
  apt full-upgrade && \
  apt install ifupdown2 && \
  apt install proxmox-ve postfix open-iscsi && \
  sed -i 's/^#?\s*PermitRootLogin\s+.*/PermitRootLogin yes/' /etc/ssh/sshd_config
}

โš™ Config

OS: Raspberry Pi OS Lite (64-bit)

RAM: 8GB

HAT: none

DRIVE: USB 500GB SSD

Raspberry Pi 4 boot from usb

sudo raspi-config
GUI
Advanced Options -> Boot Order -> B2 NVMe/USB
sudo reboot

Sometimes, the USB adapter is slow and disconnections. The device quirks may need to be set.

Get vendorId and deviceId

sudo dmesg | grep usb
Output
[1.301989] usb 2-1: new SuperSpeed Gen 1 USB device number 2 using xhci_hcd
[1.332965] usb 2-1: New USB device found, idVendor=152d, idProduct=1561, bcdDevice= 1.00
[1.332999] usb 2-1: New USB device strings: Mfr=2, Product=3, SerialNumber=1
[1.333026] usb 2-1: Product: ASM105x
[1.333048] usb 2-1: Manufacturer: ASMT
[1.333071] usb 2-1: SerialNumber: 123456789B79F

Verify the vendorId and deviceId

sudo lsusb
Output
Bus 002 Device 002: ID 152d:1561 ASMedia Technology Inc. Name: ASM1051E SATA 6Gb/s bridge

Combine the vendorId and deviceId to get make up the quirks.

Example

usb-storage.quirks=152d:1561:u

Add the quirks to /boot/firmware/cmdline.txt

sed -i '1s/$/ usb-storage.quirks=152d:1561:u console=serial0,115200 console=tty1 root=PARTUUID=fcf4cb94-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait/' cmdline.txt
usb-storage.quirks=152d:1561:u console=serial0,115200 console=tty1 root=PARTUUID=fcf4cb94-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait

/boot/firmware/config.txt

echo program_usb_boot_mode=1 | sudo tee -a config.txt
program_usb_boot_mode=1

Check

mount | egrep "/([[:space:]]|boot)"
vcgencmd otp_dump | grep 17
17:1020000a=USB boot disabled
17:3020000a=USB boot enabled
sudo raspi-config
sudo rpi-update
sudo raspi-config --expand-rootfs
raspi-config
rpi-update
raspi-config --expand-rootfs

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

See Raspberry Pi 5 16GB.

Argon Fan Hat

Install

curl https://download.argon40.com/argonfanhat.sh | bash

Uninstall

argonone-uninstall

Config

argonone-config

โš™ Config

  1. Without the ARGON FAN HAT script the FAN will run constantly at 50% FAN SPEED
  2. Upon installation of the script, DEFAULT SETTINGS of the ARGON FAN HAT are as follows:
CPU TEMP FAN SPEED / POWER
55ยฐC 10 %
60ยฐC 55 %
65ยฐC 100 %

๐Ÿ”Œ Power Buttons

ARGON FAN HAT ACTION FUNCTION
OFF (FROM SOFT SHUTDOWN) Short Press Turn ON
ON Short Press Nothing
ON Long Press (> 3 Secs) Initiate Soft Shutdown (NO POWER CUT)
ON Double Tap Reboot

๐Ÿ”— References