In general we follow https://news.itsfoss.com/cachyos-kernel-builder/ . Start with installation $ sudo apt install bpftool
and include /usr/sbin in system $PATH variable.
boris@DebianKNext:~$ export PATH="/usr/sbin:$PATH"
boris@DebianKNext:~$ echo $PATH
/usr/sbin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
boris@DebianKNext:~$
$ git clone https://github.com/Nitrux/linux-cachyos-deb
$ cd linux-cachyos-deb
$ ./cachy-kernel-deb
Script installs all required packages and pops up TUI dialog to configure kernel 6.13.3 and finally proceed with building of packages.
Start building debian's vmlinuz-6.13.3 and kernel's initrd.img-6.13.3 with configuration bellow
Up on successful completion
boris@DebianKNext:~/linux-cachyos-deb$ ls -l
total 329360
-rwxrwxr-x 1 boris boris 40468 Feb 20 08:43 cachy-kernel-deb
-rw-rw-r-- 1 boris boris 1536 Feb 20 08:39 LICENSE
drwxrwxr-x 27 boris boris 4096 Feb 20 09:47 linux-6.13.3
-rw-rw-r-- 1 boris boris 148516460 Feb 17 05:45 linux-6.13.3.tar.xz
-rw-r--r-- 1 boris boris 2110368 Feb 20 09:47 linux-headers-cachyos-6.13.3-2025.02.20-09.37_amd64.deb
-rw-r--r-- 1 boris boris 186579008 Feb 20 09:37 linux-image-cachyos-6.13.3-2025.02.20-09.37_amd64.deb
-rw-rw-r-- 1 boris boris 3466 Feb 20 08:39 README.md
Run dpkg for installation *.deb packages
boris@DebianKNext:~/linux-cachyos-deb$ sudo dpkg -i linux-headers-cachyos-6.13.3-2025.02.20-09.37_amd64.deb \
linux-image-cachyos-6.13.3-2025.02.20-09.37_amd64.deb
[sudo] password for boris:
Selecting previously unselected package linux-headers-cachyos-6.13.3.
(Reading database ... 217622 files and directories currently installed.)
Preparing to unpack linux-headers-cachyos-6.13.3-2025.02.20-09.37_amd64.deb ...
Unpacking linux-headers-cachyos-6.13.3 (2025.02.20-09.37) ...
Selecting previously unselected package linux-image-cachyos-6.13.3.
Preparing to unpack linux-image-cachyos-6.13.3-2025.02.20-09.37_amd64.deb ...
Unpacking linux-image-cachyos-6.13.3 (2025.02.20-09.37) ...
Setting up linux-image-cachyos-6.13.3 (2025.02.20-09.37) ...
update-initramfs: Generating /boot/initrd.img-6.13.3
Generating grub configuration file ...
Found background image: .background_cache.png
Found linux image: /boot/vmlinuz-6.13.3
Found initrd image: /boot/initrd.img-6.13.3
Found linux image: /boot/vmlinuz-6.12.12-amd64
Found initrd image: /boot/initrd.img-6.12.12-amd64
Warning: os-prober will not be executed to detect other bootable partitions.
Systems on them will not be added to the GRUB boot configuration.
Check GRUB_DISABLE_OS_PROBER documentation entry.
Adding boot menu entry for UEFI Firmware Settings ...
done
Setting up linux-headers-cachyos-6.13.3 (2025.02.20-09.37) ...
'/usr/lib/modules/6.13.3/build/linux-headers-6.13.3' -> '/usr/src/linux-headers-6.13.3'
boris@DebianKNext:~/linux-cachyos-deb$ sudo su -
root@DebianKNext:~# ls -l /boot
total 166340
-rw-r--r-- 1 root root 281007 Feb 2 08:17 config-6.12.12-amd64
-rw-rw-r-- 1 root root 297865 Feb 20 09:37 config-6.13.3
drwx------ 3 root root 4096 Dec 31 1969 efi
drwxr-xr-x 5 root root 4096 Feb 20 09:50 grub
-rw-r--r-- 1 root root 61839871 Feb 20 08:26 initrd.img-6.12.12-amd64
-rw-r--r-- 1 root root 73482509 Feb 20 09:50 initrd.img-6.13.3
drwx------ 2 root root 16384 Feb 20 08:17 lost+found
-rw-r--r-- 1 root root 83 Feb 2 08:17 System.map-6.12.12-amd64
-rw-rw-r-- 1 root root 9233122 Feb 20 09:37 System.map-6.13.3
-rw-r--r-- 1 root root 10041280 Feb 2 08:17 vmlinuz-6.12.12-amd64
-rw-rw-r-- 1 root root 15110656 Feb 20 09:37 vmlinuz-6.13.3
Configure /boot/grub/grub.cfg to boot into new kernel
root@DebianKNext:~# grub-mkconfig -o /boot/grub/grub.cfg
Generating grub configuration file ...
Found background image: .background_cache.png
Found linux image: /boot/vmlinuz-6.13.3
Found initrd image: /boot/initrd.img-6.13.3
Found linux image: /boot/vmlinuz-6.12.12-amd64
Found initrd image: /boot/initrd.img-6.12.12-amd64
Warning: os-prober will not be executed to detect other bootable partitions.
Systems on them will not be added to the GRUB boot configuration.
Check GRUB_DISABLE_OS_PROBER documentation entry.
Adding boot menu entry for UEFI Firmware Settings ...
done
Now reboot debian testing instance