How to Update Firmware in Your Linux Machine

Firmware

Firmware is a type of software that provides low-level control for device-specific hardware. Firmware is stored on the read-only memory (ROM) of a device and gives instructions to the hardware about how it should be operated. Firmware can’t be modified or deleted by the end-user just like other software. You need specialized software to do so. This tutorial shows how to update firmware in your Linux machine.

Also read: How to Display the Weather Forecast on Linux

Linux Vendor Firmware Service

Linux vendor firmware service is a secure web service that allows the hardware vendors to directly upload firmware updates for the user. This service is used by all major Linux distributions. Metadata and files provided by Linux Vendor Firmware Service are used by gnome-software and fwupdmgr to update firmware in your system.

Any hardware vendor can upload redistributable firmware to a Linux vendor firmware service. First the firmware must be packaged in an industry standard .cab archive, then a Linux specific metadata file needs to be added for the user. Metadata is used to detect and installed required firmware on their systems.

How to Install Missing Firmware in Debian

Missing firmware in Linux distributions are often found in the non-free Debian repositories. Don’t confuse the term “non-free,” as you don’t have to pay for using non-free software in Debian.

To access the software, add the Debian sources in your “/etc/apt/sources.list” file.

sudo nano /etc/apt/sources.list

Add these lines at the bottom of the file:

deb http://deb.debian.org/debian stretch main contrib non-free
deb-src http://deb.debian.org/debian stretch main contrib non-free
 
deb http://security.debian.org/debian-security/ stretch/updates main
deb-src http://security.debian.org/debian-security/ stretch/updates main
 
deb http://deb.debian.org/debian stretch-updates main
deb-src http://deb.debian.org/debian stretch-updates main

To search for the package name needed to install the firmware, search for your device name with the Debian keyword. You will probably find the name of the package you are looking for.

For example, I am searching firmware for my Wi-Fi card and found that I have to install the “firmware-realtak” package. You can easily install the package using the following command:

sudo apt-get install firmware-realtek

Also read: SELinux vs AppArmor: What Are the Differences and Which One Should You Use?

Update Firmware Using fwupd

fwupd may be the most popular option to update firmware in your Linux machine. Before starting, check whether your device manufacturer supports Linux Vendor Firmware Service (LVFS). To check this, go to the LVFS device list website and search for your device, then proceed to the next section if you find it.

Before installing fwupd in your system, update your system.

sudo apt update
sudo apt upgrade

Install the fwupd package in your Linux machine. It is generally preinstalled with your Linux distribution but a good idea to recheck before proceeding.

sudo apt install fwupd

After installing, start fwupd daemon.

sudo systemctl start fwupd

To see if fwupd is running correctly, run

sudo systemctl status fwupd.service
Firmware 2

Refresh the firmware update list using the firmware update manager.

sudo fwupdmgr refresh

If it is not refreshing automatically, use the --force flag.

sudo fwupdmgr refresh --force

The result looks like the following image.

Firmware 1 1

If any update is present, update your device firmware using this command.

sudo fwupdmgr update

Also read: Basic Bash Commands for Linux Newbies

Update Firmware Using Gnome-Software

If you are not very familiar with terminals and want to avoid them, you can use gnome-software to update your device firmware.

Gnome-software is usually preinstalled in the gnome desktop environment. If you are using another desktop environment, you can install gnome-software by running these commands.

sudo apt update
sudo apt install gnome-software

After installing, open your gnome-software and click on the “Updates” tab. If your device has firmware updates, they will be shown here. Plug in your device, as sometimes updates refuse to show up if your device is running low on battery.

If you can see updates in the “Update” tab of gnome-software, click on “Install.” Reboot your computer to install the firmware when the device boots up. Make sure that your device is plugged in at the time of installation. Partially installed firmware can result in a broken system.

Update Firmware Using KDE Discover Software

Like gnome-software, KDE discover is a software store made for KDE desktop environments. It comes preinstalled in many Linux distributions like KDE neon and kubuntu and is usually bundled with KDE plasma. Discover software periodically downloads metadata files from the LVFS and submits into fwupd over D-Bus.

To install a firmware update using KDE discover software, open it and navigate to the updates option. You can locate this option on the lower-left side of the software. If any updates are available for your system, discover software will list all of the updates for you. Install the firmware by clicking on the “Update All” button.

Firmware Kde

CPU Microcode

Microcode is related to processor firmware. The kernel is able to update the processor’s firmware without the need to update it via a BIOS update. A microcode update is kept in volatile memory, thus the BIOS/UEFI or kernel updates the microcode during every boot.

Intel and AMD both release their CPU microcode regularly to fix bugs and improve performance. The release of CPU microcode are very frequent for new processors. With time, all the bugs are fixed for old processors. Microcode updates for old processors are rarely released by vendors.

To check your microcode version, run this command in your terminal.

cat /proc/cpuinfo

Search for microcode parameters. You can see my microcode version below.

Firmware 3

If you have an Intel CPU, run the following code to install intel-microcode to your system:

sudo apt-get update
sudo apt-get install intel-microcode

If you have an AMD processor, install amd-microcode to your system:

sudo apt-get update
sudo apt-get install amd64-microcode

Also read: How to Set Up Bluetooth in Linux

Appstream-glib

The appstream-glib library provides GObjects and helper methods to make it easy to read and write AppStream metadata. This tool can read and write compressed Appstream XML files. Therefore, this library is used to process .cab files.

As all of the firmware updates are universal compressed file system .cab files, the appstream-glib library is very important for updating Linux firmware. To update and install new firmware, don’t use this tool directly. Fwupd and other previously mentioned processes use appstream glib under the hood to parse metadata and firmware files.

Fwupdate Tool

Note: this project is no longer maintained. Unless you are using an ancient Linux server, you should use the fwupd utility instead of fwupdate.

This is a user space library. The fwupdate tool interacts with fwupd and the kernel ESRT interface and can store UEFI updates in the HDD. Users can then update during boot. fwupdate is a cross-OS utility. It is supported by Linux, the Solaris OS, and Windows for x86 servers. The fwupdate tool enables you to query, update, and validate the firmware of storage devices.

The fwupdate tool uses a general-purpose cross-OS storage management library to access specific hardware information. It provides exploration, monitoring, and configuration of on-board and external storage resources connected to the host system.

Using the Asus EZ Feature

This process is very specific for Asus hardware. If you have an Asus laptop, you can update your BIOS (UEFI) and firmware using the Asus EZ feature.

Go to your product page in the Asus website and click on the driver and utility section. Inside the BIOS and firmware section, you will get the downloadable files. Download your required files and extract the file content into an external USB drive.

Firmware 4

Connect to the power and turn off your laptop. Plug in your external USB to which you have extracted your BIOS or firmware updates, then boot your laptop and go to the BIOS mode by pressing F2 key. In the “Advanced” section, you can see the ASUS EZ flash utility option. Click on the option and select your external USB that contains the upgrade.

The laptop will install the update itself. Give as much time as it needs and don’t interupt the process. After the flash is done, reboot your laptop for it to boot with the newest firmware.

You can also check out this YouTube video by Asus for more information.

Also read: How to Use Chroot in Linux and Fix Your Broken System

Frequently Asked Questions

Where is Linux firmware installed?

The default location of your firmware installation in Linux is your “/lib/firmware” folder. You can see the list of firmware installed in your device by running this command: ls /lib/firmware/

Is kernel the same as firmware?

No, kernel and firmware are two different things. You can think of firmware as a software for hardware, as firmware manages the hardware. Kernel acts as an interface between user software and hardware and takes many important things from developers and users for uniformity and reliability. Linux is not a operating system; it is the kernel. When it is supplied with GNU and other software, it is called a GNU/Linux operating system.

Subscribe to our newsletter!

Our latest tutorials delivered straight to your inbox

Hrishikesh Pathak

Developer and writer. Write about linux and web.