6.4. 加载缺失的固件

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

Starting with Debian GNU/Linux 12.0, following the 2022 General Resolution about non-free firmware, official installation images (like netinst) can include non-free firmware packages. Even with those firmware packages available, some firmware files might still be missing. Or one might be using netboot files, which don't include firmware packages.

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

[注意] 注意

具体哪些设备会被扫描和支持哪个文件系统,取决于系统的架构、安装方法和安装的阶段。特别是在安装的早期阶段,从 FAT 格式的 U 盘加载固件更容易成功。

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

6.4.1. 准备介质

The most common method to load such firmware is from some removable medium such as a USB stick. 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.

Tarballs and zip files containing current packages for the most common firmware, and the associated metadata to ensure a proper detection by the installer (dep11 directory), are available from:

Just download the tarball or zip file for the correct release and unpack it to the file system on the medium.

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

6.4.2. 固件和安装好的系统

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

If the firmware was loaded from a firmware package, debian-installer will also install this package for the installed system and will automatically add the non-free-firmware section of the package archive in APT's sources.list. This has the advantage that the firmware should be updated automatically if a new version becomes available.

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

[注意] 注意

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

6.4.3. 完善已安装的系统

取决于安装方式,可能有某些必需的固件在安装时没有检测到,对应的固件不可用,或者您当时选择不安装某些固件。有些情况下,一次成功的安装仍然可能在重启后黑屏或者出现显示错误。如果出现这种情况,可以尝试以下的临时解决办法:

  • 在内核命令行中添加 nomodeset。这可能可以帮助系统进入到fallback graphics模式。

  • 使用 Ctrl+Alt+F2 组合键切换到 VT2,这可能可以提供一个可以使用的登录提示符。