FetchDebian并非传统意义上的“安装加速工具”,其主要功能是下载Debian软件包、镜像或ISO文件,并通过配置镜像源、多线程等方式优化下载速度。若需加速Debian系统安装,可通过以下步骤使用FetchDebian提前下载安装所需的文件,减少安装过程中的网络等待时间:
在Debian系统(或已安装Debian的机器)上,通过APT包管理器安装FetchDebian:
sudo apt update
sudo apt install fetchdebian
FetchDebian的主配置文件位于/etc/fetchdebian.conf,使用文本编辑器(如nano)打开并修改:
sudo nano /etc/fetchdebian.conf
mirror参数改为国内或离你较近的镜像站(如中国科学技术大学镜像源),提升下载速度:[mirror]
url = https://mirrors.ustc.edu.cn/debian/
output参数设置下载文件的存储路径(如/var/cache/fetchdebian):output = /var/cache/fetchdebian
threads参数增加下载线程(如4),加速大文件下载:threads = 4
若不想修改配置文件,可通过命令行参数直接指定:
fetchdebian --mirror=https://mirrors.ustc.edu.cn/debian/ --threads=4 <其他命令>
使用FetchDebian下载指定版本、架构的Debian ISO文件(以Debian 11 amd64为例):
fetchdebian iso bookworm amd64
bookworm:Debian 11的代号(可通过fetchdebian list查看可用版本);amd64:目标架构(根据硬件选择i386、arm64等)。下载完成后,ISO文件会保存至配置的output目录(如/var/cache/fetchdebian)。
将下载的ISO文件刻录到USB驱动器或DVD:
dd命令(需替换/dev/sdX为你的USB设备名,如/dev/sdb):sudo dd if=/var/cache/fetchdebian/bookworm-amd64.iso of=/dev/sdX bs=4M status=progress
brasero、growisofs等工具刻录。output目录中的旧文件,释放磁盘空间;/etc/environment或/etc/apt/apt.conf配置代理(如http_proxy=http://proxy_ip:port/),提升下载速度;pool目录,并修改安装脚本(如preseed.cfg)指向本地镜像,但这需要更高级的配置。通过以上步骤,FetchDebian可帮助你提前下载安装所需的文件,减少安装过程中的网络依赖,从而加速Debian系统的安装流程。