I forked and modified the Proxmox kernel repo to build mainline releases with their modifications. The modifications I made feels like a fair amount of duct tape was used to make this work. But for now, it compiles mainline builds and I'll get around to cleaning it up + automating releases.
https://github.com/1vivy/pve-kernel is the repo.
You can grab a commit/tag for KERNEL_SHA1 and ZFS_SHA1 variables. The relevant upstream repos are in the README or .gitmodules
For KERNEL_SHA1, stick to tags with the naming scheme of cod/mainline/cod/tip/daily/2023-10-14, or cod/mainline/v6.6-rc5. Proxmox uses Ubuntu fork of the kernel (just some additional patches, configs and such; I'm sure someone can get the pure upstream to work).
Here's an overview of what you need to compile your own mainline build:
Also I don't recommend using mainline kernel builds for Proxmox; but if you're here you probably need a set of patches only upstream, new hardware support, a driver, or whatever.
Keep an eye on patches/kernel as some maybe added upstream. Also keep an eye on ZFS upstream, as kernel ABI can change and break compatibility (ex: zfs-2.2.0 only works for v6.5 pretty sure).
https://github.com/1vivy/pve-kernel is the repo.
You can grab a commit/tag for KERNEL_SHA1 and ZFS_SHA1 variables. The relevant upstream repos are in the README or .gitmodules
For KERNEL_SHA1, stick to tags with the naming scheme of cod/mainline/cod/tip/daily/2023-10-14, or cod/mainline/v6.6-rc5. Proxmox uses Ubuntu fork of the kernel (just some additional patches, configs and such; I'm sure someone can get the pure upstream to work).
Here's an overview of what you need to compile your own mainline build:
Bash:
# add proxmox devel repo
## need to install proxmox base & keys plus debian bookworm container, if not on a proxmox host
echo "deb http://download.proxmox.com/debian/devel/ bookworm main" >> /etc/apt/sources.list
# some apt packages around building debian/proxmox
apt-get update
apt-get install -y build-essential git git-email debhelper pve-doc-generator devscripts python-is-python3 dh-python sphinx-common quilt libtraceevents-dev libunwind-dev libzstd-dev pkg-config equivs
# clone repo & install apt dependencies
git clone https://github.com/1vivy/pve-kernel.git
cd pve-kernel
## (ex: ZFS_SHA1=zfs-2.2.0 and KERNEL_SHA1=cod/mainline/v6.5.7)
make prep ZFS_SHA1= KERNEL_SHA1=
make build-dir-fresh ZFS_SHA1= KERNEL_SHA1=
mk-build-deps -ir proxmox-kernel-*/debian/control
mk-build-deps -ir proxmox-kernel-*/modules/pkg-zfs/debian/control
# compile kernel
make deb ZFS_SHA1= KERNEL_SHA1=
# install compiled debs
## you need this package so os-prober hook script for grub doesn't complain and
## you don't get a "can't find /scripts/zfs" on boot
apt install zfs-initramfs
apt install ./proxmox-headers-..._amd64.deb ./proxmox-kernel-..._amd64.deb
Also I don't recommend using mainline kernel builds for Proxmox; but if you're here you probably need a set of patches only upstream, new hardware support, a driver, or whatever.
Keep an eye on patches/kernel as some maybe added upstream. Also keep an eye on ZFS upstream, as kernel ABI can change and break compatibility (ex: zfs-2.2.0 only works for v6.5 pretty sure).
Last edited: