Généralités système Linux

fwupd : Mettre à jour les firmwares et UEFI depuis Linux

Table des matières

Introduction



Dans cet article, nous allons voir comment mettre à jour les firmwares (micro-logiciels) de notre PC depuis Linux.

Lorsqu'on parle de micro-logiciels, on pense évidemment à celui de l'UEFI mais il y en a pour tous les périphériques de la machine (comme les SSD, les contrôleurs disques) qui ont besoin de "mini pilotes" pour fonctionner mais qui sont indépendants du système d'exploitation (puisqu'ils sont utilisés avant que celui-ci démarre).

C'est tout aussi important de les mettre à jour que son système d'exploitation, car cela peut corriger des bugs ou des failles de sécurité.

Les principaux constructeurs rendent disponibles leurs micrologiciels à travers le service Linux Vendor Firmware Service (LVFS) https://fwupd.org/ : Dell, HP, Intel, Thinkpad, Logitech, ...

On pourra piloter la recherche, le téléchargement et l'installation de ces micrologiciels sous Linux grâce à l'utilitaire fwupd (comme FirmWare UPDater)

Prérequis



Pour que l'outil fonctionne correctement il est nécessaire de posséder une machine avec un système UEFI. (BIOS non supporté).
C'est sur la partition EFI (en FAT32) que seront téléchargés les micrologiciels avant d'être installés au reboot. Et c'est l'UEFI qui se chargera de lancer la mise à jour de ceux-ci.

Installation



Sous Gentoo, on prendra soin d'activer quelques USE, dans mon cas celui de DELL est très important :
Code BASH :
echo "sys-apps/fwupd dell uefi synaptics tpm nvme thunderbolt" >> /etc/portage/package.use/custom


Puis on installe fwupd :
Code BASH :
emerge -av sys-apps/fwupd


Pour le monde RedHat :
Code BASH :
dnf install fwupd


Pour le monde Debian :
Code BASH :
apt install fwupd



Utiliser fwupd en ligne de commande



Une fois le logiciel installé, on pourra vérifier les périphériques qui supportent les mises à jour sur notre machine avec :

Code BASH :
fwupdmgr get-devices


Voici un retour sur un Dell Latitude 3510 :

Code TEXT :
Latitude 3510
|
|-BC511 NVMe SK hynix 256GB:
|     Device ID:          03281da317dccd2b18de2bd1cc70a782df40ed7e
|     Summary:            NVM Express Solid State Drive
|     Current version:    11002101
|     Vendor:             SK hynix (NVME:0x1C5C)
|     Serial Number:      NS08T001210808R0V
|     GUIDs:              b8db34a1-4794-5f13-894e-b2e29353380f ← STORAGE-DELL-108363
|                         8811e962-e1d5-e811-9f8b-f2801f1b9fd1
|     Device Flags:       • Internal device
|                         • Updatable
|                         • Requires AC power
|                         • Needs a reboot after installation
|                         • Device is usable for the duration of the update
|
|-System Firmware:
|     Device ID:          c0835b948fda726b85f43575dd3d39012bbfe99e
|     Current version:    1.2.0
|     Minimum Version:    1.2.0
|     Vendor:             Dell Inc. (DMI:Dell Inc.)
|     GUID:               cec92681-7c50-4276-90b6-219f70c8410c
|     Device Flags:       • Internal device
|                         • Updatable
|                         • Requires AC power
|                         • Supported on remote server
|                         • Needs a reboot after installation
|                         • Cryptographic hash verification is available
|                         • Device is usable for the duration of the update
|
|-TPM 2.0:
|     Device ID:          c6a80ac3a22083423992a3cb15018989f37834d6
|     Summary:            Platform TPM device
|     Current version:    7.2.1.0
|     Vendor:             Dell Inc. (PCI:0x1028)
|     GUIDs:              76da9d47-c402-51a4-b01c-7123339a91f4 ← 09ed-2.0
|                         ff71992e-52f7-5eea-94ef-883e56e034c6 ← system-tpm
|     Device Flags:       • Internal device
|                         • Updatable
|                         • Requires AC power
|                         • Needs a reboot after installation
|
|-UEFI Device Firmware:
|     Device ID:          df945476b677e792dab827b25b9807ed655fc132
|     Current version:    190
|     Minimum Version:    190
|     Vendor:             DMI:Dell Inc.
|     GUID:               ffd6eef5-4372-4adc-8eeb-3dc0b7338375
|     Device Flags:       • Internal device
|                         • Updatable
|                         • Requires AC power
|                         • Needs a reboot after installation
|                         • Device is usable for the duration of the update
|
|-UEFI Device Firmware:
|     Device ID:          341ba8ecc98c656bf43ce14c21bca347967a1f00
|     Current version:    285221121
|     Minimum Version:    285221121
|     Vendor:             DMI:Dell Inc.
|     GUID:               8811e962-e1d5-e811-9f8b-f2801f1b9fd1
|     Device Flags:       • Internal device
|                         • Updatable
|                         • Requires AC power
|                         • Needs a reboot after installation
|                         • Device is usable for the duration of the update
|
|-UEFI dbx:
      Device ID:          362301da643102b9f38477387e2193e57abaa590
      Summary:            UEFI Revocation Database
      Current version:    77
      Minimum Version:    77
      Vendor:             UEFI:Linux Foundation
      Install Duration:   1 second
      GUIDs:              00fe3755-a4d8-5ef7-ba5f-47979fbb3423 ← UEFI\CRT_E28D59CA489BD2AD580F2EA5D62D6A29BB9C02AE5A818434A37DA7FC11DFF9E9
                          4a6cd2cb-8741-5257-9d1f-89a275dacca7 ← UEFI\CRT_E28D59CA489BD2AD580F2EA5D62D6A29BB9C02AE5A818434A37DA7FC11DFF9E9&ARCH_X64
                          c6682ade-b5ec-57c4-b687-676351208742 ← UEFI\CRT_A1117F516A32CEFCBA3F2D1ACE10A87972FD6BBE8FE0D0B996E09E65D802A503
                          f8ba2887-9411-5c36-9cee-88995bb39731 ← UEFI\CRT_A1117F516A32CEFCBA3F2D1ACE10A87972FD6BBE8FE0D0B996E09E65D802A503&ARCH_X64
      Device Flags:       • Internal device
                          • Updatable
                          • Needs a reboot after installation



On rafraîchira la base de données avant la recherche de mise à jour avec :

Code BASH :
fwupdmgr refresh


Code TEXT :
Updating lvfs
Downloading…             [***************************************]
Downloading…             [***************************************]
Successfully downloaded new metadata: 1 local device supported



Pour vérifier les mises à jour des composants supportés :

Code BASH :
fwupdmgr get-updates


Voici un retour sur le Dell Latitude 3510 qui a besoin de mises à jour :

Code TEXT :
|
|-System Firmware:
  |   Device ID:          c0835b948fda726b85f43575dd3d39012bbfe99e
  |   Current version:    1.2.0
  |   Minimum Version:    1.2.0
  |   Vendor:             Dell Inc. (DMI:Dell Inc.)
  |   GUID:               cec92681-7c50-4276-90b6-219f70c8410c
  |   Device Flags:       • Internal device
  |                       • Updatable
  |                       • Requires AC power
  |                       • Supported on remote server
  |                       • Needs a reboot after installation
  |                       • Cryptographic hash verification is available
  |                       • Device is usable for the duration of the update
  | 
  ├-Latitude 3410, Latitude 3510 System Update:
  |     New version:      1.4.1
  |     Remote ID:        lvfs
  |     Summary:          Firmware for the Dell Latitude 3410, Latitude 3510
  |     License:          Proprietary
  |     Size:             14,4 Mo
  |     Created:          2020-08-26
  |     Urgency:          Critical
  |     Vendor:           Dell Inc.
  |     Flags:            is-upgrade
  |     Description:      
  |     This stable release fixes the following issues:
  |     
  |     • Fixed the issue where Data wipe option disappear upon the first reboot after changing SATA mode option
  |     • Fixed the issue LED will blinks 1 amber 4 white after resuming from sleep mode that on NeoKylin Operation System.
  |     • Fixed the issue where LED blinks incorrectly when do BIOS auto recovery with invalid recovery file
  |   
  |-Latitude 3410, Latitude 3510 System Update:
        New version:      1.3.0
        Remote ID:        lvfs
        Summary:          Firmware for the Dell Latitude 3410, Latitude 3510
        License:          Proprietary
        Size:             14,4 Mo
        Created:          2020-07-17
        Urgency:          Critical
        Vendor:           Dell Inc.
        Flags:            is-upgrade
        Description:      
        This stable release fixes the following issues:
 
        • Fixed the issue where the keyboard brightness hotkey cannot adjust the brightness after resuming from sleep mode in Linux operating system.
        • Fixed the issue where the cursor stops responding on the setup menu while booting for the first time.
        • Fixed the issue where the system stops responding at the Dell logo screen. This issue occurs when you press F2 or F12 to enter the BIOS setup menu.


Pour lancer la mise à jour, on exécutera :

Code BASH :
fwupdmgr update


Voici ce qui est retourné sur le Dell (on est invité à rebooter évidemment) :

Code TEXT :
• BC511 NVMe SK hynix 256GB has no available firmware updates
Upgrade available for System Firmware from 1.2.0 to 1.4.1
Latitude 3510 must remain plugged into a power source for the duration of the update to avoid damage. Continue with update? [Y|n]: Y
Downloading…             [***************************************] Less than one minute remaining…
Decompressing…           [***************************************]
Authenticating…          [***************************************]
Updating System Firmware…[***************************************]
Scheduling…              [***************************************]
Successfully installed firmware
• TPM 2.0 has no available firmware updates
• UEFI Device Firmware has no available firmware updates
• UEFI Device Firmware has no available firmware updates
• UEFI dbx has no available firmware updates
An update requires a reboot to complete. Restart now? [y|N]:


Au reboot, la mise à jour s'opère :

fwupd-dell-bios




Utiliser fwupd graphiquement



L'outil fwupd est intégré directement à GNOME Logiciels.

Celui-ci détecte automatiquement notre matériel et nous propose d'installer après le téléchargement les micrologiciels qui disposent d'une mise à jour :

gnome-software-fwupd



Simple, rapide et efficace !
Cette page a été vue 54197 fois