From bcfd36214b9feeb6a7f9c022e14869bca9e9904e Mon Sep 17 00:00:00 2001 From: bin456789 Date: Mon, 3 Jun 2024 20:58:02 +0800 Subject: [PATCH] =?UTF-8?q?kali:=20=E4=BF=AE=E5=A4=8D=E6=96=B0=E7=89=88=20?= =?UTF-8?q?initrd=20=E5=88=A0=E9=99=A4=E4=BA=86=E5=8E=9F=E7=89=88=20wget?= =?UTF-8?q?=20=E5=AF=BC=E8=87=B4=E5=AE=89=E8=A3=85=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit partial-fixed #91 --- debian.cfg | 4 ++-- reinstall.sh | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/debian.cfg b/debian.cfg index 1c02e73..a0d1098 100644 --- a/debian.cfg +++ b/debian.cfg @@ -140,12 +140,12 @@ d-i partman/early_command string true; \ echo "rm -rf /target/boot/efi/*; $postinst.orig" >>$postinst; \ - xda=$(wget --tries=5 "$confhome/get-xda.sh" -O- | sh -s); \ + xda=$(sh /get-xda.sh); \ debconf-set partman-auto/disk "/dev/$xda"; \ debconf-set grub-installer/bootdev "/dev/$xda"; \ rm -rf /usr/sbin/fdisk /usr/sbin/sfdisk; \ - ttys=$(wget --tries=5 "$confhome/ttys.sh" -O- | sh -s console=); \ + ttys=$(sh /ttys.sh console=); \ debconf-set debian-installer/add-kernel-opts "$ttys"; \ sh /can_use_cloud_kernel.sh "$xda" || debconf-set base-installer/kernel/image "$(debconf-get base-installer/kernel/image | sed 's/-cloud//')"; \ diff --git a/reinstall.sh b/reinstall.sh index 3700f5b..be2a0cf 100644 --- a/reinstall.sh +++ b/reinstall.sh @@ -2193,6 +2193,12 @@ EOF # 在 debian installer 中判断能否用云内核 create_can_use_cloud_kernel_sh can_use_cloud_kernel.sh + # 最近 kali initrd 删除了原版 wget + # 但 initrd 的 busybox wget 又不支持 https + # 因此改成在这里下载 + curl -LO "$confhome/get-xda.sh" + curl -LO "$confhome/ttys.sh" + # 可以节省一点内存? echo 'export DEBCONF_DROP_TRANSLATIONS=1' | insert_into_file lib/debian-installer/menu before 'exec debconf'