Manually installing Proxmox 6.2 &
Debian 10 (Buster)

The Proxmox installer hangs on a MacMini5,2. Installing it manually on Debian had challenges!


Whilst this tutorial is specifically directed at installing on a MacMini 5,2; the same process could be used on any hardware.

When installing Proxmox 6.2 on a MacMini 5,2 the USB installer hangs.

I believe the problem is that the Macmini 5,2 uses a 32 bits EFI Bootloader even though everything else works on 64 bits basis.

The only solution I have found is to install Debian Buster and install the PVE packages on top, however there is very little information available on how to configure Debian correctly for Proxmox (well none that I could find) 🙂

For networking, you will need to use an ethernet cable. WiFi is not supported due to a non-free firmware issue.

This walkthrough details the steps.


Important Note

This guide describes installing Debian on bare metal. The drive will be wiped and all data will be lost. There are many other tutorials out there that explain multi-boot boot scenarios.


Create the Debian 10 Buster USB Installation Media

Download the mac netinst CD which is a special version that is targeted specifically at older 64-bit Intel Macintosh machines. It will likely work on most other amd64 machines too, but it does not contain UEFI boot files that some people need. See the Debian Wiki for more information.

curl -O https://caesar.ftp.acc.umu.se/debian-cd/current/amd64/iso-cd/debian-mac-10.4.0-amd64-netinst.iso

Write the .iso to a USB stick. If you need help used this tutorial. https://www.wizza.nl/2017/09/11/create-bootable-linux-debian-usb-drive-apple-os-x/

Wipe Mac Hard Drive (Optional)

I found it easier to start with a blank drive that was partitioned to use Master Boot Record

Press Option/Alt + Command + R when booting mac to enter Internet Recovery Mode.

Open Disk Utility, Wipe Disk as MacOS Journaled / Master Boot Record.

Reboot Mac from USB stick

Hold ALT when powering on.

Install Debian (Your choice – Graphical or Text)

  • Make all the obvious choices.
  • Ignore the non-free firmware message; it is just the wifi.
  • Disk partitioning, follow these steps carefully to create to correct partitioning scheme for Proxmox …
- Guided - Use entire disk and setup LVM
- All files in one partition (this will create all of the correct boot partitions etc)
- Configure the Logical Volume Manager
    - Write changes
    - Delete all logical volumes & then the volume group (we will re-create the LV & VG the same as Proxmox)
    - Create volume group
        - Name : pve
        - Select appropriate disk partition (it is the large one)
        - Write changes to disk
    - Create logical volume
        - Name : swap
        - Size : 8G
    - Create logical volume
        - Name : root
        - Size : 96G
    - Finish
    - Select root volume
        - Use as : Ext4
        - Mount point : /
    - Select root volume
        - Use as : swap area
    - Finish partitioning and write changes to disk
  • Allow base system installation to complete it will take a while 🙂
  • Software to install – Only SSH Server & Standard system utilities
  • Configure GRUB to be in the MBR and select primary disk
  • Restart to complete installation

Fix the console resolution

The default console resolution is going to be 640×480, which is basically unusable. Complete the following steps to fix it.

# at GRUB screen press c to enter GRUB command line
grub> set pager=1
grub> vbeinfo

# find a resolution that is supported that you like (1600x1200)
# the following command will continue the boot process
grub> normal

# login as root.
# replace your resolution in the following command
echo "GRUB_GFXPAYLOAD_LINUX=1600x1200" >> /etc/default/grub
update-grub
reboot

Use a static IP address

I typically use the IP address assigned by DHCP as my fixed address. Whilst this is probably not best practice, my router never normally complains.
If you want to do it properly you should reserver the IP on the router.

# install networking tools and find out the assigned IP
apt install net-tools
ip a

Edit the network interfaces file – use whatever editor you like; nano is easy!

nano /etc/network/interfaces

Modify the file to look like the following, replacing the with the correct networking information for your scenario.
Note: Your network device may be different from ens33

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto ens33
iface ens33 inet static
        address 192.168.0.100
        netmask 255.255.255.0
        network 192.168.0.0
        broadcast 192.168.0.255
        gateway 192.168.0.1

# This is an autoconfigured IPv6 interface
iface ens33 inet6 auto

Press CTRL+X, Y to save and exit.
Then restart networking and test to see if everything is working.

# restart networking
systemctl restart networking

# test
ping 8.8.8.8
ip a

Now we need to fix the hosts file.

# fix hosts file
nano /etc/hosts

Make sure your IP address resolves to your hostname.

127.0.0.1       localhost.localdomain   localhost
192.168.0.100   server1.example.com     server1

# The following lines are desirable for IPv6 capable hosts
::1     localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

Press CTRL+X, Y to save and exit.
Then restart networking and test to see if everything is working.

# restart networking (not sure this is necessary)
systemctl restart networking

# check hostname is correct
hostname
hostname -f

Allow root to SSH

This is controversial and generally a bad idea, but there is a bug in Debian 10 where the path does not get modified correctly when you use SU/SUDO. After installation is complete, I normally disable this and use a certificate.

# allow root to ssh (contrversial but there is a bug in debian where the path gets broken)
nano /etc/ssh/sshd_config

Modify the line for PermitRootLogin to yes; making sure it is not commented.

# Authentication:
#LoginGraceTime 2m
PermitRootLogin yes
#StrictModes yes
#MaxAuthTries 6
#MaxSessions 10

Restart the sshd service.

service sshd restart

You can now connect to the server using ssh to complete the rest of the installation. This is generally easier because you will be switching between console and a browser.

ssh root@<IP ADDRESS>

Update to use Proxmox sources

We now have a functioning minimal Debian 10 server!

# update debian sources
nano /etc/apt/sources.list

Modify existing Debian sources to include contrib & non-free. This ensures we have the latest updates.

deb http://deb.debian.org/debian/ buster main contrib non-free
deb-src http://deb.debian.org/debian/ buster main contrib non-free

deb http://security.debian.org/debian-security buster/updates main contrib non-free
deb-src http://security.debian.org/debian-security buster/updates main contrib non-free

Run the updates

apt update
apt upgrade

Add the Proxmox sources & download the signatures

# add proxmox sources
echo "deb http://download.proxmox.com/debian/pve buster pve-no-subscription" > /etc/apt/sources.list.d/pve-nosubscription.list
echo "deb http://download.proxmox.com/debian/ceph-nautilus buster main" > /etc/apt/sources.list.d/pve-ceph.list
wget http://download.proxmox.com/debian/proxmox-ve-release-6.x.gpg -O /etc/apt/trusted.gpg.d/proxmox-ve-release-6.x.gpg
chmod +r /etc/apt/trusted.gpg.d/proxmox-ve-release-6.x.gpg  # optional, if you have a non-default umask

Run a full upgrade

# get updates
apt update
apt full-upgrade

Proxmox 6.x modifies the GRUB loader. This conflicts with the changes we made to grub. Overwrite our changes by using the version of the file in the update package and then re-apply our changes.

# re-apply our changes to grub
echo "GRUB_GFXPAYLOAD_LINUX=1600x1200" >> /etc/default/grub
update-grub
reboot

Install Proxmox

apt install proxmox-ve postfix open-iscsi
# no to dhcp/wins
# local only to postfix

The os-prober package scans all the partitions of your host including those of your guests VMs to create dual-boot GRUB entries. This can cause file system corruptions in VMs. As we didn’t install Proxmox VE as a dual boot we can safely remove the os-prober package.

apt remove os-prober

If you do not have an enterprise subscription, remove the enterprise repo to suppress repo authentication errors.

# remove proxmox enterprise repo 
rm pve-enterprise.list 

Run a final upgrade, to be sure & reboot

apt update
apt upgrade
reboot

Open the Proxmox Web Interface

By default the network device is configured incorrectly.
Go to system/network and modify it to use these settings:

Network Bridge Settings.

Create a Linux Bridge for your VMs to connect to:

Linux Bridge

Create an LVM Thin-Pool for VM Disk

Connect to the server via SSH.

ssh root@<IP ADDRESS>

Create the LVM Thin Pool named data. You will need to modify this command to use the size you have available.

lvcreate -L 601G --thinpool data pve

We need to create a file called /etc/pve/storage.cfg so that Proxmox can “see” the pool

dir: local
	path /var/lib/vz
	content iso,vztmpl,backup

lvmthin: local-lvm
	thinpool data
	vgname pve
	content rootdir,images

Whilst we are connected, we might as well download some container templates and ISOs

# list available container templates
pveam available

# download the ones I selected
pveam download local archlinux-base_20200508-1_amd64.tar.gz
pveam download local centos-8-default_20191016_amd64.tar.xz
pveam download local debian-10.0-standard_10.0-1_amd64.tar.gz
pveam download local fedora-32-default_20200430_amd64.tar.xz
pveam download local ubuntu-20.04-standard_20.04-1_amd64.tar.gz

# download archlinix iso - everyone needs arch
wget ca.us.mirror.archlinux-br.org/iso/2020.07.01/archlinux-2020.07.01-x86_64.iso /var/lib/vz/template/iso

How to Set Up SSH Keys on Debian 10 explains how to SSH into the machine using your public key.

Job done.

References:
1. Debian netinst images – https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/
2. Create bootable Linux Debian USB drive in Apple OS X – https://www.wizza.nl/2017/09/11/create-bootable-linux-debian-usb-drive-apple-os-x/
3. How to Install a Debian 10 (Buster) Minimal Server – https://www.howtoforge.com/tutorial/debian-minimal-server/
4. How to increase TTY console resolution on Ubuntu 18.04 Server – https://linuxconfig.org/how-to-increase-tty-console-resolution-on-ubuntu-18-04-server
5. Install Proxmox VE on Debian Buster – https://pve.proxmox.com/wiki/Install_Proxmox_VE_on_Debian_Buster
6. How to Set Up SSH Keys on Debian 10 – https://linuxize.com/post/how-to-set-up-ssh-keys-on-debian-10/

Leave a Reply