如主机商有提供system rescue cd的急救系统,可通过此来安装debian 10。
1.echo 1 > /proc/sys/net/ipv6/conf/all/disable_ipv6 # 如不想使用IPv6网络,可先禁用
2.emaint -a sync # 急救系统是基于gentoo的,先同步

3.emerge kexec-tools # 安装内核切换工具

4.wget https://d-i.debian.org/daily-images/amd64/daily/netboot/debian-installer/amd64/linux # 下载debian10的网络安装文件linux
5.wget https://d-i.debian.org/daily-images/amd64/daily/netboot/debian-installer/amd64/initrd.gz # 下载debian10的网络安装文件initrd.gz
6.wget https://github.com/fincham/kexec-remote-debian-install/raw/master/build.py # 下载脚本,用于修改initrd.gz,添加 preseed.cfg 自动配置文件

7.chmod +x build.py # 添加执行权限
8.python2 ./build.py initrd.gz enp0s20f0 144.172.126.32 255.255.255.0 144.172.126.1 8.8.8.8 # 假如网卡名是 enp0s20f0,静态IP是144.172.126.32,网关是144.172.126.1,会自动生成preseed的配置内容,重新打包 initrd.gz

9.kexec --command-line="auto=true priority=critical mirror/http/hostname=deb.debian.org" --initrd=initrd.gz linux # 切换到debian的网络安装

10.几分钟可ping通IP后,就可以通过ssh连接到安装控制台了。如不需要桌面环境,请记得选择“专家模式"的安装向导
如果不确定网卡的名称,可运行以下命令来获取:
source <(udevadm test /sys/class/net/eth0 2>/dev/null | grep ID_NET_NAME); for name in "$ID_NET_NAME_ONBOARD" "$ID_NET_NAME_SLOT" "$ID_NET_NAME_PATH" "$ID_NET_NAME_MAC" ; do [[ -n $name ]] || continue; echo "$name"; break; done
参考: