kali: 修复新版 initrd 删除了原版 wget 导致安装报错

partial-fixed #91
This commit is contained in:
bin456789 2024-06-03 20:58:02 +08:00
parent 115b8c4e56
commit bcfd36214b
No known key found for this signature in database
GPG Key ID: EE301B386DE6C11B
2 changed files with 8 additions and 2 deletions

View File

@ -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//')"; \

View File

@ -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'