mirror of
https://github.com/bin456789/reinstall.git
synced 2025-01-18 20:39:14 +08:00
kali: 修复找不到系统盘
This commit is contained in:
parent
925f148fc7
commit
eb35d6914c
@ -13,7 +13,7 @@ One-Click Script to Reinstall System [中文](README.md)
|
|||||||
- Supports installation of 17 common Linux distributions
|
- Supports installation of 17 common Linux distributions
|
||||||
- Supports installation of official Windows ISO, automatically finds ISO links, and integrates virtual machine drivers
|
- Supports installation of official Windows ISO, automatically finds ISO links, and integrates virtual machine drivers
|
||||||
- Supports installation in any direction, i.e., `Linux to Linux`, `Linux to Windows`, `Windows to Windows`, `Windows to Linux`
|
- Supports installation in any direction, i.e., `Linux to Linux`, `Linux to Windows`, `Windows to Windows`, `Windows to Linux`
|
||||||
- No need to input IP parameters; automatically recognizes dynamic and static IPs, supports `/32`, `/128`, `gateway outside subnet`, `pure IPv6`, `dual NIC` and other special network configurations
|
- No need to input IP parameters; automatically recognizes dynamic and static IPs, supports `/32`, `/128`, `gateway outside subnet`, `IPv6 only`, `dual NIC` and other special network configurations
|
||||||
- Specially optimized for low-spec servers, requires less memory than the official netboot
|
- Specially optimized for low-spec servers, requires less memory than the official netboot
|
||||||
- Uses partition table ID to identify hard drives throughout the process, ensuring no wrong disk is written
|
- Uses partition table ID to identify hard drives throughout the process, ensuring no wrong disk is written
|
||||||
- Supports BIOS and EFI boot, and ARM architecture
|
- Supports BIOS and EFI boot, and ARM architecture
|
||||||
@ -242,7 +242,7 @@ bash reinstall.sh windows \
|
|||||||
<summary>The following website provides iso links.</summary>
|
<summary>The following website provides iso links.</summary>
|
||||||
|
|
||||||
- <https://massgrave.dev/genuine-installation-media.html> (Recommended, iso sourced from official channels, updated monthly, includes the latest patches)
|
- <https://massgrave.dev/genuine-installation-media.html> (Recommended, iso sourced from official channels, updated monthly, includes the latest patches)
|
||||||
- <https://www.microsoft.com/software-download/windows10> (Need to open it with a mobile User-Agent)
|
- <https://www.microsoft.com/software-download/windows10> (Need to open it with a non-Windows User-Agent)
|
||||||
- <https://www.microsoft.com/software-download/windows11>
|
- <https://www.microsoft.com/software-download/windows11>
|
||||||
- <https://www.microsoft.com/software-download/windowsinsiderpreviewiso> (Preview)
|
- <https://www.microsoft.com/software-download/windowsinsiderpreviewiso> (Preview)
|
||||||
- <https://www.microsoft.com/evalcenter/download-windows-10-enterprise>
|
- <https://www.microsoft.com/evalcenter/download-windows-10-enterprise>
|
||||||
|
@ -242,7 +242,7 @@ bash reinstall.sh windows \
|
|||||||
<summary>以下网站可找到 iso 链接</summary>
|
<summary>以下网站可找到 iso 链接</summary>
|
||||||
|
|
||||||
- <https://massgrave.dev/genuine-installation-media.html> (推荐,iso 来自官方,每月更新,包含最新补丁)
|
- <https://massgrave.dev/genuine-installation-media.html> (推荐,iso 来自官方,每月更新,包含最新补丁)
|
||||||
- <https://www.microsoft.com/software-download/windows10> (需用手机 User-Agent 打开)
|
- <https://www.microsoft.com/software-download/windows10> (需用非 Windows User-Agent 打开)
|
||||||
- <https://www.microsoft.com/software-download/windows11>
|
- <https://www.microsoft.com/software-download/windows11>
|
||||||
- <https://www.microsoft.com/software-download/windowsinsiderpreviewiso> (预览版)
|
- <https://www.microsoft.com/software-download/windowsinsiderpreviewiso> (预览版)
|
||||||
- <https://www.microsoft.com/evalcenter/download-windows-10-enterprise>
|
- <https://www.microsoft.com/evalcenter/download-windows-10-enterprise>
|
||||||
|
@ -123,7 +123,7 @@ d-i preseed/early_command string true; \
|
|||||||
# efi 分区大小未改变时,不会被格式化,因此需要手动删除旧系统的 efi 文件
|
# efi 分区大小未改变时,不会被格式化,因此需要手动删除旧系统的 efi 文件
|
||||||
# os-prober 卡太久,因此跳过
|
# os-prober 卡太久,因此跳过
|
||||||
d-i partman/early_command string true; \
|
d-i partman/early_command string true; \
|
||||||
confhome="$(grep -o 'extra_confhome=[^ ]*' /proc/cmdline | cut -d= -f2)"; \
|
eval "$(grep -o 'extra_confhome=[^ ]*' /proc/cmdline | sed 's/^extra_//')"; \
|
||||||
|
|
||||||
postinst=/var/lib/dpkg/info/bootstrap-base.postinst; \
|
postinst=/var/lib/dpkg/info/bootstrap-base.postinst; \
|
||||||
cp $postinst $postinst.orig; \
|
cp $postinst $postinst.orig; \
|
||||||
@ -161,7 +161,7 @@ d-i partman/early_command string true; \
|
|||||||
# 另一种方法处理 cloudcone
|
# 另一种方法处理 cloudcone
|
||||||
# if [ "$link_grub_dir" = 1 ]; then mkdir /target/boot/grub2; echo 'chainloader (hd0)+1' >/target/boot/grub2/grub.cfg; fi; \
|
# if [ "$link_grub_dir" = 1 ]; then mkdir /target/boot/grub2; echo 'chainloader (hd0)+1' >/target/boot/grub2/grub.cfg; fi; \
|
||||||
d-i preseed/late_command string true; \
|
d-i preseed/late_command string true; \
|
||||||
link_grub_dir="$(grep -o 'extra_link_grub_dir=[^ ]*' /proc/cmdline | cut -d= -f2)"; \
|
eval "$(grep -o 'extra_link_grub_dir=[^ ]*' /proc/cmdline | sed 's/^extra_//')"; \
|
||||||
if [ "$link_grub_dir" = 1 ]; then ln -s grub /target/boot/grub2; fi; \
|
if [ "$link_grub_dir" = 1 ]; then ln -s grub /target/boot/grub2; fi; \
|
||||||
|
|
||||||
in-target systemctl enable ssh; \
|
in-target systemctl enable ssh; \
|
||||||
|
@ -10,7 +10,7 @@ get_all_disks() {
|
|||||||
get_xda() {
|
get_xda() {
|
||||||
# 如果没找到 main_disk 或 xda
|
# 如果没找到 main_disk 或 xda
|
||||||
# 返回假的值,防止意外地格式化全部盘
|
# 返回假的值,防止意外地格式化全部盘
|
||||||
main_disk="$(grep -o 'extra_main_disk=[^ ]*' /proc/cmdline | cut -d= -f2)"
|
eval "$(grep -o 'extra_main_disk=[^ ]*' /proc/cmdline | sed 's/^extra_//')"
|
||||||
|
|
||||||
if [ -z "$main_disk" ]; then
|
if [ -z "$main_disk" ]; then
|
||||||
echo 'MAIN_DISK_NOT_FOUND'
|
echo 'MAIN_DISK_NOT_FOUND'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user