I recently got my hands on an alfa AWUS036ACH adapter (thats an RTL8812AU chip) and wanted to give it a go on my persistent USB install. (note that I have tried and had the same problems on a simple live system. I'm booting from the most recent weekly image (also tried a stable image,) and the system is totally fresh. Now, what I did on my native system that worked fine was:
Code:
sudo apt-get -y dist-upgrade
apt update
apt install realtek-rtl88xxau-dkms
sudo modprobe 8812au
sudo systemctl restart network-mananger
However, as I had discovered earlier, the dist-upgrade updates the kernel, but the live USB cannot seem to update the kernel it's booting from (and the one uname refers to). This isn't normally a problem, but after a dist-upgrade, I have two folders in /lib/modules: 4.14.0-kali3-amd64 (my old kernel) and 4.15.0-kali2-amd64 (the new one). Only using apt update does not create the second folder, but when I attempt to install the driver, it creates it. The make and build which aptitude is looking for are in the 4.15 folder, because the distribution has upgraded this, but the system still thinks I'm supposed to be using 4.14, so it looks there and gets confused. Specifically, in the install, I get
Code:
Setting up linux-headers-4.15.0-kali2-amd64 (4.15.11-1kali1) ...
/etc/kernel/header_postinst.d/dkms:
Error! Bad return status for module build on kernel: 4.15.0-kali2-amd64 (x86_64)
Consult /var/lib/dkms/realtek-rtl88xxau/5.1.5~20180125/build/make.log for more information.
In the make.log file, it says "Make[1]: *** /lib/modules/4.14.0-kali3-amd64/build: No such file or Directory. Stop." So it's clearly looking in the wrong folder, dispite it being the command to updated the headers!
Also, sudo modprobe <anything> says "modprobe: FATAL: Module <anything> not found in directory /lib/modules/4.14.0-kali3-amd64" So it's looking there too. I assume it's getting all this from uname, which also outputs the 4.14 file. I know there are some ways of updating the kernel manually on live USB, but I don't want to have to do that every week, and I'm not even sure it has ever worked for anyone...
TL;DR
Runing apt install realtek-rtl88xxau-dkms installs new kernel headers, and then tries to build from the old kernel, which now has neither make nor build.