build kernel not working

Like that?

Code:
git status
On branch master
Your branch is up to date with 'origin/master'.


Untracked files:
  (use "git add <file>..." to include in what will be committed)
        config-6.5.11.org
        proxmox-kernel-6.5.11/


nothing added to commit but untracked files present (use "git add" to track)


git submodule status
 9f8b45f5f8dbd6093b7ff71750bc6eb762fc8b20 submodules/ubuntu-kernel (Ubuntu-6.5.0-14.14-1616-g9f8b45f5f8db)
 81d11761c3a2d325b1b434247894365119ce22eb submodules/zfsonlinux (heads/master)
 
that looks okay. can you post the full output of "make clean deb" if it still fails?
 
The output:

Code:
make clean deb
rm -rf *~ proxmox-kernel-[0-9]*/ *.prepared config-6.5.11.org
rm -f *.deb *.dsc *.changes *.buildinfo *.build proxmox-kernel*.tar.*
test -f "submodules/ubuntu-kernel/README" || git submodule update --init submodules/ubuntu-kernel
test -f "submodules/zfsonlinux/Makefile" || git submodule update --init --recursive submodules/zfsonlinux
rm -rf proxmox-kernel-6.5.11/ubuntu-kernel ubuntu-kernel.prepared
mkdir -p proxmox-kernel-6.5.11
cp -a submodules/ubuntu-kernel proxmox-kernel-6.5.11/ubuntu-kernel
cd proxmox-kernel-6.5.11/ubuntu-kernel; python3 debian/scripts/misc/annotations --arch amd64 --export >../../config-6.5.11.org
cp config-6.5.11.org proxmox-kernel-6.5.11/ubuntu-kernel/.config
sed -i proxmox-kernel-6.5.11/ubuntu-kernel/Makefile -e 's/^EXTRAVERSION.*$/EXTRAVERSION=-7-pve/'
rm -rf proxmox-kernel-6.5.11/ubuntu-kernel/debian proxmox-kernel-6.5.11/ubuntu-kernel/debian.master
set -e; cd proxmox-kernel-6.5.11/ubuntu-kernel; \
  for patch in ../../patches/kernel/*.patch; do \
    echo "applying patch '$patch'"; \
    patch --batch -p1 < "${patch}"; \
  done
applying patch '../../patches/kernel/0001-Make-mkcompile_h-accept-an-alternate-timestamp-strin.patch'
patching file init/Makefile
applying patch '../../patches/kernel/0002-wireless-Add-Debian-wireless-regdb-certificates.patch'
patching file net/wireless/certs/debian.hex
applying patch '../../patches/kernel/0003-bridge-keep-MAC-of-first-assigned-port.patch'
patching file net/bridge/br_stp_if.c
applying patch '../../patches/kernel/0004-pci-Enable-overrides-for-missing-ACS-capabilities-4..patch'
patching file Documentation/admin-guide/kernel-parameters.txt
patching file drivers/pci/quirks.c
applying patch '../../patches/kernel/0005-kvm-disable-default-dynamic-halt-polling-growth.patch'
patching file virt/kvm/kvm_main.c
applying patch '../../patches/kernel/0006-net-core-downgrade-unregister_netdevice-refcount-lea.patch'
patching file net/core/dev.c
applying patch '../../patches/kernel/0007-Revert-fortify-Do-not-cast-to-unsigned-char.patch'
patching file include/linux/fortify-string.h
applying patch '../../patches/kernel/0008-kvm-xsave-set-mask-out-PKRU-bit-in-xfeatures-if-vCPU.patch'
patching file arch/x86/kvm/cpuid.c
patching file arch/x86/kvm/cpuid.h
patching file arch/x86/kvm/x86.c
applying patch '../../patches/kernel/0009-allow-opt-in-to-allow-pass-through-on-broken-hardwar.patch'
patching file drivers/iommu/intel/iommu.c
applying patch '../../patches/kernel/0010-Revert-nSVM-Check-for-reserved-encodings-of-TLB_CONT.patch'
patching file arch/x86/kvm/svm/nested.c
applying patch '../../patches/kernel/0011-KVM-nSVM-Advertise-support-for-flush-by-ASID.patch'
patching file arch/x86/kvm/svm/svm.c
applying patch '../../patches/kernel/0012-revert-memfd-improve-userspace-warnings-for-missing-.patch'
patching file mm/memfd.c
applying patch '../../patches/kernel/0013-Revert-UBUNTU-SAUCE-ceph-make-sure-all-the-files-suc.patch'
patching file fs/crypto/keyring.c
patching file fs/inode.c
applying patch '../../patches/kernel/0014-drm-amd-Fix-UBSAN-array-index-out-of-bounds-for-SMU7.patch'
patching file drivers/gpu/drm/amd/include/pptable.h
patching file drivers/gpu/drm/amd/pm/powerplay/hwmgr/pptable_v1_0.h
applying patch '../../patches/kernel/0015-drm-amd-Fix-UBSAN-array-index-out-of-bounds-for-Pola.patch'
patching file drivers/gpu/drm/amd/pm/powerplay/hwmgr/pptable_v1_0.h
applying patch '../../patches/kernel/0016-drm-amd-Fix-UBSAN-array-index-out-of-bounds-for-Powe.patch'
patching file drivers/gpu/drm/amd/pm/powerplay/hwmgr/pptable_v1_0.h
patching file drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_pptable.h
applying patch '../../patches/kernel/0017-KVM-x86-Fix-lapic-timer-interrupt-lost-after-loading.patch'
patching file arch/x86/include/asm/kvm-x86-ops.h
patching file arch/x86/include/asm/kvm_host.h
patching file arch/x86/kvm/lapic.c
patching file arch/x86/kvm/vmx/vmx.c
touch ubuntu-kernel.prepared
rm -rf proxmox-kernel-6.5.11/modules/pkg-zfs proxmox-kernel-6.5.11/modules/tmp pkg-zfs.prepared
mkdir -p proxmox-kernel-6.5.11/modules/tmp
cp -a submodules/zfsonlinux/* proxmox-kernel-6.5.11/modules/tmp
cd proxmox-kernel-6.5.11/modules/tmp; make kernel
make[1]: Entering directory '/mnt/usb/pve-kernel/proxmox-kernel-6.5.11/modules/tmp'
test -f "upstream/README.md" || git submodule update --init
rm -rf zfs-linux-2.2.2 zfs-linux-2.2.2.tmp
cp -a upstream zfs-linux-2.2.2.tmp
cp -a debian zfs-linux-2.2.2.tmp/debian
mv zfs-linux-2.2.2.tmp zfs-linux-2.2.2
tar czf zfs-linux_2.2.2.orig.tar.gz --exclude="zfs-linux-2.2.2/debian" zfs-linux-2.2.2
cd zfs-linux-2.2.2; dpkg-buildpackage -S -uc -us -d
dpkg-buildpackage: info: source package zfs-linux
dpkg-buildpackage: info: source version 2.2.2-pve1
dpkg-buildpackage: info: source distribution bookworm
dpkg-buildpackage: info: source changed by Proxmox Support Team <support@proxmox.com>
 dpkg-source --before-build .
 debian/rules clean
make[2]: Entering directory '/mnt/usb/pve-kernel/proxmox-kernel-6.5.11/modules/tmp/zfs-linux-2.2.2'
dh clean --with autoreconf,python3,sphinxdoc
   debian/rules override_dh_auto_clean
make[3]: Entering directory '/mnt/usb/pve-kernel/proxmox-kernel-6.5.11/modules/tmp/zfs-linux-2.2.2'
find . -name .gitignore -delete
rm -rf zfs-2.2.2
dh_auto_clean
make[3]: Leaving directory '/mnt/usb/pve-kernel/proxmox-kernel-6.5.11/modules/tmp/zfs-linux-2.2.2'
   dh_clean
make[2]: Leaving directory '/mnt/usb/pve-kernel/proxmox-kernel-6.5.11/modules/tmp/zfs-linux-2.2.2'
 dpkg-source -b .
dpkg-source: info: using source format '3.0 (quilt)'
dpkg-source: info: building zfs-linux using existing ./zfs-linux_2.2.2.orig.tar.gz
dpkg-source: info: using patch list from debian/patches/series
can't find file to patch at input line 16
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|From: Debian ZFS on Linux maintainers
| <pkg-zfsonlinux-devel@alioth-lists.debian.net>
|Date: Wed, 30 Jan 2019 15:12:04 +0100
|Subject: [PATCH] Check-for-META-and-DCH-consistency-in-autoconf
|
|Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
|---
| config/zfs-meta.m4 | 34 +++++++++++++++++++++++++++++-----
| 1 file changed, 29 insertions(+), 5 deletions(-)
|
|diff --git a/config/zfs-meta.m4 b/config/zfs-meta.m4
|index 20064a0fb..4d5f545ad 100644
|--- a/config/zfs-meta.m4
|+++ b/config/zfs-meta.m4
--------------------------
No file to patch.  Skipping patch.
3 out of 3 hunks ignored
dpkg-source: info: the patch has fuzz which is not allowed, or is malformed
dpkg-source: info: if patch '0001-Check-for-META-and-DCH-consistency-in-autoconf.patch' is correctly applied by quilt, use 'quilt refresh' to update it
dpkg-source: info: if the file is present in the unpacked source, make sure it is also present in the orig tarball
dpkg-source: error: LC_ALL=C patch -t -F 0 -N -p1 -u -V never -E -b -B .pc/0001-Check-for-META-and-DCH-consistency-in-autoconf.patch/ --reject-file=- < zfs-linux-2.2.2.orig.WtrwIQ/debian/patches/0001-Check-for-META-and-DCH-consistency-in-autoconf.patch subprocess returned exit status 1
dpkg-buildpackage: error: dpkg-source -b . subprocess returned exit status 2
make[1]: *** [Makefile:71: zfs-linux_2.2.2-pve1.dsc] Error 2
make[1]: Leaving directory '/mnt/usb/pve-kernel/proxmox-kernel-6.5.11/modules/tmp'
make: *** [Makefile:124: pkg-zfs.prepared] Error 2
 
idk if this is importen but running this dont work to, i have forgot that.

apt build-dep ./proxmox-kernel-6.5.11/ E: Unsupported file ./proxmox-kernel-6.5.11/ given on commandline E: Must specify at least one package to check builddeps for
 
you need to do "cd proxmox-kernel-6.5.11 ; apt build-dep .".

are you trying this on bookworm? the error you get seems really strange, here's how that part is supposed to look:

Code:
make[1]: Entering directory '/home/fgruenbichler/Sources/pve-kernel/proxmox-kernel-6.5.11/modules/tmp'
test -f "upstream/README.md" || git submodule update --init
rm -rf zfs-linux-2.2.2 zfs-linux-2.2.2.tmp
cp -a upstream zfs-linux-2.2.2.tmp
cp -a debian zfs-linux-2.2.2.tmp/debian
mv zfs-linux-2.2.2.tmp zfs-linux-2.2.2
tar czf zfs-linux_2.2.2.orig.tar.gz --exclude="zfs-linux-2.2.2/debian" zfs-linux-2.2.2
cd zfs-linux-2.2.2; dpkg-buildpackage -S -uc -us -d
dpkg-buildpackage: info: source package zfs-linux
dpkg-buildpackage: info: source version 2.2.2-pve1
dpkg-buildpackage: info: source distribution bookworm
dpkg-buildpackage: info: source changed by Proxmox Support Team <support@proxmox.com>
 dpkg-source --before-build .
dpkg-source: info: using patch list from debian/patches/series
dpkg-source: info: applying 0001-Check-for-META-and-DCH-consistency-in-autoconf.patch
dpkg-source: info: applying 0002-always-load-ZFS-module-on-boot.patch
dpkg-source: info: applying 0003-Fix-the-path-to-the-zed-binary-on-the-systemd-unit.patch
dpkg-source: info: applying 0004-import-with-d-dev-disk-by-id-in-scan-service.patch
dpkg-source: info: applying 0005-Enable-zed-emails.patch
dpkg-source: info: applying 0006-dont-symlink-zed-scripts.patch
dpkg-source: info: applying 0007-Add-systemd-unit-for-importing-specific-pools.patch
dpkg-source: info: applying 0008-Patch-move-manpage-arcstat-1-to-arcstat-8.patch
dpkg-source: info: applying 0009-arc-stat-summary-guard-access-to-l2arc-MFU-MRU-stats.patch
dpkg-source: info: applying 0010-Fix-nfs_truncate_shares-without-etc-exports.d.patch
dpkg-source: info: applying 0011-zpool-status-tighten-bounds-for-noalloc-stat-availab.patch
 debian/rules clean
make[2]: Entering directory '/home/fgruenbichler/Sources/pve-kernel/proxmox-kernel-6.5.11/modules/tmp/zfs-linux-2.2.2'
dh clean --with autoreconf,python3,sphinxdoc
   debian/rules override_dh_auto_clean
make[3]: Entering directory '/home/fgruenbichler/Sources/pve-kernel/proxmox-kernel-6.5.11/modules/tmp/zfs-linux-2.2.2'
find . -name .gitignore -delete
rm -rf zfs-2.2.2
dh_auto_clean
make[3]: Leaving directory '/home/fgruenbichler/Sources/pve-kernel/proxmox-kernel-6.5.11/modules/tmp/zfs-linux-2.2.2'
   dh_clean
make[2]: Leaving directory '/home/fgruenbichler/Sources/pve-kernel/proxmox-kernel-6.5.11/modules/tmp/zfs-linux-2.2.2'
 dpkg-source -b .
dpkg-source: info: using source format '3.0 (quilt)'
dpkg-source: info: building zfs-linux using existing ./zfs-linux_2.2.2.orig.tar.gz
dpkg-source: info: using patch list from debian/patches/series
dpkg-source: info: building zfs-linux in zfs-linux_2.2.2-pve1.debian.tar.xz
dpkg-source: info: building zfs-linux in zfs-linux_2.2.2-pve1.dsc
 dpkg-genbuildinfo --build=source -O../zfs-linux_2.2.2-pve1_source.buildinfo
 dpkg-genchanges --build=source -O../zfs-linux_2.2.2-pve1_source.changes
dpkg-genchanges: info: including full source code in upload
 dpkg-source --after-build .
dpkg-source: info: unapplying 0011-zpool-status-tighten-bounds-for-noalloc-stat-availab.patch
dpkg-source: info: unapplying 0010-Fix-nfs_truncate_shares-without-etc-exports.d.patch
dpkg-source: info: unapplying 0009-arc-stat-summary-guard-access-to-l2arc-MFU-MRU-stats.patch
dpkg-source: info: unapplying 0008-Patch-move-manpage-arcstat-1-to-arcstat-8.patch
dpkg-source: info: unapplying 0007-Add-systemd-unit-for-importing-specific-pools.patch
dpkg-source: info: unapplying 0006-dont-symlink-zed-scripts.patch
dpkg-source: info: unapplying 0005-Enable-zed-emails.patch
dpkg-source: info: unapplying 0004-import-with-d-dev-disk-by-id-in-scan-service.patch
dpkg-source: info: unapplying 0003-Fix-the-path-to-the-zed-binary-on-the-systemd-unit.patch
dpkg-source: info: unapplying 0002-always-load-ZFS-module-on-boot.patch
dpkg-source: info: unapplying 0001-Check-for-META-and-DCH-consistency-in-autoconf.patch
dpkg-buildpackage: info: source-only upload (original source is included)
dpkg-source -x zfs-linux_2.2.2-pve1.dsc ../pkg-zfs
dpkg-source: warning: extracting unsigned source package (zfs-linux_2.2.2-pve1.dsc)
dpkg-source: info: extracting zfs-linux in ../pkg-zfs
dpkg-source: info: unpacking zfs-linux_2.2.2.orig.tar.gz
dpkg-source: info: unpacking zfs-linux_2.2.2-pve1.debian.tar.xz
dpkg-source: info: using patch list from debian/patches/series
dpkg-source: info: applying 0001-Check-for-META-and-DCH-consistency-in-autoconf.patch
dpkg-source: info: applying 0002-always-load-ZFS-module-on-boot.patch
dpkg-source: info: applying 0003-Fix-the-path-to-the-zed-binary-on-the-systemd-unit.patch
dpkg-source: info: applying 0004-import-with-d-dev-disk-by-id-in-scan-service.patch
dpkg-source: info: applying 0005-Enable-zed-emails.patch
dpkg-source: info: applying 0006-dont-symlink-zed-scripts.patch
dpkg-source: info: applying 0007-Add-systemd-unit-for-importing-specific-pools.patch
dpkg-source: info: applying 0008-Patch-move-manpage-arcstat-1-to-arcstat-8.patch
dpkg-source: info: applying 0009-arc-stat-summary-guard-access-to-l2arc-MFU-MRU-stats.patch
dpkg-source: info: applying 0010-Fix-nfs_truncate_shares-without-etc-exports.d.patch
dpkg-source: info: applying 0011-zpool-status-tighten-bounds-for-noalloc-stat-availab.patch
make -C ../pkg-zfs -f debian/rules adapt_meta_file
make[2]: Entering directory '/home/fgruenbichler/Sources/pve-kernel/proxmox-kernel-6.5.11/modules/pkg-zfs'
make[2]: Leaving directory '/home/fgruenbichler/Sources/pve-kernel/proxmox-kernel-6.5.11/modules/pkg-zfs'
make[1]: Leaving directory '/home/fgruenbichler/Sources/pve-kernel/proxmox-kernel-6.5.11/modules/tmp'
rm -rf proxmox-kernel-6.5.11/modules/tmp
touch pkg-zfs.prepared
touch modules.prepared
rm -rf proxmox-kernel-6.5.11/debian
mkdir -p proxmox-kernel-6.5.11
cp -a debian proxmox-kernel-6.5.11/debian
echo "git clone git://git.proxmox.com/git/pve-kernel.git\\ngit checkout 06fe6d5acf4c8990b430f8d80c4246a954a136aa" \
    >proxmox-kernel-6.5.11/debian/SOURCE
 
it should be:

cat /etc/debian_version 12.2

And my source.list is: bookworm

running this in the folder

cd proxmox-kernel-6.5.11 ; apt build-dep .". at what ?

ls modules ubuntu-kernel
 
could you do "ls submodules/zfsonlinux/upstream" and "git submodule status --recursive" ?
 
running "ls submodules/zfsonlinux/upstream" <-- Just write nothing back (empty)

Code:
git submodule status --recursive
 9f8b45f5f8dbd6093b7ff71750bc6eb762fc8b20 submodules/ubuntu-kernel (Ubuntu-6.5.0-14.14-1616-g9f8b45f5f8db)
 81d11761c3a2d325b1b434247894365119ce22eb submodules/zfsonlinux (heads/master)
-494aaaed89cb9fe9f2da3b6c6f465a4bc9f6a7e1 submodules/zfsonlinux/upstream
 
Last edited:
Thanks for your help so far:)


I found something of the STAFF: Fiona

This fixed it: git submodule update --init --recursive submodules/zfsonlinux

https://forum.proxmox.com/threads/pve-kernel-6-2-16-6-pve-build-issue.131779/

But i would like to know how to automatic run install all package that missing for the future, i have now manuel select does and run apt-get install.
And how do i update the git clone?

I found a .config in the folder: pve-kernel/proxmox-kernel-6.5.11/ubuntu-kernel
I wanted to change something in the file .config but the file "config-6.5.11.org" was created while compiling in the folder "pve-kernel" don't contain my changes of .config. Is this still right?
 
the package build dependencies I posted above.

to update, you need to "git pull", and then ensure the submodules are in their correct state as well - see the first reply in this thread.

to change the config, please check the README, it is described there.
 
the package build dependencies I posted above.

to update, you need to "git pull", and then ensure the submodules are in their correct state as well - see the first reply in this thread.

to change the config, please check the README, it is described there.
Thanks,

I have read the README many times, i didnt get it how to use an own config or create and change, compile then. The hole weekend i'm on it.

i have already create "ubuntu.pre" where i find a .config and change what i need but in the main folder pve-kernel is a another config after compiling what does not contain my changes, idk.

I got also a code that use the linux header but since the last update of the kernel i can't use my code "makefile" to compile it with the header. Thats for my Watercooling system that runs over usb. Thats why i m still using the old kernel cause i dont know what have been change from the old to the new one that it does not work.
 
please actually read what I post - the Readme says:

For simple KConfig modifications you can adapt the list in `debian/rules` file.
 
Thanks for your time, i found the file and give it a look but sadly i didnt really understand the structure where it leads. I'm trying to change just 2 valve in the config and recompile it.
 
64 For simple KConfig modifications you can adapt the list in `debian/rules` file.
65 For quick code changes to the actual kernel code you can do them directly in
66 the submodule/ubuntu-kernels directory, then re-create the build-directory, e.g.:

i got that but i need to edite the .config file what i have done, its says re_create, well when i do that this makefile replace my .config and use a new one instad my .config and then its rename it too .config.old.
 
the config is always regenerated as part of the build, you need to adapt debian/rules to enable/disable/change KConfig values.
 
I m now hours in this file and i dont really know what i need to change to have in my .config file fix change. The only thing i need its
CONFIG_HZ_250,
CONFIG_HZ_250=y

changed. Sorry for so much asking but could u pls tell me what i need to change in this file to make it happen? I have later more changes would be bad if the config dont stay the same.
 
Last edited:
Code:
diff --git a/debian/rules b/debian/rules
index 2718672..75eaa40 100755
--- a/debian/rules
+++ b/debian/rules
@@ -103,6 +103,9 @@ PMX_CONFIG_OPTS= \
 -d CONFIG_GDS_FORCE_MITIGATION \
 -d CONFIG_WQ_CPU_INTENSIVE_REPORT \
 -d UBSAN_BOUNDS \
+-d CONFIG_HZ_250 \
+-e CONFIG_HZ_1000 \
+--set-val CONFIG_HZ 1000 \
 
 debian/control: $(wildcard debian/*.in)
     sed -e 's/@@KVNAME@@/$(KVNAME)/g' < debian/proxmox-kernel.prerm.in > debian/$(PMX_KERNEL_PKG).prerm

should give you the desired result (replace 1000 with one of the other values if you want another one.. not that 250 is already the default ;))

Code:
$ grep CONFIG_HZ proxmox-kernel-6.5.11/ubuntu-kernel/.config
# CONFIG_HZ_PERIODIC is not set
# CONFIG_HZ_100 is not set
# CONFIG_HZ_250 is not set
# CONFIG_HZ_300 is not set
CONFIG_HZ_1000=y
CONFIG_HZ=1000
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!