Arabic Arabic Chinese (Simplified) Chinese (Simplified) Dutch Dutch English English French French German German Italian Italian Portuguese Portuguese Russian Russian Spanish Spanish
0

How to Update Firmware in Your Linux Machine | #linux | #linuxsecurity | #hacking | #aihp


Firmware is a type of software that provides the low level control for device specific hardware. Firmware is stored on the read only memory (ROM) of a device. It 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 some specialized software to do so. In this article, we are going to learn, how to update firmware in your Linux machine.

Linux Vendor Firmware Service

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

Any hardware vendor can upload redistributable firmware to Linux vendor firmware service. At first the firmware have to be packaged up in an industry standard .cab archive. Then add a Linux specific metadata file for the user. User use this metadata to detect and installed required firmware on their systems.

How to install a missing firmware in Debian?

Missing firmware in Linux distributions are often found in the non-free Debian repositories. Don’t confuse with the term “non-free” here. This is a more technical term to explain, but you don’t have to pay for using non-free software in Debian.

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

sudo nano /etc/apt/sources.list

Now 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

Now to search for the package name you need to install the firmware, search your device name with the Debian keyword. Probably you will 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. Now you can easily install the package using the following command.

sudo apt-get install firmware-realtek

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

Update Firmware Using fwupd

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

Before installing fwupd in your system, first update your system.

sudo apt update
sudo apt upgrade

Then install fwupd package in your Linux machine. It generally comes preinstalled with your Linux distribution. But it is a good idea to recheck it before proceed.

After installing, start fwupd daemon.

sudo systemctl start fwupd

To see if fwupd is running correctly, run

sudo systemctl status fwupd.service

Now refresh the firmware update list using firmware update manager.

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

sudo fwupdmgr refresh --force

The result looks like this.

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

Basic Bash Commands for Linux Newbies

Update Firmware Using Gnome-Software

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

Gnome-software is usually comes preinstalled in 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 have any firmware updates, it will be shown here. Plug-in your device, sometimes some updates refused to show up if your device is running on battery.

If you can see any updates in the Update tab of gnome-software, click on Install. Then reboot your computer and firmware will be installed when the device boots up. Make sure that your device is plugged in at the time of installation. Partially installed firmware can results into 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, kubuntu and usually bundled with KDE plasma. Discover software periodically download metadata files from the LVFS and submitted into fwupd over D-Bus.

To install firmware update using KDE discover software, open it and navigate to the updates option. You can locate this option at the left bottom side of the software. If any updates available for your system, discover software list all the updates for you. Now you can install the firmware simply clicking on the “Update All” button.

CPU Microcode

Microcode are 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 times, all the bugs are fixed and for old processor. Microcode updates for old processor rarely released by vendors.

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

Now search for microcode parameters. You can see my microcode version here.

If you have an Intel CPU, to install intel-microcode in your system, run

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

If you have and AMD processor, you should install amd-microcode in your system.

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

How to Set Up Bluetooth in Linux

Appstream-glib

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 the firmware updates comes as universal compressed file system .cab files. This appstream-glib library is very important to update Linux firmware. To update and install new firmware, user don’t use this tool directly. Fwupd and other previously mentioned process use appstream glib under the hood to parse metadata and firmware files.

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

This is a user space library. Fwupdate tool interact with fwupd and kernel ESRT interface. This tool can store UEFI updates in the HDD. User can then update the updates during boot. fwupdate is a cross-OS utility. It is supported on Linux, the Solaris OS, and Windows for x86 servers. 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 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 Asus EZ feature.

Go to your product page in Asus website and click on the driver and utility section. Then 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.

Now connect to the power and turn off your laptop. Plugin 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 Advances section, you can see the ASUS EZ flash utility option. Click on the option and select your external USB which contains the upgrade.

Then 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 and it will boot with the newest firmware.

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

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 is same as firmware?

No, kernel and firmware are two different thing. You can think of firmware as a software for hardware. Like firmware manage the hardware. Kernel is act as an interface between user software and hardware. Actually kernel abstract out many important things from developers and users for uniformity and reliability. As many of you think, Linux is not a operating system. It is the kernel. When it is supplied with GNU and other software, it is called GNU/Linux operating system.

Is this article useful?

Subscribe to our newsletter!

Our latest tutorials delivered straight to your inbox

Click Here For The Original Source.


————————————————————————————-

National Cyber Security

FREE
VIEW