Sorry to keep posting so frequently–feels like I am so close!! That error MUST be a fluke because I’m back to the missing kernel headers and I am not sure how to use your KVERS= variable. I tried adding it to the beginning of the command, but it doesn’t seem to do anything. Do I open up the script in mousepad, and add it somewhere?
Also the output gives me something to note.
It’s something along the lines of an addition to select the kernel directory.
In typing this, I’ve already rebooted via usb and chrooted just building it now.
I know we’ll see–if it’s error I’ll go find that kernel source message because I still haven’t installed the header stuff yet… I rebooted to get into all that as I’m not sure this will work.
I promise I’ll get those gosh darn headers after this if need be. Shouldn’t be long on.
hmm… uh it says
dkms: install completed.
The driver was installed successfully.
./install-driver.sh: line 173; rfkill: command not found
Do you want to edit the driver options file now? (and yes I do). I want to but I’m so eager to test this–do you think it will work?! I’ll update you.
Not auto-loading the module. Not sure where to start it. Maybe that 173 error about rfkill not found was major? Maybe I still need to get the right kernel headers together?
Well I’m wondering if maybe the install worked becaise I was chrooted (woith kernel 5.10.0-15 instead of the installed hdd version of .18 and matybe it just got through–but because I’m not running .15 it’s not gonna work? As you can tell I’ WAY over my head here! How might I begin to try activating / starting the driver or module?
EDIT: i installed this driver (again chrooted) with the command
KVER=$(uname -a) ./install-driver.sh
So I’m not in the least bit confident that this will be compatible until I figure out those headers, but I ALSO do not know if that addition did anything or not, so I’m not sure if I should try activating the driver or remove it, get headers and reinstall driver.
Well if you call it like that it doesn’t change a thing.
What I did to modify those scripts is I replaced:
KVER="$(uname -r)"
with:
if [ -z ${KVER} ]; then
KVER="$(uname -r)"
if
Which means that it the KVER variable is unset it’ll be set to the output of uname -r command, but if it is set manually then that will be used instead.
Sothen where am I? I called it in the command–you say that’s null, so then did the driver install? How do I attempt to run the module?
In the mean time I’ll still be installing kernel headers–or would you like me to wait?
I’ll wait for your guidance but running
apt install linux-headers … .18 gets me 2 new packages:
headers and -common.
At least that will get the /usr/src/ folder in there. But should I wait and look for how to load this module first or scrap the driver, get headers then try again?
If you decide to execute it like that then you’ll need to explicitly specify the kernel version for which you intend to install the driver. This can be used in a situation where for example the kernel you’re running is a different version than the one you want to install for. Well install or remove depending on which script you’ll run. This is something that you had trouble with where you were running one version of the kernel on the usb and tried to install for another in the chroot.
If you call it like you did then it will install for the kernel that you’re currently running, so basically you’re doing the same the script would automatically do.
Yes, now you’ve installed the latest headers!
So now you can either install the driver from chroot forcing it to install for 5.10.0-18:
KVER="5.10.0-18-amd64" ./install-driver.sh
or boot from hdd and install the driver there. Since you now have the headers required it shouldn’t complain about them anymore.
I need your help oone more time. I know you’ve typed it out clearly but I’m completely lost when it comes to mounring the /proc directories and all that.
Here’s why. Somewhere in the process, I lose access rto rhe debian root systwm and O don’t wanr to do the commans out of order.
So I guess… do I wait to chroot into debian; AFTER I mount all the system direcories.
DKMS needs /proc/cpuinfo and things may not work right without it amd I don’t want to keep filling up this thread with avoidable errors.
I installed the headers WITHOUT mounting anything other than
mount /dev/sdaX /mnt.
I then did
chroot /mnt.
I’m not sure how to properly mount proc because I just don’t know where it’s pulling them from.
Am I adding proc from the HOST? Or do I chroot into the debian, and then mount them there? To me that makes no sense as wouldn’t every bit of that be in /dev/sdX and then at /mnt???
I don’t want to miss anything crucial so I figured I’d better mention it too, just in case it causes avoidable issues.
Specifically:
dkms: running auto installation service for kernel 5.10.0-18-amd64grep: /proc/cpuinfo: No such file or directory
.
/usr/bin/dkms: line 3345: /dev/fd/63: No such file or directory.
Or, since I have it all–I could just reboot and reinstall? Going to try that right now.
The way I suggested you mount special directories was:
That means that those special directories are pretty much shared between the system running and the system you’re about to chroot into, which is fine in 99% of cases, because you’re running on the same hardware anyway.
The REALLY infuriating thing about ALL of this part is that I cannot just download the deb–oh it actually pulls it and downloads it, but then, because chroot uses root, it will refuse to save the file it just downloaded and I don’t know how else to download it.
Can I switch to a regular user in chroot to download this and just install the headers on the installed system?
It doesn’t give a direct url I can use. I don’t know how to proceed. Sure the headers ARE installed but I don’t think properly installed.
Edit got into user mode exiting the chroot shell and did the DL command;
Download is performed unsandboxed as root as file ‘/home/username/headers.deb’ couldn’t be accessed by user ‘_apt’, - pkgAquire;Run (13: Permission Denied)
I’ll tey seeing if it’s there. It’s there so … I will try ro move it. I think }'ll figure it out. If not, I’ll make a new post, or try chroot with those special dirs.
I (think) I’ve gotten the kernel headers correctly installed (on the booted system–nochroot for that) and now when I renove and then run the script … surpise! I get an error saying:
The dkms runtimes are in use
Copying source files to: /usr/src/rtl8821cu-5.12.0 Error! Could not locate dkms.conf file
File: /usr/src/rtl8821cu-5.12.0/dkms.conf does not exist!
An error occured. dkms add error = 4
Please report this error.
Please copy all screen output and paste it into the report.
Run the following before reattempting reinstallation.
$ sudo ./remove-driver.sh
Ah I’ll add this–you replied just after me but I got it. The older version works–Wi-Fi networks available popped up on desktop. Go have fun working on something else, I’ll send a message to the dev tomorrow and just link to this 50 post thread.
I don’t know how to feel but I know I’m going to sleep now.
Not sure about iOS, but in a pinch, you can USB tether your Linux laptop/desktop to an Android phone. The computer will basically see a USB Ethernet adapter, and your android phone will act as a router with DHCP and DNS.
You don’t need to share 5G/LTE (metered/bandwidth limited) this way, you can also tether over USB to share wifi.
Another option is to use a USB stick to share drivers / packages.
Another option is to buy some other $5, 802.11n/ac adapter that is supported, use it for installation. (having a few helpful dongles is a good idea in general).
Another option is to prepare your own installation media to include whatever you need it to include. (depending on the distro might be a bit complicated, particularly Debian has the official arcane method of building install images and a half dozen other half-baked methods, archiso is a walk in the park in comparison.).
That’s pretty much what I’ve been trying to help @E-waste with.
That’s suggested even in the documentation of the drivers that @E-waste himself linked:
Warning: Adapters listed here are not recommended for purchase as I do not recommend Linux users buy Realtek based USB WiFi adapters due to the lack of mac80211 technology drivers that are supported in-kernel as called for by Linux Wireless Standards. This repo is supported for the benefit of Linux users who already have adapters based on the supported chipsets. If you are looking for information about what adapter to buy, click here for information about and links to recommended adapters.
AFAIK, for that to work(so that the drivers are installed along with the base system), we’d need to package the drivers first, so that’s another layer of complexity on top of the one you’ve already mentioned.
It really seemed to me like the simplest solution, requiring the least amount of resources and investment would be to install the drivers from usb.
Yeah, well… e-waste. Unfortunately, I ruined chain’s flash memory, so now, that will probably need to be replaced too. So, in trying to get this working, instead of a usb wifi being purchased, it’s another usb drive, can’t win 'em all I guess.
Don’t worry about it. Like I said - it’s chinesium that I got for free, and if the flash memory was that shitty, then it’s better that it failed now then if I used it for something more critical. This was e-waste when it left the factory, but no - there’s no need to replace it, I have a bunch of other flash drives.