# Install wifi driver on kernel-update

**URL:** <https://dietpi.com/forum/t/install-wifi-driver-on-kernel-update/5140>\
**Category:** General Discussion\
**Created:** [20 March 2021 00:41 UTC](https://dietpi.com/forum/t/install-wifi-driver-on-kernel-update/5140 "2021-03-20T00:41:47Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![FreshMike](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/f/c4cdca/32.png) [@FreshMike](https://dietpi.com/forum/u/FreshMike)\
**Post date:** [20 March 2021 00:41 UTC](https://dietpi.com/forum/t/install-wifi-driver-on-kernel-update/5140/1 "2021-03-20T00:41:47Z")

</div>

Hi,

I have a wifi dongle with the rtl8188fu driver which is not installed by default.  
To get the driver I’m using this script to install the driver:  
[http://downloads.fars-robotics.net/wifi-drivers/install-wifi](http://downloads.fars-robotics.net/wifi-drivers/install-wifi)

Of course after an update of the pi kernel the driver is not working.

The script has an option to check for the latest available kernel version when running rpi-update. So this script could be added to /etc/kernel/postinst.d to install the driver,

Now it doesn’t look diepi-update will give the same kernel version as the check does from here:  
[https://github.com/Hexxeh/rpi-firmware](https://github.com/Hexxeh/rpi-firmware)

Example:  
latest verion of dietpi v7.0.2  
Current kernel 5.10.17-v7+ #1403 SMP Mon Feb 22 11:29:51 GMT 2021 armv7l GNU/Linux  
no newer kernel is available via apt update.

Running the wifi-install script with -u options give me this  
Running command ‘sudo rpi-update’ will load:

kernel revision = 5.10.23-v7+  
kernel build = #1406

Doesn’t seem to lineup with dietpi.  
Any suggestions or ideas maybe, much appreciated ?  
  
  
\

```auto
echo -n "Please wait ... checking the kernel revision and build you will have after running command 'sudo rpi-update"
if [[$kernelcommit != "rpi-update"]] ; then
echo " $kernelcommit'."
else
echo "'."
fi

# download uname string if it exists
if ! (wget -q https://github.com/Hexxeh/rpi-firmware/raw/$rpi_firmware_commit_id/$uname -O .uname_string) ; then

# download the relevant kernel image if uname_string doesn't exist
if ! (wget -q https://github.com/Hexxeh/rpi-firmware/raw/$rpi_firmware_commit_id/$image -O .kernel) ; then
echo "Invalid commit-id, kernel not available for your version of the Pi, Pi $pi."
exit 1
fi

# extract uname_string from kernel image

strings -n 10 .kernel | grep "Linux version" > .uname_string

```

---

<div class="post-metadata">

**Author:** ![Joulinar](https://dietpi.com/forum/user_avatar/dietpi.com/joulinar/32/57_2.png) [@Joulinar](https://dietpi.com/forum/u/Joulinar)\
**Post date:** [20 March 2021 09:26 UTC](https://dietpi.com/forum/t/install-wifi-driver-on-kernel-update/5140/2 "2021-03-20T09:26:19Z")

</div>

Hi,

DietPi is not providing own kernel. They are used from the underlying base image. In your case it seems your are running a Raspberry Pi. Means you have a Raspberry Pi OS. Their the normal RPi OS kernel is used

Actual stable version of RPi OS kernel is 5.10.17

5.10.23 is a development kernel version and available via rpi-upate only. It is not recommended to run development kernel if it doesn’t fix a specific issue.

---

<div class="post-metadata">

**Author:** ![FreshMike](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/f/c4cdca/32.png) [@FreshMike](https://dietpi.com/forum/u/FreshMike)\
**Post date:** [20 March 2021 09:55 UTC](https://dietpi.com/forum/t/install-wifi-driver-on-kernel-update/5140/3 "2021-03-20T09:55:51Z")

</div>

“It is not recommended to run development kernel if it doesn’t fix a specific issue.”

Definitely agree with that. Any other better way of doing this ?  
I’m running my Pi as a Edge Device with mainly running applications on docker, I would like to auto-update the pi on a monthly cron-schedule, but because a new kernel will break the wifi-driver I can’t do this atm.

---

<div class="post-metadata">

**Author:** ![Joulinar](https://dietpi.com/forum/user_avatar/dietpi.com/joulinar/32/57_2.png) [@Joulinar](https://dietpi.com/forum/u/Joulinar)\
**Post date:** [20 March 2021 12:20 UTC](https://dietpi.com/forum/t/install-wifi-driver-on-kernel-update/5140/4 "2021-03-20T12:20:52Z")

</div>

I had a look to the driver update script and it seems it can be called with an option blank.

```nohighlight
[option]:- blank - update/install driver for currently running kernel"

```

Not sure what it mean exactly but it seems it will not invoke bleeding edge RPi kernel and you could stay with current stable kernel. ? Maybe you would need to play with the options or check with the developer of this scripts how to avoid using rpi-update

---

<div class="post-metadata">

**Author:** ![FreshMike](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/f/c4cdca/32.png) [@FreshMike](https://dietpi.com/forum/u/FreshMike)\
**Post date:** [20 March 2021 13:17 UTC](https://dietpi.com/forum/t/install-wifi-driver-on-kernel-update/5140/5 "2021-03-20T13:17:54Z")

</div>

Yes, the script will update/install wifi driver for the current loaded version of the kernel, not the one just installed on a kernel update.  
I have used it to install the wifi driver when connect via LAN to the internet.

If there is a kernel update, and you install a new kernel, uname -a still shows you the old active kernel, not the one just installed. It will get active after the reboot. If that happens I don’t have access to the internet anymore, so the driver update needs to happen together with the kernel update, and after a reboot they will both be active.

---

<div class="post-metadata">

**Author:** ![MichaIng](https://dietpi.com/forum/user_avatar/dietpi.com/michaing/32/7_2.png) [@MichaIng](https://dietpi.com/forum/u/MichaIng)\
**Post date:** [20 March 2021 15:20 UTC](https://dietpi.com/forum/t/install-wifi-driver-on-kernel-update/5140/6 "2021-03-20T15:20:48Z")

</div>

Scripts in /etc/kernel/postinst.d will get the newly installed kernel version as first argument, so the script could be adjusted to make use of this.

---

<div class="post-metadata">

**Author:** ![FreshMike](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/f/c4cdca/32.png) [@FreshMike](https://dietpi.com/forum/u/FreshMike)\
**Post date:** [20 March 2021 18:33 UTC](https://dietpi.com/forum/t/install-wifi-driver-on-kernel-update/5140/7 "2021-03-20T18:33:44Z")

</div>

aaah! Thanks will give it a try.
