If the kernel you are going to flash is supported for the rom you currently have installed, then it's just a matter of flashing from recovery or from an app. Kernels built by Anykernel preserve root and if you are flashing boot.img, then you need to root again. I rare cases, you need to flash stock boot.img before flashing the new kernel if you run into issues.
I'm happy that you got it working finally after many failed attempts..
BTW, did you flash nethunter rom overlay zip or directly installed nethunter app and installed chroot from sdcard?
I have followed this tutorial and I chose option 2 to
"Just download nethunter and NH terminal app from nethunter store and install them. Then download nethunter generic zip from nethunter download page and extract it. You’ll get a zip file with the chroot. Copy that file to the root of sdcard. Then open nethunter app and goto install page and select install from sdcard. If it says file not found, then rename the file to the exact name it searches for and it will install. It will take some minutes to install. After installing, you can start the chroot. That's it."
I downloaded both the nethuntergeneric.zip and the nethunteroneplus3any10kernel.zip
in either i cant find chroot.zip only installchroot.sh is that what I need?
I figured it out. The file mentioned above is a file called kalifs-arm64-full.tar.xz
I had to rename it to kalifs-backup.tar.xz and save it to root of emulated/0/ then I installed by pressing kali chroot manager and install from storage. My location was was emulated/0/ as this Oneplus3 doesn't have an sd slot but for other phones the location ends in /SDCard/
Coconut Kernel for LineageOS 17.1 - With Nethunter Support
***I wont be responsible for any problems that might occur flashing this kernel or what you do with the kernel support***
I know that the device is pretty old and there may be other kernels available too. But I'm just posting this as i recently compiled it for myself.
Just flash the kernel from recovery.
You can use this kernel for nethunter functions and other chroot applications like Linux Deploy.
HID patch and DriveDroid patch is also included.
Note:- The USB Wifi adapters firmware is also included with the zip and will be automatically installed. No need to use magisk module for installing firmwares.
I may later post a kernel with nethunter support for Havoc OS too if anyone's interested.
Do a wipe. Then install lineage17.1. Flash magisk. Then flash the kernel. Keep in mind that this is only a kernel to support the nethunter functions. So flashing this won't give you nethunter app or chroot. You need to separately flash nethunter rom overlay for your device or manually install nethunter app from nethunter app store and install chroot from inside the app.
Edit.. I think I misunderstood your question. So you were asking for the nethunter rom flashing bootloop. In that case do a wipe and follow the 2nd method i suggested above. You can also try flashing the generic image available in the nethunter download page if your device specific rom overlay fails.