build kernel not working

Jackiix

Member
Nov 22, 2022
51
0
6
What i m doing wrong?

make
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/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
fatal: remote error: upload-pack: not our ref 81d11761c3a2d325b1b434247894365119ce22eb
fatal: Fetched in submodule path '../../../submodules/zfsonlinux', but it did not contain 81d11761c3a2d325b1b434247894365119ce22eb. Direct fetching of that commit failed.
make[1]: *** [Makefile:56: submodule] Error 128
make[1]: Leaving directory '/mnt/usb/pve-kernel/proxmox-kernel-6.5.11/modules/tmp'
make: *** [Makefile:124: pkg-zfs.prepared] Error 2
 
Hi,
please try running the following first:
Code:
git submodule foreach --recursive git fetch --tags && git submodule update --init --recursive
 
Thanks, but sadly still not working, i have already try 3 times deleting it and clone it again but not working to.


Code:
Entering 'submodules/ubuntu-kernel'
Entering 'submodules/zfsonlinux'
fatal: remote error: upload-pack: not our ref 81d11761c3a2d325b1b434247894365119ce22eb
fatal: Fetched in submodule path 'submodules/zfsonlinux', but it did not contain 81d11761c3a2d325b1b434247894365119ce22eb. Direct fetching of that commit failed.
 
There was a push from our side missing. Thank you for the report! Should work now.
 
  • Like
Reactions: Jackiix
Thanks very much, worked but now i got something else:

Code:
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/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 .
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 '/mnt/usb/pve-kernel/proxmox-kernel-6.5.11/modules/tmp/zfs-linux-2.2.2'
dh clean --with autoreconf,python3,sphinxdoc
dh: error: unable to load addon python3: Can't locate Debian/Debhelper/Sequence/python3.pm in @INC (you may need to install the Debian::Debhelper::Sequence::python3 module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.36.0 /usr/local/share/perl/5.36.0 /usr/lib/x86_64-linux-gnu/perl5/5.36 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl-base /usr/lib/x86_64-linux-gnu/perl/5.36 /usr/share/perl/5.36 /usr/local/lib/site_perl) at (eval 13) line 1.
BEGIN failed--compilation aborted at (eval 13) line 1.


make[2]: *** [debian/rules:13: clean] Error 255
make[2]: Leaving directory '/mnt/usb/pve-kernel/proxmox-kernel-6.5.11/modules/tmp/zfs-linux-2.2.2'
dpkg-buildpackage: error: debian/rules clean 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
 
You need to install the build-dependencies first apt install build-dep ..

EDIT: see below
 
Last edited:
Thanks, but i got another problem

Code:
apt install build-dep
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package build-dep
 
EDIT: the README file in the repository also describes how to get the build-dependencies: https://git.proxmox.com/?p=pve-kern...cc26b8070c5a6b2ed9b2a33616ab1a0033883;hb=HEAD


Ah, sorry. There is an extra install that should not be there.

But you actually need to run both of these:
Code:
make debian.prepared
apt build-dep ./proxmox-kernel-6.5.11/

Note for future readers: the name of the directory in the second command depends on the current version.
 
Last edited:
Thank you but idk what i'm doing wrong but not working to:

Code:
make debian.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
/bin/sh: 1: cannot create proxmox-kernel-6.5.11/debian/SOURCE: Is a directory
make: *** [Makefile:93: debian.prepared] Error 2

Code:
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
 
I also try to clone it again and other stuff but the msg is still the same.
Does this have anything to do with my current kernel?
 
are you trying to do this on a case-insensitive file system? Oo
 
  • Like
Reactions: fiona
yes. please use a proper filesystem (all of ext4/xfs/zfs should work, for example)
 
Thanks i gona try it but after it work can u tell me how to create or use an kernel config? Cause there none.
 
Worked but to make it, i need to run make right? Cause i run now only "make debian.prepared" Will it be auto installed or do i first need to create .deb?
 
I just try it, anything i run alway the same Error.

"make debian.prepared" did work fine

Code:
make deb
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
dh: error: unable to load addon python3: Can't locate Debian/Debhelper/Sequence/python3.pm in @INC (you may need to install the Debian::Debhelper::Sequence::python3 module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.36.0 /usr/local/share/perl/5.36.0 /usr/lib/x86_64-linux-gnu/perl5/5.36 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl-base /usr/lib/x86_64-linux-gnu/perl/5.36 /usr/share/perl/5.36 /usr/local/lib/site_perl) at (eval 13) line 1.
BEGIN failed--compilation aborted at (eval 13) line 1.

make[2]: *** [debian/rules:13: clean] Error 255
make[2]: Leaving directory '/mnt/usb/pve-kernel/proxmox-kernel-6.5.11/modules/tmp/zfs-linux-2.2.2'
dpkg-buildpackage: error: debian/rules clean 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
 
Last edited:
you need to run "make debian-prepared" to generate the proxmox-kernel-../debian/control file which you can then use the install the build deps. then you can run "make clean deb" to build the kernel packages.. this is all described in the README though..
 
I have read the README but i didnt seen the "make debian-prepared" sorry, i m new too this, got only problems with Compiling... but the error is still there, i done it like u said.

Code:
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
dh: error: unable to load addon python3: Can't locate Debian/Debhelper/Sequence/python3.pm in @INC (you may need to install the Debian::Debhelper::Sequence::python3 module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.36.0 /usr/local/share/perl/5.36.0 /usr/lib/x86_64-linux-gnu/perl5/5.36 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl-base /usr/lib/x86_64-linux-gnu/perl/5.36 /usr/share/perl/5.36 /usr/local/lib/site_perl) at (eval 13) line 1.
BEGIN failed--compilation aborted at (eval 13) line 1.

make[2]: *** [debian/rules:13: clean] Error 255
make[2]: Leaving directory '/mnt/usb/pve-kernel/proxmox-kernel-6.5.11/modules/tmp/zfs-linux-2.2.2'
dpkg-buildpackage: error: debian/rules clean 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
 
I got the error fixed by: apt install dh-python

New error:

Code:
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.UwM8Dm/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
 
that sounds like your submodule state is inconsistent - check "git status"
 

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!