All Collections
Troubleshooting and FAQs
Updating the Raspberry Pi 4 Kernel
Updating the Raspberry Pi 4 Kernel

Follow these steps to fix your kernel after updating your virtual Raspberry Pi 4 board.

avhsupport avatar
Written by avhsupport
Updated over a week ago

Table of Contents


Updating the Raspberry Pi 4 Kernel

You can update the kernel using either the command line or the Desktop firmware's "Welcome to Raspberry Pi" GUI.

Update Using the Console Command Line

  1. Open the Console tab and press return to show the login prompt.

  2. Log in with the username pi and password raspberry.

  3. Update the device using:

    sudo apt-get update && sudo apt-get upgrade -y

  4. When the installation is complete, click the Restart button towards the top-right.

  5. Continue to the next section to check for issues with your kernel.

Update Using the "Welcome to Raspberry Pi" GUI on the Desktop Firmware

  1. Create a Raspberry Pi 4 device using the stock firmware Raspberry Pi OS Desktop (11.2.0).

  2. Close the "Warning" window about the default SSH password.

  3. Click through the "Welcome to Raspberry Pi" window.

  4. The last screen will ask if you want to update. Click Next.

  5. Restart the device when the update completes.

  6. Continue to the next section to check for issues with your kernel.

Identifying Issues with the Device Kernel

List the Loaded Kernel Modules

  1. Run lsmod in the console to list the modules that are loaded into the kernel.

  2. Review the results.
    โ€‹

    • If the list is empty (or nearly empty,) you likely have kernel issues that need to be manually resolved. Continue to the next section to correct your issue.

    • If the list comes back with multiple results, such as xt_conntrack, nft_chain_nat, xt_MASQUERADE, nf_nat, nf_conntrack_netlink, nf_defrag_ipv6, nf_defrag_ipv4, nf_conntrack nft_counter, xt_addrtype, nft_compat, nf_tables, and nfnetlink, the kernel is likely behaving normally.

Try to Install and Run Docker

Running docker requires a properly configured kernel. If docker installs but the service fails to run, you may be having an issue with your updated kernel.

  1. Install docker and look for a Job for docker.service failed message.

    sudo apt-get update && sudo apt-get install -y docker.io

  2. Check if the service for docker is running.

     sudo systemctl status docker

Fixing the Updated Kernel File

  1. Connect to your device's VPN using the "Connect" tab.

  2. Find your device's LAN IP on the bottom-right of the "Connect" tab. In our example, we will use 10.11.0.2.

  3. On your virtual device, locate the path to your kernel file. In our example, we will use /boot/kernel8.img.

    ls /boot/ker*

  4. From your computer's terminal, download the VM's kernel using scp and the LAN IP and kernel path we just found.

    scp  pi@10.11.0.2:/boot/kernel8.img ./

  5. Extract the img file.

    gunzip -cd kernel8.img > kernel

  6. Upload the kernel file in the Kernel section of the Settings tab.

  7. Wait for the upload to complete then click SAVE & REBOOT.

  8. Confirm the kernel is working properly using lsmod or sudo systemctl status docker.

  9. Clean up your local system.

    rm kernel8.img kernel

  10. You're all set!

Did this answer your question?