]> git.proxmox.com Git - pve-docs.git/blame - firmware-updates.adoc
storage: improve description of 'shared' property
[pve-docs.git] / firmware-updates.adoc
CommitLineData
16b31cc9
AZ
1[[chapter_firmware_updates]]
2Firmware Updates
3----------------
4ifdef::wiki[]
5:pve-toplevel:
6endif::wiki[]
16b31cc9
AZ
7Firmware updates from this chapter should be applied when running {pve} on a
8bare-metal server. Whether configuring firmware updates is appropriate within
9guests, e.g. when using device pass-through, depends strongly on your setup and
10is therefore out of scope.
11
48ae5721
AZ
12In addition to regular software updates, firmware updates are also important
13for reliable and secure operation.
14
15When obtaining and applying firmware updates, a combination of available options
16is recommended to get them as early as possible or at all.
16b31cc9 17
48ae5721
AZ
18The term firmware is usually divided linguistically into microcode (for CPUs)
19and firmware (for other devices).
16b31cc9
AZ
20
21
22[[sysadmin_firmware_persistent]]
23Persistent Firmware
24~~~~~~~~~~~~~~~~~~~
48ae5721
AZ
25This section is suitable for all devices. Updated microcode, which is usually
26included in a BIOS/UEFI update, is stored on the motherboard, whereas other
27firmware is stored on the respective device. This persistent method is
28especially important for the CPU, as it enables the earliest possible regular
29loading of the updated microcode at boot time.
16b31cc9 30
48ae5721
AZ
31CAUTION: With some updates, such as for BIOS/UEFI or storage controller, the
32device configuration could be reset. Please follow the vendor's instructions
33carefully and back up the current configuration.
16b31cc9 34
48ae5721 35Please check with your vendor which update methods are available.
16b31cc9 36
48ae5721
AZ
37* Convenient update methods for servers can include Dell's Lifecycle Manager or
38Service Packs from HPE.
16b31cc9 39
48ae5721 40* Sometimes there are Linux utilities available as well. Examples are
16b31cc9
AZ
41https://network.nvidia.com/support/firmware/mlxup-mft/['mlxup'] for NVIDIA
42ConnectX or
43https://techdocs.broadcom.com/us/en/storage-and-ethernet-connectivity/ethernet-nic-controllers/bcm957xxx/adapters/software-installation/updating-the-firmware/manually-updating-the-adapter-firmware-on-linuxesx.html['bnxtnvm'/'niccli']
44for Broadcom network cards.
45
48ae5721
AZ
46* https://fwupd.org[LVFS] could also be an option if there is a cooperation with
47a https://fwupd.org/lvfs/vendors/[vendor] and
48https://fwupd.org/lvfs/devices/[supported hardware] in use. The technical
49requirement for this is that the system was manufactured after 2014, is booted
50via UEFI and the easiest way is to mount the EFI partition from which you boot
51(`mount /dev/disk/by-partuuid/<from efibootmgr -v> /boot/efi`) before installing
52'fwupd'.
16b31cc9 53
48ae5721
AZ
54TIP: If the update instructions require a host reboot, make sure that it can be
55done safely. See also xref:ha_manager_node_maintenance[Node Maintenance].
16b31cc9
AZ
56
57
58[[sysadmin_firmware_runtime_files]]
59Runtime Firmware Files
60~~~~~~~~~~~~~~~~~~~~~~
48ae5721
AZ
61This method stores firmware on the {pve} operating system and will pass it to a
62device if its xref:sysadmin_firmware_persistent[persisted firmware] is less
63recent. It is supported by devices such as network and graphics cards, but not
64by those that rely on persisted firmware such as the motherboard and hard disks.
16b31cc9
AZ
65
66In {pve} the package `pve-firmware` is already installed by default. Therefore,
48ae5721
AZ
67with the normal xref:system_software_updates[system updates (APT)], included
68firmware of common hardware is automatically kept up to date.
69
70An additional xref:sysadmin_debian_firmware_repo[Debian Firmware Repository]
71exists, but is not configured by default.
72
73If you try to install an additional firmware package but it conflicts, APT will
74abort the installation. Perhaps the particular firmware can be obtained in
75another way.
76
77
78[[sysadmin_firmware_cpu]]
79CPU Microcode Updates
80~~~~~~~~~~~~~~~~~~~~~
81Microcode updates are intended to fix found security vulnerabilities and other
82serious CPU bugs. While the CPU performance can be affected, a patched microcode
83is usually still more performant than an unpatched microcode where the kernel
84itself has to do mitigations. Depending on the CPU type, it is possible that
85performance results of the flawed factory state can no longer be achieved
86without knowingly running the CPU in an unsafe state.
87
88To get an overview of present CPU vulnerabilities and their mitigations, run
89`lscpu`. Current real-world known vulnerabilities can only show up if the
90{pve} host is xref:system_software_updates[up to date], its version not
91xref:faq-support-table[end of life], and has at least been rebooted since the
92last kernel update.
93
94Besides the recommended microcode update via
95xref:sysadmin_firmware_persistent[persistent] BIOS/UEFI updates, there is also
96an independent method via *Early OS Microcode Updates*. It is convenient to use
97and also quite helpful when the motherboard vendor no longer provides BIOS/UEFI
98updates. Regardless of the method in use, a reboot is always needed to apply a
99microcode update.
100
101
102Set up Early OS Microcode Updates
103^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
113290b8
TL
104To set up microcode updates that are applied early on boot by the Linux kernel,
105you need to:
106
107. Enable the xref:sysadmin_debian_firmware_repo[Debian Firmware Repository]
108. Get the latest available packages `apt update` (or use the web interface,
109 under Node -> Updates)
110. Install the CPU-vendor specific microcode package:
111 - For Intel CPUs: `apt install intel-microcode`
112 - For AMD CPUs: `apt install amd64-microcode`
113. Reboot the {pve} host
114
115Any future microcode update will also require a reboot to be loaded.
48ae5721
AZ
116
117Microcode Version
118^^^^^^^^^^^^^^^^^
119To get the current running microcode revision for comparison or debugging
120purposes:
121
122----
123# grep microcode /proc/cpuinfo | uniq
124microcode : 0xf0
125----
126
8bad0dea
TL
127A microcode package has updates for many different CPUs. But updates
128specifically for your CPU might not come often. So, just looking at the date on
129the package won't tell you when the company actually released an update for your
130specific CPU.
131
132If you've installed a new microcode package and rebooted your {pve} host, and
133this new microcode is newer than both, the version baked into the CPU and the
134one from the motherboard's firmware, you'll see a message in the system log
135saying "microcode updated early".
48ae5721
AZ
136
137----
138# dmesg | grep microcode
139[ 0.000000] microcode: microcode updated early to revision 0xf0, date = 2021-11-12
140[ 0.896580] microcode: Microcode Update Driver: v2.2.
141----
142
143
144[[sysadmin_firmware_troubleshooting]]
145Troubleshooting
146^^^^^^^^^^^^^^^
147For debugging purposes, the set up Early OS Microcode Update applied regularly
148at system boot can be temporarily disabled as follows:
149
1501. make sure that the host can be rebooted xref:ha_manager_node_maintenance[safely]
1512. reboot the host to get to the GRUB menu (hold `SHIFT` if it is hidden)
1523. at the desired {pve} boot entry press `E`
1534. go to the line which starts with `linux` and append separated by a space
154*`dis_ucode_ldr`*
1555. press `CTRL-X` to boot this time without an Early OS Microcode Update
156
157If a problem related to a recent microcode update is suspected, a package
158downgrade should be considered instead of package removal
159(`apt purge <intel-microcode|amd64-microcode>`). Otherwise, a too old
160xref:sysadmin_firmware_persistent[persisted] microcode might be loaded, even
161though a more recent one would run without problems.
162
163A downgrade is possible if an earlier microcode package version is
164available in the Debian repository, as shown in this example:
165
166----
167# apt list -a intel-microcode
168Listing... Done
169intel-microcode/stable-security,now 3.20230808.1~deb12u1 amd64 [installed]
170intel-microcode/stable 3.20230512.1 amd64
171----
172----
173# apt install intel-microcode=3.202305*
174...
175Selected version '3.20230512.1' (Debian:12.1/stable [amd64]) for 'intel-microcode'
176...
177dpkg: warning: downgrading intel-microcode from 3.20230808.1~deb12u1 to 3.20230512.1
178...
179intel-microcode: microcode will be updated at next boot
180...
181----
182
183Make sure (again) that the host can be rebooted
184xref:ha_manager_node_maintenance[safely]. To apply an older microcode
185potentially included in the microcode package for your CPU type, reboot now.
186
187[TIP]
188====
189It makes sense to hold the downgraded package for a while and try more recent
190versions again at a later time. Even if the package version is the same in the
191future, system updates may have fixed the experienced problem in the meantime.
192----
193# apt-mark hold intel-microcode
194intel-microcode set on hold.
195----
196----
197# apt-mark unhold intel-microcode
198# apt update
199# apt upgrade
200----
201====