AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / ubuntu / 问题 / 1394105
Accepted
Dan
Dan
Asked: 2022-02-22 01:03:18 +0800 CST2022-02-22 01:03:18 +0800 CST 2022-02-22 01:03:18 +0800 CST

如何从命令行升级我的设备固件?

  • 772

我很少使用 Ubuntu Software 应用程序,但是当我今天打开它时,我看到它有一个通知说我的指纹扫描仪固件可以更新。

软件中心更新

但是,apt upgradeandsnap refresh命令输出一切都是最新的。我是否缺少系统上的第三个软件包来源?

danny@danny:~$ sudo apt update && sudo apt upgrade 
Hit:1 http://se.archive.ubuntu.com/ubuntu impish InRelease
Hit:2 http://se.archive.ubuntu.com/ubuntu impish-updates InRelease                                                                                                                                         
Hit:3 http://se.archive.ubuntu.com/ubuntu impish-backports InRelease                                                                                                                                       
Hit:4 https://dl.google.com/linux/chrome/deb stable InRelease                                                                                                                                              
Hit:5 https://download.docker.com/linux/ubuntu impish InRelease                                                                                                                                  
Hit:6 http://archive.canonical.com/ubuntu impish InRelease                                                                
Get:7 http://security.ubuntu.com/ubuntu impish-security InRelease [110 kB]                          
Hit:8 https://packages.microsoft.com/repos/ms-teams stable InRelease                     
Fetched 110 kB in 1s (127 kB/s)                          
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
All packages are up to date.
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
package-management
  • 1 1 个回答
  • 1615 Views

1 个回答

  • Voted
  1. Best Answer
    Dan
    2022-02-22T08:49:34+08:002022-02-22T08:49:34+08:00

    感谢@Ponjar和@oldfred 的评论,事实证明还有另一个管理设备固件更新的管理器,称为fwupd.

    精简版

    要更新设备固件,您可以运行以下命令:

    $ fwupdmgr update
    

    更长的版本

    注意:这里提到的所有命令都不需要 root 访问权限(即 sudo)在我的试用期间运行。甚至是更新固件的命令。

    这使用LVFS(Linux 供应商固件服务)作为设备固件的源数据库。您可以通过在 中配置它们来添加更多源/etc/fwupd/remotes.d/。

    要升级固件,可以使用fwupdmgr命令。该软件包似乎已预装在 Ubuntu 21.10 上。如果它不适合您,您可以使用以下命令安装它

    sudo apt install fwupd
    

    fwupdmgr您可以通过运行fwupdmgr get-devices命令获取支持固件更新的设备列表。

    $ fwupdmgr get-devices
    WARNING: UEFI capsule updates not available or enabled in firmware setup
      See https://github.com/fwupd/fwupd/wiki/PluginFlag:capsules-unsupported for more information.
    21A0000CMX
    │
    ├─Prometheus:
    │     Device ID:          96a0be68fa5cf5d60d3d2d392797c6844ab64d33
    │     Summary:            Fingerprint reader
    │     Current version:    10.01.3273255
    │     Vendor:             Synaptics (USB:0x06CB)
    │     Install Duration:   2 seconds
    │     GUIDs:              09e8bf16-3e69-50f5-bb66-c7a040248352
    │                         8088f861-6318-5b1e-9ce4-fbddbedb09ac
    │     Device Flags:       • Updatable
    │                         • Supported on remote server
    │                         • Cryptographic hash verification is available
    │   
    ├─UEFI dbx:
    │     Device ID:          362301da643102b9f38477387e2193e57abaa590
    │     Summary:            UEFI Revocation Database
    │     Current version:    267
    │     Minimum Version:    267
    │     Vendor:             UEFI:Linux Foundation
    │     Install Duration:   1 second
    │     GUIDs:              1e9c3d61-4bd9-514e-ad87-0a9b61b9e77d
    │                         304a9ede-aff2-58f6-b5e5-0e651b065f1a
    │                         c6682ade-b5ec-57c4-b687-676351208742
    │                         f8ba2887-9411-5c36-9cee-88995bb39731
    │     Device Flags:       • Internal device
    │                         • Updatable
    │                         • Needs a reboot after installation
    │   
    └─UMIS RPETJ512MGE2QDQ:
          Device ID:          71b677ca0f1bc2c5b804fa1d59e52064ce589293
          Summary:            NVM Express Solid State Drive
          Current version:    1.3Q0630
          Vendor:             Union Memory (Shenzhen) (NVME:0x1CC4)
          GUIDs:              c3fe86aa-308e-53bc-aa93-00faaac3ef75
                              437d6904-49e7-551e-bbe9-1ae691ea1a37
                              6df6872d-19f7-5035-b85c-7c760034c77d
                              1d6b808f-3aac-5c20-8496-8a1433de5b80
                              1cabba58-9014-5a19-b40f-a6aa4b45676f
          Device Flags:       • Internal device
                              • Updatable
                              • System requires external power source
                              • Needs a reboot after installation
                              • Device is usable for the duration of the update
    

    如果设备有可用的固件更新,您还可以通过运行来获取设备的状态fwupdmgr get-updates。

    $ fwupdmgr get-updates
    WARNING: UEFI capsule updates not available or enabled in firmware setup
      See https://github.com/fwupd/fwupd/wiki/PluginFlag:capsules-unsupported for more information.
    Devices with no available firmware updates: 
     • UEFI dbx
     • UMIS RPETJ512MGE2QDQ
    21A0000CMX
    │
    └─Prometheus:
      │   Device ID:          96a0be68fa5cf5d60d3d2d392797c6844ab64d33
      │   Summary:            Fingerprint reader
      │   Current version:    10.01.3273255
      │   Vendor:             Synaptics (USB:0x06CB)
      │   Install Duration:   2 seconds
      │   GUIDs:              09e8bf16-3e69-50f5-bb66-c7a040248352
      │                       8088f861-6318-5b1e-9ce4-fbddbedb09ac
      │   Device Flags:       • Updatable
      │                       • Supported on remote server
      │                       • Cryptographic hash verification is available
      │ 
      └─Prometheus Fingerprint Reader:
            New version:      10.01.3478575
            Remote ID:        lvfs
            Summary:          Firmware for the Synaptics Prometheus Fingerprint Reader device
            License:          Proprietary
            Size:             425.5 kB
            Created:          2021-06-09
            Urgency:          Medium
            Vendor:           Synaptics
            Duration:         2 seconds
            Flags:            is-upgrade
            Description:      
            New features and enhancements:
            
            • Fix an authentication issue on FOP project.
    

    就我而言,最后一个命令将“UEFI dbx”和“UMIS RPETJ512MGE2QDQ”列为最新的,并且“Prometheus”指纹扫描仪有可用的更新。

    满意后,您可以运行该fwupdmgr update命令来安装所有可用更新或手动将要更新的设备的设备 ID 传递给该命令fwupdmgr update 71b677ca0f1bc2c5b804fa1d59e52064ce589293。

    $ fwupdmgr update
    WARNING: UEFI capsule updates not available or enabled in firmware setup
      See https://github.com/fwupd/fwupd/wiki/PluginFlag:capsules-unsupported for more information.
    Devices with no available firmware updates: 
     • UEFI dbx
     • UMIS RPETJ512MGE2QDQ
    Upgrade available for Prometheus from 10.01.3273255 to 10.01.3478575
    Prometheus and all connected devices may not be usable while updating. Continue with update? [Y|n]: 
    Downloading…             [***************************************] Less than one minute remaining…
    Decompressing…           [***************************************]
    Authenticating…          [***************************************]
    Authenticating…          [***************************************]
    Updating Prometheus…     [***************************************]
    Restarting device…       [***************************************]
    Successfully installed firmware
    

    或者,完成固件更新后,您可以运行fwupdmgr get-updates,它会提示您是否要上传固件报告。

    $ fwupdmgr get-updates
    WARNING: UEFI capsule updates not available or enabled in firmware setup
      See https://github.com/fwupd/fwupd/wiki/PluginFlag:capsules-unsupported for more information.
    Devices with no available firmware updates: 
     • UEFI dbx
     • UMIS RPETJ512MGE2QDQ
    Devices with the latest available firmware version:
     • Prometheus
    ________________________________________________
    
    Devices that have been updated successfully:
    
     • Prometheus (10.01.3273255 → 10.01.3478575)
    
    Uploading firmware reports helps hardware vendors to quickly identify failing and successful updates on real devices.
    Upload report now? (Requires internet connection):
    0.  Do not upload reports at this time, but prompt again for future updates
    1.  Do not upload reports, and never ask to upload reports for future updates
    2.  Upload reports just this one time, but prompt again for future updates
    3.  Upload reports this time and automatically upload reports after completing future updates
    2
    Target:                  https://fwupd.org/lvfs/firmware/report
    Payload:                 {
                               "ReportVersion" : 2,
                               "MachineId" : "fd438561a796bdbcccfc66169378030058c8a453066843b91fa6b107cd73c267",
                               "Metadata" : {
                                 "DistroId" : "ubuntu",
                                 "DistroVersion" : "21.10"
                               },
                               "Reports" : [
                                 {
                                   "Checksum" : "9e3cc95de4a157318c40135009249bb20fe6af7d",
                                   "UpdateState" : 2,
                                   "Guid" : [
                                     "09e8bf16-3e69-50f5-bb66-c7a040248352"
                                   ],
                                   "Plugin" : "synaptics_prometheus",
                                   "VersionOld" : "10.01.3273255",
                                   "VersionNew" : "10.01.3478575",
                                   "Flags" : 37748770,
                                   "Created" : 1645459678,
                                   "Modified" : 1645460476,
                                   "Metadata" : {
                                     "HostSku" : "LENOVO_MT_21A0_BU_Think_FM_ThinkPad P14s Gen 2a",
                                     "RuntimeVersion(org.freedesktop.gusb)" : "0.3.5",
                                     "CompileVersion(com.redhat.fwupdate)" : "12",
                                     "DistroVersion" : "21.10",
                                     "CompileVersion(org.freedesktop.fwupd)" : "1.5.11",
                                     "HostFamily" : "ThinkPad P14s Gen 2a",
                                     "KernelName" : "Linux",
                                     "RuntimeVersion(org.kernel)" : "5.13.0-28-generic",
                                     "CompileVersion(org.freedesktop.gusb)" : "0.3.5",
                                     "RuntimeVersion(com.dell.libsmbios)" : "2.4",
                                     "DistroId" : "ubuntu",
                                     "CpuArchitecture" : "x86_64",
                                     "BootTime" : "1645105544",
                                     "HostVendor" : "LENOVO",
                                     "RuntimeVersion(org.freedesktop.appstream-glib)" : "0.7.14",
                                     "HostProduct" : "21A0000CMX",
                                     "RuntimeVersion(com.redhat.fwupdate)" : "12",
                                     "RuntimeVersion(org.freedesktop.fwupd)" : "1.5.11",
                                     "KernelVersion" : "5.13.0-28-generic"
                                   }
                                 }
                               ]
                             }
    Proceed with upload? [Y|n]: 
    Idle…                    [***************************************]
    Successfully uploaded 1 report
    No updates available for remaining devices
    
    • 4

相关问题

  • 如何从命令行仅安装安全更新?关于如何管理更新的一些提示

  • 如何从命令行判断机器是否需要重新启动?

  • 有没有办法重置所有包/源并从头开始?

  • 如何回滚到 PHP 5.2?

  • 包管理器之间有什么区别?

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve