云网牛站
所在位置:首页 > Linux教程 > 使用fwupd为Ubuntu 18.04系统更新固件的方法

使用fwupd为Ubuntu 18.04系统更新固件的方法

2018-09-11 11:03:54作者:geekpi稿源:linux中国站

本文将教你在 Ubuntu 18.04 系统中更新固件,在 Ubuntu 及其他 Linux 版本中会在默认的软件中心处理系统固件的更新,但是碰到错误的情况就使用 fwupd 命令行工具更新系统的固件。

 

背景

我使用的计算机是 Dell XPS 13,全新安装的 Ubuntu 18.04 版本,该版本和计算机的硬件兼容性非常的好,蓝牙、外置 USB 耳机和扬声器、多显示器,一切都开箱即用。但是 Ubuntu 18.04 系统的软件中心经常会出现固件更新,如下图:

使用fwupd为Ubuntu 18.04系统更新固件的方法

单击更新的按钮会在几秒钟后出现错误:

使用fwupd为Ubuntu 18.04系统更新固件的方法

错误大意是:

Unable to update “Thunderbolt NVM for Xps Notebook 9360”: could not detect device after update: timed out while waiting for device

以下就为你介绍正确的 Ubuntu 18.04 更新固件方式,解决此问题。

 

在Ubuntu 18.04系统中更新固件的方法

使用fwupd为Ubuntu 18.04系统更新固件的方法

有一件事你应该知道 GNOME Software(即 Ubuntu 18.04 中的软件中心)也能够更新固件。但是在由于某种原因失败的情况下,你可以使用命令行工具 fwupd。

fwupd 是一个开源守护进程,可以处理基于 Linux 的系统中的固件升级。它由 GNOME 开发人员 Richard Hughes 创建。戴尔的开发人员也为这一开源工具的开发做出了贡献。

基本上,它使用 LVFS,Linux 供应商固件服务。硬件供应商将可再发行固件上传到 LVFS 站点,并且多亏 fwupd,你可以从操作系统内部升级这些固件。fwupd 得到了 Ubuntu 和 Fedora 等主要 Linux 发行版的支持。

1.首先打开终端并更新系统:

sudo apt update && sudo apt upgrade -y

2.之后,你可以逐个使用以下命令来启动守护程序,刷新可用固件更新列表并安装固件更新。

sudo service fwupd start

3.守护进程运行后,检查是否有可用的固件更新。

sudo fwupdmgr refresh

4.输出应如下所示:

Fetching metadata https://cdn.fwupd.org/downloads/firmware.xml.gz

Downloading…                         [****************************]

Fetching signature https://cdn.fwupd.org/downloads/firmware.xml.gz.asc

5.在此之后,运行固件更新:

sudo fwupdmgr update

6.固件更新的输出可能与此类似:

No upgrades for XPS 13 9360 TPM 2.0, current is 1.3.1.0: 1.3.1.0=same

No upgrades for XPS 13 9360 System Firmware, current is 0.2.8.1: 0.2.8.1=same, 0.2.7.1=older, 0.2.6.2=older, 0.2.5.1=older, 0.2.4.2=older, 0.2.3.1=older, 0.2.2.1=older, 0.2.1.0=older, 0.1.3.7=older, 0.1.3.5=older, 0.1.3.2=older, 0.1.2.3=older

Downloading 21.00 for XPS13 9360 Thunderbolt Controller…

Updating 21.00 on XPS13 9360 Thunderbolt Controller…

Decompressing…    [***********]

Authenticating…      [***********] 

Restarting device… [***********]

注:以上步骤处理了在 Ubuntu 18.04 系统中的固件更新。

 

附:关于fwupd的信息(英文)

1.fwupd GitHub地址

2.Basic usage flow (command line)

If you have a device with firmware supported by fwupd, this is how you will check for updates and apply them using fwupd's command line tools.

# fwupdmgr get-devices

This will display all devices detected by fwupd.

# fwupdmgr refresh

This will download the latest metadata from LVFS.

# fwupdmgr get-updates

If updates are available for any devices on the system, they'll be displayed.

# fwupdmgr update

This will download and apply all updates for your system.

Updates that can be applied live will be done immediately.

Updates that run at bootup will be staged for the next reboot.

3.Reporting status

fwupd will encourage users to report both successful and failed updates back to LVFS. This is an optional feature, but encouraged as it provides valuable feedback to LVFS administrators and OEM developers regarding firmware update process efficacy.

To report the status of an update run:

# fwupdmgr report-history

To clear the local history of updates:

# fwupdmgr clear-history

Only updates that were distributed from the LVFS will be reported to the LVFS.

 

相关主题

Linux用户的UEFI固件指南

精选文章
热门文章