在 Debian 安装程序中跳过 Security 源

在 Debian 的联网安装(包括 Netboot 和联网的 CD 安装介质)过程中,Debian 安装程序会自动添加 Security 源到 /target/etc/apt/sources.list 中。该源固定域名为 security.debian.org,且会忽视在安装过程中选择的镜像源。

然而由于众所周知的原因,部分国内的服务器无法正常访问 Debian 的 Security 源,导致安装过程中无法下载更新。

为了解决这个问题,需要在 Debian 安装程序的 Configure APT 阶段终端自动安装程序。

Configure APT 阶段在进行分区之后,需要等待 Install the base system 阶段完成,因此不建议无人值守安装。

等待分区结束后,即进入 Install the base system 阶段。建议从此阶段开始耐心盯帧,因为此阶段之后的 Configure APT 阶段只有几十秒且无需手动确认,如果错过即意味着可能安装失败或陷入无限网络等待。

Install the base system

等待出现 Configure APT 阶段的提示后,按下几次 Enter(确保选中 Cancel),来中断 APT 配置。

Configure APT

此时,Debian 安装程序会提示安装失败。点击确认,并在弹出的 TUI 中选择 Ignore 选项。

Configure the package manager

在此之后,Debian 会退回安装程序的主菜单。重新选择 Configure the package manager 选项。

Select install stage

最后,在弹出的 Configure the package manager 菜单中,确保 仅选择 release updates 选项,点击 Continue 即可。

Select APT Channel