Hi all, I hope I'm not off topic talking about this. I am making a small guide that explains all steps to install the latest version of Proxmox in an HP DL 380 G7 server and how to enable HBA mode on the P410i SCSI controller. Unfortunately I am having some difficulties compiling the kernel. Therefore, I have thought about posting the guide although it is not complete in the hope that someone can tell me where I went wrong.
I would like to install Proxmox in an SSD connected to the AHCI controller of the server, enable the HBA mode of the RAID P410 controller, and be able to directly access (HBA-MODE) on all the drives connected to the controller.
To succeed in this I bought a mini-sata cable and an adapter to add an ssd hard disk instead of the DVD player provided in the server.
The first difficulty I encountered was the incompatibility of the latest kernel with this hardware (the system does not always boot without errors). For this reason I needed to disable the "hpwdt" driver.
Also trying to install the latest ISO (7.1-2) from pendrive, the server gives errors on "GRUB".
First you need to install Debian (https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/debian-11.2.0-amd64-netinst.iso).
At the end of the installation you need to log in as root and type the following:
blacklist hpwdt
192.168.1.2 prox4m1.proxmox.com prox4m1→ to be adapted according to your needs
# The following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
pandoc --from markdown --to man --standalone --metadata "title=HPSAHBA(8)" --output hpsahba.8 README.md
obj-m := hpsa.o
ifndef KERNELRELEASE
KRELEASE := $(shell uname -r)
else
KRELEASE := $(KERNELRELEASE)
endif
#KDIR := /usr/lib/modules/$(KRELEASE)/build
KDIR := /lib/modules/5.13.19-4-pve/build → check if this folder is present on your system or adapt according to your needs
PWD := $(shell pwd)
default:
$(MAKE) -C $(KDIR) M=$(PWD) modules
clean:
$(MAKE) -C $(KDIR) M=$(PWD) clean
#!/bin/bash
set -e
#VERSION=${1:-5.8}
VERSION=${1:-$(uname -r | grep -o "^[0-9]*[.][0-9]*")} → Add this code to prevent errors
echo "Patching for kernel ${VERSION}"
wget "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/plain/drivers/scsi/hpsa.h?h=linux-${VERSION}.y" -O hpsa.h
wget "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/plain/drivers/scsi/hpsa.c?h=linux-${VERSION}.y" -O hpsa.c
wget "https://git.kernel.org/pub/scm/linu...x.git/plain/drivers/scsi/hpsa_cmd.h?h=linux-${VERSION}.y" -O hpsa_cmd>
shopt -s nullglob
for PATCH in ../../kernel/"${VERSION}"*/*.patch; do
echo "Applying ${PATCH}"
patch --no-backup-if-mismatch -Np3 < "${PATCH}"
done
[...]→ here I avoid copying and pasting because the output is too long
Creating symlink /var/lib/dkms/hpsa-dkms/1.0/source → /usr/src/hpsa-dkms-1.0
DKMS: add completed.
Kernel preparation unnecessary for this kernel. Skipping...
Building module:
cleaning build area...
make -j12 KERNELRELEASE=5.13.19-4-pve....
cleaning build area...
DKMS: build completed.
hpsa.ko:
Running module version sanity check.
- Original module
- Installation
- Installing to /lib/modules/5.13.19-4-pve/updates/dkms/
depmod....
DKMS: install completed.
update-initramfs: Generating /boot/initrd.img-5.13.19-4-pve
Running hook script 'zz-proxmox-boot'..
Re-executing '/etc/kernel/postinst.d/zz-proxmox-boot' in new private mount namespace..
No /etc/kernel/proxmox-boot-uuids found, skipping ESP sync.
***AFTER REBOOT***
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 29,8G 0 disk → This is the drive where I put Proxmox...
└─sda1 8:1 0 29,8G 0 part /
sdb 8:16 0 465,8G 0 disk → This HDD is attached to P410i controller for testing purpose
├─sdb1 8:17 0 499M 0 part
├─sdb2 8:18 0 300M 0 part
├─sdb3 8:19 0 128M 0 part
├─sdb4 8:20 0 439,4G 0 part
├─sdb5 8:21 0 449M 0 part
├─sdb6 8:22 0 24,1G 0 part
└─sdb7 8:23 0 1G 0 part
.:The End:.
I would like to install Proxmox in an SSD connected to the AHCI controller of the server, enable the HBA mode of the RAID P410 controller, and be able to directly access (HBA-MODE) on all the drives connected to the controller.
To succeed in this I bought a mini-sata cable and an adapter to add an ssd hard disk instead of the DVD player provided in the server.
The first difficulty I encountered was the incompatibility of the latest kernel with this hardware (the system does not always boot without errors). For this reason I needed to disable the "hpwdt" driver.
Also trying to install the latest ISO (7.1-2) from pendrive, the server gives errors on "GRUB".
First you need to install Debian (https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/debian-11.2.0-amd64-netinst.iso).
At the end of the installation you need to log in as root and type the following:
echo "blacklist hpwdt" >> /etc/modprobe.d/blacklist-hp.conf
cat /etc/modprobe.d/blacklist-hp.conf
blacklist hpwdt
update-initramfs -k all -u
update-grub
apt update -y && apt install wget sudo htop iotop sdparm screen -y
nano /etc/hosts
127.0.0.1 localhost192.168.1.2 prox4m1.proxmox.com prox4m1→ to be adapted according to your needs
# The following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
echo "deb [arch=amd64] http://download.proxmox.com/debian/pve bullseye pve-no-subscription" > /etc/apt/sources.list.d/pve-install-repo.list
wget https://enterprise.proxmox.com/debian/proxmox-release-bullseye.gpg -O /etc/apt/trusted.gpg.d/proxmox-release-bullseye.gpg
apt update && apt full-upgrade -y
apt install proxmox-ve postfix open-iscsi -y
apt remove os-prober
apt install curl -y
curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | tee /etc/apt/sources.list.d/github-cli.list > /dev/null
apt update && apt install gh -y
cd /root
git clone https://github.com/im-0/hpsahba.git
cd hpsahba
apt install pandoc -y
make
pandoc --from markdown --to man --standalone --metadata "title=HPSAHBA(8)" --output hpsahba.8 README.md
ls /lib/modules/5.13.19-4-pve/build
→ check if this folder is present on your system or adapt according to your needscd ~/hpsahba/contrib/dkms
cp Makefile Makefile.original
nano Makefile
obj-m := hpsa.o
ifndef KERNELRELEASE
KRELEASE := $(shell uname -r)
else
KRELEASE := $(KERNELRELEASE)
endif
#KDIR := /usr/lib/modules/$(KRELEASE)/build
KDIR := /lib/modules/5.13.19-4-pve/build → check if this folder is present on your system or adapt according to your needs
PWD := $(shell pwd)
default:
$(MAKE) -C $(KDIR) M=$(PWD) modules
clean:
$(MAKE) -C $(KDIR) M=$(PWD) clean
nano patch.sh
#!/bin/bash
set -e
#VERSION=${1:-5.8}
VERSION=${1:-$(uname -r | grep -o "^[0-9]*[.][0-9]*")} → Add this code to prevent errors
echo "Patching for kernel ${VERSION}"
wget "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/plain/drivers/scsi/hpsa.h?h=linux-${VERSION}.y" -O hpsa.h
wget "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/plain/drivers/scsi/hpsa.c?h=linux-${VERSION}.y" -O hpsa.c
wget "https://git.kernel.org/pub/scm/linu...x.git/plain/drivers/scsi/hpsa_cmd.h?h=linux-${VERSION}.y" -O hpsa_cmd>
shopt -s nullglob
for PATCH in ../../kernel/"${VERSION}"*/*.patch; do
echo "Applying ${PATCH}"
patch --no-backup-if-mismatch -Np3 < "${PATCH}"
done
./patch.sh
[...]→ here I avoid copying and pasting because the output is too long
dkms add ./
Creating symlink /var/lib/dkms/hpsa-dkms/1.0/source → /usr/src/hpsa-dkms-1.0
DKMS: add completed.
dkms install --force hpsa-dkms/1.0
Kernel preparation unnecessary for this kernel. Skipping...
Building module:
cleaning build area...
make -j12 KERNELRELEASE=5.13.19-4-pve....
cleaning build area...
DKMS: build completed.
hpsa.ko:
Running module version sanity check.
- Original module
- Installation
- Installing to /lib/modules/5.13.19-4-pve/updates/dkms/
depmod....
DKMS: install completed.
modprobe -r hpsa
modprobe hpsa hpsa_use_nvram_hba_flag=1
echo "options hpsa hpsa_use_nvram_hba_flag=1" > /etc/modprobe.d/hpsa.co
update-initramfs -u
update-initramfs: Generating /boot/initrd.img-5.13.19-4-pve
Running hook script 'zz-proxmox-boot'..
Re-executing '/etc/kernel/postinst.d/zz-proxmox-boot' in new private mount namespace..
No /etc/kernel/proxmox-boot-uuids found, skipping ESP sync.
init 6
***AFTER REBOOT***
lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 29,8G 0 disk → This is the drive where I put Proxmox...
└─sda1 8:1 0 29,8G 0 part /
sdb 8:16 0 465,8G 0 disk → This HDD is attached to P410i controller for testing purpose
├─sdb1 8:17 0 499M 0 part
├─sdb2 8:18 0 300M 0 part
├─sdb3 8:19 0 128M 0 part
├─sdb4 8:20 0 439,4G 0 part
├─sdb5 8:21 0 449M 0 part
├─sdb6 8:22 0 24,1G 0 part
└─sdb7 8:23 0 1G 0 part
.:The End:.
Last edited: