Custom kernel doesn't boot on proxmox

I'm running VM on proxmox with ubuntu 24.04 on virtIO hdd

I see, I am now less puzzled. :D You see, when you said "I can run it on Ubuntu" I assumed everything else (hardware) being the same. I think you simply have no AHCI support, hence it can't see your SATA drive (the rest, LVM, etc. is of course not going to work).

But about the .config, why not take the PVE config as a template? You can get that from existing /boot/config- .... otherwise you might find yourself rebuilding it all the time and experiencing weird issues only to find some other options are not tweaked for PVE.
 
I was coping .configs from ubuntu VM, proxmox even zabbly and building on VM.
Looks like for some reason flags where disabled and I dont have expierience with building kernels.
My 6.8 generic pve kernel don't boot. 6.5 works good on my old HW.
I want to test kernel with clang
 
Last edited:
... otherwise you might find yourself rebuilding it all the time and experiencing weird issues only to find some other options are not tweaked for PVE.

For demonstration, look at this diff -u -b config-6.8.12-1-pve config.txt (yours) - attached.

EDIT: You are missing everything that starts with -.
 

Attachments

Last edited:
I was able to boot new clang based kernel but for some reason my network card was not working.
I will build kernel based on proxmox .config (config-6.8.8-3-pve) and check tomorrow.
Good night and thanks a lot.
 
I was able to boot new clang based kernel but for some reason my network card was not working.

Because you most likely also miss the other modules in. The (supposedly) cloud kernel would not have any of this in by default.
But I think it's a good learning experience. My bad too, I should have diff'ed it earlier and see the huge discrepancy.

Anyhow if you wonder what I was trying to achieve with the commands above - I was wondering first if your initramfs can see the disk at all, any partitions, which it could not. Then assuming it's some exotic setup with RAID card, I wanted to know which module is needed that serves that disk (from the running system), but it was "just" the AHCI, which in turn I realised I should have spotted in your first post already. But sometimes it's good going full circle.

I will build kernel based on proxmox .config (config-6.8.8-3-pve) and check tomorrow.

Sure, let me know how it went. BTW If you want to build some very minimalistic kernel, I would start comparing stock Ubuntu with PVE, then examine every item they added if it's absolutely necessary, then only do my "own" stuff (e.g. SYSTEM_TRUSTED_KEYS). I better won't be asking why you need that. :)

Good night and thanks a lot.

Cheers!
 
I was trying to build pve kernel like was in this thread (https://github.com/proxmox/pve-kernel/blob/master/README) but looks like there is some problem with mirror repo:

root@ubuntusrv:/home/pawel/pve/pve-kernel# make CC=clang-18 build-dir-fresh
make clean
make[1]: Entering directory '/home/pawel/pve/pve-kernel'
rm -rf *~ proxmox-kernel-[0-9]*/ *.prepared config-6.8.12.org
rm -f *.deb *.dsc *.changes *.buildinfo *.build proxmox-kernel*.tar.*
make[1]: Leaving directory '/home/pawel/pve/pve-kernel'
make proxmox-kernel-6.8.12.prepared
make[1]: Entering directory '/home/pawel/pve/pve-kernel'
test -f "submodules/ubuntu-kernel/README" || git submodule update --init submodules/ubuntu-kernel
Cloning into '/home/pawel/pve/pve-kernel/submodules/ubuntu-kernel'...
Username for 'https://github.com': pderen79
Password for 'https://pderen79@github.com':
remote: Repository not found.
fatal: repository 'https://github.com/proxmox/mirror_ubuntu-kernels/' not found
fatal: clone of 'https://github.com/proxmox/mirror_ubuntu-kernels' into submodule path '/home/pawel/pve/pve-kernel/submodules/ubuntu-kernel' failed
Failed to clone 'submodules/ubuntu-kernel'. Retry scheduled
Cloning into '/home/pawel/pve/pve-kernel/submodules/ubuntu-kernel'...
Username for 'https://github.com':
 
Last edited:
I was trying to build pve kernel like was in this thread (https://github.com/proxmox/pve-kernel)but looks like there is some problem with mirror repo

root@ubuntusrv:/home/pawel/pve/pve-kernel# make CC=clang-18 build-dir-fresh
make clean
make[1]: Entering directory '/home/pawel/pve/pve-kernel'
rm -rf *~ proxmox-kernel-[0-9]*/ *.prepared config-6.8.12.org
rm -f *.deb *.dsc *.changes *.buildinfo *.build proxmox-kernel*.tar.*
make[1]: Leaving directory '/home/pawel/pve/pve-kernel'
make proxmox-kernel-6.8.12.prepared
make[1]: Entering directory '/home/pawel/pve/pve-kernel'
test -f "submodules/ubuntu-kernel/README" || git submodule update --init submodules/ubuntu-kernel
Cloning into '/home/pawel/pve/pve-kernel/submodules/ubuntu-kernel'...
Username for 'https://github.com': pderen79
Password for 'https://pderen79@github.com':
remote: Repository not found.
fatal: repository 'https://github.com/proxmox/mirror_ubuntu-kernels/' not found
fatal: clone of 'https://github.com/proxmox/mirror_ubuntu-kernels' into submodule path '/home/pawel/pve/pve-kernel/submodules/ubuntu-kernel' failed
Failed to clone 'submodules/ubuntu-kernel'. Retry scheduled
Cloning into '/home/pawel/pve/pve-kernel/submodules/ubuntu-kernel'...
Username for 'https://github.com':

it's not on github, it's: https://git.proxmox.com/?p=mirror_ubuntu-kernels.git
 
I have problem with zfs module sources. Where is correct repo for proxmox kernel 6.8 ?

Is this correct one with branch zfs-2.0.6-bullseye => https://git.proxmox.com/?p=zfsonlinux.git;a=summary
I see there is no branch for bookworm.

pawel@ubuntusrv:~/pve/pve-kernel$ sudo CC=clang-18 make build-dir-fresh
[sudo] password for pawel:
make clean
make[1]: Entering directory '/home/pawel/pve/pve-kernel'
rm -rf *~ proxmox-kernel-[0-9]*/ *.prepared config-6.8.12.org
rm -f *.deb *.dsc *.changes *.buildinfo *.build proxmox-kernel*.tar.*
make[1]: Leaving directory '/home/pawel/pve/pve-kernel'
make proxmox-kernel-6.8.12.prepared
make[1]: Entering directory '/home/pawel/pve/pve-kernel'
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
fatal: remote error: upload-pack: not our ref f5c9e3a9a85e73ef96f02375a745b10115a319b3
fatal: Fetched in submodule path 'submodules/zfsonlinux', but it did not contain f5c9e3a9a85e73ef96f02375a745b10115a319b3. Direct fetching of that commit failed.
make[1]: *** [Makefile:147: submodule] Error 128
make[1]: Leaving directory '/home/pawel/pve/pve-kernel'
make: *** [Makefile:86: build-dir-fresh] Error 2
 
Last edited:
I have problem with zfs module sources. Where is correct repo for proxmox kernel 6.8 ?

Is this correct one with branch zfs-2.0.6-bullseye => https://git.proxmox.com/?p=zfsonlinux.git;a=summary
I see there is no branch for bookworm.

pawel@ubuntusrv:~/pve/pve-kernel$ sudo CC=clang-18 make build-dir-fresh
[sudo] password for pawel:
make clean
make[1]: Entering directory '/home/pawel/pve/pve-kernel'
rm -rf *~ proxmox-kernel-[0-9]*/ *.prepared config-6.8.12.org
rm -f *.deb *.dsc *.changes *.buildinfo *.build proxmox-kernel*.tar.*
make[1]: Leaving directory '/home/pawel/pve/pve-kernel'
make proxmox-kernel-6.8.12.prepared
make[1]: Entering directory '/home/pawel/pve/pve-kernel'
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
fatal: remote error: upload-pack: not our ref f5c9e3a9a85e73ef96f02375a745b10115a319b3
fatal: Fetched in submodule path 'submodules/zfsonlinux', but it did not contain f5c9e3a9a85e73ef96f02375a745b10115a319b3. Direct fetching of that commit failed.
make[1]: *** [Makefile:147: submodule] Error 128
make[1]: Leaving directory '/home/pawel/pve/pve-kernel'
make: *** [Makefile:86: build-dir-fresh] Error 2

I think it's looking for master: https://git.proxmox.com/?p=zfsonlinux.git;a=commit;h=refs/heads/master
 

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!