wifi drivers missing after update Topic is solved

Having issues with your DietPi installation or found a bug? Post it here.
valdragas
Posts: 35
Joined: Sat Oct 03, 2020 1:14 pm

Re: wifi drivers missing after update

Post by valdragas »

MichaIng wrote: Tue May 25, 2021 1:49 am It is not a Berryboot image, is it?

Can you show the content of the boot partition and kernel modules:

Code: Select all

ls -l /boot /lib/modules

Code: Select all

root@DietPi:~# ls -l /boot /lib/modules
/boot:
total 49139
-rwxr-xr-x 1 root root   18693 May 21 09:46  COPYING.linux
-rwxr-xr-x 1 root root     512 Jan  1  1980  FSCK0000.REC
-rwxr-xr-x 1 root root     512 Jan  1  1980  FSCK0001.REC
-rwxr-xr-x 1 root root     512 Jan  1  1980  FSCK0002.REC
-rwxr-xr-x 1 root root     512 Jan  1  1980  FSCK0003.REC
-rwxr-xr-x 1 root root    6144 Jan  1  1980  FSCK0004.REC
-rwxr-xr-x 1 root root   10752 Jan  1  1980  FSCK0005.REC
-rwxr-xr-x 1 root root   68096 Jan  1  1980  FSCK0006.REC
-rwxr-xr-x 1 root root  629248 Jan  1  1980  FSCK0007.REC
-rwxr-xr-x 1 root root   10240 Jan  1  1980  FSCK0008.REC
-rwxr-xr-x 1 root root   20480 Jan  1  1980  FSCK0009.REC
-rwxr-xr-x 1 root root   10752 Jan  1  1980  FSCK0010.REC
-rwxr-xr-x 1 root root    1594 May 21 09:58  LICENCE.broadcom
drwxr-xr-x 2 root root     512 Sep  9  2020 'System Volume Information'
-rwxr-xr-x 1 root root   25870 May 21 09:46  bcm2708-rpi-b-plus.dtb
-rwxr-xr-x 1 root root   25218 May 21 09:46  bcm2708-rpi-b-rev1.dtb
-rwxr-xr-x 1 root root   25607 May 21 09:46  bcm2708-rpi-b.dtb
-rwxr-xr-x 1 root root   25529 May 21 09:46  bcm2708-rpi-cm.dtb
-rwxr-xr-x 1 root root   26545 May 21 09:46  bcm2708-rpi-zero-w.dtb
-rwxr-xr-x 1 root root   25352 May 21 09:46  bcm2708-rpi-zero.dtb
-rwxr-xr-x 1 root root   26745 May 21 09:46  bcm2709-rpi-2-b.dtb
-rwxr-xr-x 1 root root   26894 May 21 09:46  bcm2710-rpi-2-b.dtb
-rwxr-xr-x 1 root root   29011 May 21 09:46  bcm2710-rpi-3-b-plus.dtb
-rwxr-xr-x 1 root root   28392 May 21 09:46  bcm2710-rpi-3-b.dtb
-rwxr-xr-x 1 root root   26890 May 21 09:46  bcm2710-rpi-cm3.dtb
-rwxr-xr-x 1 root root   49090 May 21 09:46  bcm2711-rpi-4-b.dtb
-rwxr-xr-x 1 root root   48810 May 21 09:46  bcm2711-rpi-400.dtb
-rwxr-xr-x 1 root root   49202 May 21 09:46  bcm2711-rpi-cm4.dtb
-rwxr-xr-x 1 root root   52456 May 21 09:58  bootcode.bin
-rwxr-xr-x 1 root root     119 May 14 13:09  cmdline.txt
-rwxr-xr-x 1 root root    2852 May 16 11:44  config.txt
drwxr-xr-x 4 root root    3072 May 16 11:51  dietpi
-rwxr-xr-x 1 root root  205026 May 10  2020  dietpi-CHANGELOG.txt
-rwxr-xr-x 1 root root   10130 May 10  2020  dietpi-README.md
-rwxr-xr-x 1 root root   12552 May 16 11:43  dietpi.txt
-rwxr-xr-x 1 root root    7314 May 21 09:58  fixup.dat
-rwxr-xr-x 1 root root    5446 May 21 09:58  fixup4.dat
-rwxr-xr-x 1 root root    3191 May 21 09:58  fixup4cd.dat
-rwxr-xr-x 1 root root    8454 May 21 09:58  fixup4db.dat
-rwxr-xr-x 1 root root    8452 May 21 09:58  fixup4x.dat
-rwxr-xr-x 1 root root    3191 May 21 09:58  fixup_cd.dat
-rwxr-xr-x 1 root root   10298 May 21 09:58  fixup_db.dat
-rwxr-xr-x 1 root root   10298 May 21 09:58  fixup_x.dat
-rwxr-xr-x 1 root root     145 May 27  2020  issue.txt
-rwxr-xr-x 1 root root 5981944 May 21 09:46  kernel.img
-rwxr-xr-x 1 root root 6320888 May 21 09:46  kernel7.img
-rwxr-xr-x 1 root root 6694528 May 21 09:46  kernel7l.img
-rwxr-xr-x 1 root root 7758283 May 21 09:46  kernel8.img
drwxr-xr-x 2 root root   19456 May 21 09:46  overlays
-rwxr-xr-x 1 root root 2952928 May 21 09:58  start.elf
-rwxr-xr-x 1 root root 2228768 May 21 09:58  start4.elf
-rwxr-xr-x 1 root root  793084 May 21 09:58  start4cd.elf
-rwxr-xr-x 1 root root 3722504 May 21 09:58  start4db.elf
-rwxr-xr-x 1 root root 2981160 May 21 09:58  start4x.elf
-rwxr-xr-x 1 root root  793084 May 21 09:58  start_cd.elf
-rwxr-xr-x 1 root root 4794472 May 21 09:58  start_db.elf
-rwxr-xr-x 1 root root 3704712 May 21 09:58  start_x.elf

/lib/modules:
total 32
drwxr-xr-x 3 root root 4096 May 24 17:36 5.10.17+
drwxr-xr-x 3 root root 4096 May 24 17:36 5.10.17-v7+
drwxr-xr-x 3 root root 4096 May 24 17:37 5.10.17-v7l+
drwxr-xr-x 3 root root 4096 May 21 09:46 5.10.17-v8+
drwxr-xr-x 3 root root 4096 May 19 23:03 5.10.36+
drwxr-xr-x 3 root root 4096 May 19 23:03 5.10.36-v7+
drwxr-xr-x 3 root root 4096 May 19 23:03 5.10.36-v7l+
drwxr-xr-x 3 root root 4096 May 19 23:03 5.10.36-v8+
root@DietPi:~#
User avatar
MichaIng
Site Admin
Posts: 2987
Joined: Sat Nov 18, 2017 6:21 pm

Re: wifi drivers missing after update

Post by MichaIng »

@Joulinar
RPi kernel comes with rtl8xxxu.ko preinstalled. It sounds like it should support that WiFi adapter as well, but if not yes DKMS would need to build that module, or it needs to be done manually. DKMS runs automatically on kernel upgrade, which is the reason why APT upgrades failed when modules were installed for a kernel arch (v8) where no headers were present for. But now DKMS only builds modules for kernel versions where it finds a dir in /lib/modules/ for. There is the expected 5.10.17 and there is an unexpected 5.10.36, which looks like rpi-update was called. Strange also that 5.10.17-v8+ is still there, even that it was removed before? Also strange that DKMS does not fail on the 5.10.36 kernel modules.

When a reboot loads a kernel that is not installed, it loads from a different drive/partition than the one we have currently mounted. This can either be a 3rd party image, like Berryboot, or e.g. when a USB drive is the root + boot partition while an SD card with boot partition is still plugged, with a manually changed cmdline.txt then or so.

@valdragas
Did you download the image from here? https://dietpi.com/#download
Please paste the output of the following as well:

Code: Select all

lsblk
valdragas
Posts: 35
Joined: Sat Oct 03, 2020 1:14 pm

Re: wifi drivers missing after update

Post by valdragas »

Yes, the image was downloaded from the link you describe.

I have the system running on an SSD disk

This is the output of the command:

Code: Select all

root@DietPi:~# lsblk
NAME        MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda           8:0    0 55.9G  0 disk
├─sda1        8:1    0  256M  0 part /boot
└─sda2        8:2    0 14.2G  0 part /
mmcblk0     179:0    0  922M  0 disk
└─mmcblk0p1 179:1    0  922M  0 part
root@DietPi:~#
I think the problem was caused (can't be sure)when I tried to install the LXDE desktop on this raspberry and it gave an error not finding the package, however I would swear that I try to install something from the kernel (I can't remember)

this is the post I opened

viewtopic.php?f=11&t=9015
User avatar
MichaIng
Site Admin
Posts: 2987
Joined: Sat Nov 18, 2017 6:21 pm

Re: wifi drivers missing after update

Post by MichaIng »

Sorry for the late reply. I see you have an SD card attached as well. What is on this SD card? Can you try to remove it and reboot?
shao
Posts: 11
Joined: Sun May 23, 2021 9:27 am

Re: wifi drivers missing after update

Post by shao »

Hi,
Don't really know if it's related, but i just had the same problem with a rtl8811au USB dongle on a pi2b.

I always had to install it "manualy" cause dietpi never recognize it.

I used to use some script similar to that one ( but not this one :P )
https://gist.github.com/BenjaminWegener ... ll-wifi-sh

After every update i had to do it again.

Since 7.2 and the last kernel, it was broken cause no
driver was available for that specific kernel.

I had to build it from source to make it work again

Source here :
https://github.com/aircrack-ng/rtl8812au.git

Then obvious process make , make install...
User avatar
MichaIng
Site Admin
Posts: 2987
Joined: Sat Nov 18, 2017 6:21 pm

Re: wifi drivers missing after update

Post by MichaIng »

Yes it's basically known that this chip is not supported OOTB with most kernels: https://github.com/MichaIng/DietPi/issues/4387
Also on Sparky SBC it is added afterwards while the main kernel does not support it. Don't ask me why.

I suggest to create a script to recompile the module on every kernel upgrade automatically at e.g. /etc/kernel/postinst.d/rtl8812au.sh.
valdragas
Posts: 35
Joined: Sat Oct 03, 2020 1:14 pm

Re: wifi drivers missing after update

Post by valdragas »

Hi,

Sorry for the delay, the problem was due to the SD. Let me explain.... at first I used the SD as the boot partition and the system partition had it on the SSD. From some update the raspberry boots directly from the SSD without the need for the raspberry, after removing the SD everything has returned to work normally.

Best regards
User avatar
Joulinar
Posts: 4783
Joined: Sat Nov 16, 2019 12:49 am

Re: wifi drivers missing after update

Post by Joulinar »

probably old kernel from SD card was loaded, leading to some conflict :?
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
User avatar
MichaIng
Site Admin
Posts: 2987
Joined: Sat Nov 18, 2017 6:21 pm

Re: wifi drivers missing after update

Post by MichaIng »

When an SD card with a valid RPi bootloader is present, by default it will be loaded, including kernel and device tree, but based on fstab, which is stored on the root partition, the SSD's boot partition will be mounted. So kernel, device tree and bootloader from mounted /boot are the ones which are upgraded etc, but not the ones which are loaded, which alsol breaks loading kernel modules, which are stored on the root partition and hence don't match the loaded kernel anymore.
Post Reply