6.4. 加载缺失的固件

正如 第 2.2 节 “需要固件的设备” 里面所说,有些设备需要加载固件。大部分情况下,如果没有固件设备就无法工作;有时没有固件不会影响基本的功能,但增强功能就无法使用。

如果没有设备驱动程序所需的固件,debian-installer 将显示对话框要求加载缺失的固件。假如选取了选项,debian-installer 将扫描现有设备松散的固件文件或包含固件的软件包。如果搜索到,固件会被复制到正确的位置 (/lib/firmware),然后加载驱动程序模块。

[注意] 注意

Which devices are scanned and which file systems are supported depends on the architecture, the installation method and the stage of the installation. Especially during the early stages of the installation, loading the firmware is most likely to succeed from a FAT-formatted USB stick. On i386 and amd64 firmware can also be loaded from an MMC or SD card.

假如了解设备毋需固件也可以工作,或者设备在安装时并不需要使用,您可以跳过加载固件。

debian-installer only prompts for firmware needed by kernel modules loaded during the installation. Not all drivers are included in debian-installer, in particular radeon is not, so this implies that the capabilities of some devices may be no different at the end of the installation from what they were at the beginning. Consequently, some of your hardware may not be being used to its full potential. If you suspect this is the case, or are just curious, it is not a bad idea to check the output of the dmesg command on the newly booted system and search for firmware.

6.4.1. 准备介质

Official installation images do not include non-free firmware. The most common method to load such firmware is from some removable medium such as a USB stick. Alternatively, unofficial installation images containing non-free firmware can be found at https://cdimage.debian.org/cdimage/unofficial/non-free/cd-including-firmware/. To prepare a USB stick (or other medium like a hard drive partition), the firmware files or packages must be placed in either the root directory or a directory named /firmware of the file system on the medium. The recommended file system to use is FAT as that is most certain to be supported during the early stages of the installation.

大多数固件的压缩包和 zip 文件可以从这里获得:

下载对应版本的压缩包或 zip 文件,然后解压到介质的文件系统里面。

如果您需要的固件没有包含在压缩包里面,可以从档案库(non-free 部分)下载特定的固件。以下概要列出大多数固件软件包,但不保证完整,有些还是非固件软件包:

也可以复制单独的固件文件到介质。要求不严的固件还可以从已经安装的系统或硬件制造商那里获得。

6.4.2. 固件和安装好的系统

任何安装期间加载的固件会自动被复制到安装好的系统。多数情况下这可以保证需要固件的设备可以在系统重新启动之后正常工作。然而,如果安装好的系统运行在与安装程序不同的内核版本,有可能由于版本的偏差造成固件不能加载。

如果固件从一个固件软件包加载,debian-installer 会为安装好的系统也安装该软件包,并自动添加软件包仓库的 non-free 部分到 APT 的 sources.list。这样做的优点在于如果有固件的新版本存在会自动更新。

如果安装过程中跳过加载固件,相关的设备可能无法在安装好的系统中工作,直到手动安装好固件或软件包。

[注意] 注意

如果固件从不严格的固件文件加载,复制到安装好的系统的固件将不会自动更新,除非对应的固件软件包(如果有的话)在系统安装之后安装。