diff --git a/README.en.md b/README.en.md index c6ff62d..bcb3b26 100644 --- a/README.en.md +++ b/README.en.md @@ -31,26 +31,25 @@ The original system can be any system listed in the table. The system requirements for the target system are as follows: -| Target System | Version | Memory | Disk | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------- | --------- | ---------------------- | -| Alpine | 3.18, 3.19, 3.20, 3.21 | 256 MB | 1 GB | -| Debian | 9, 10, 11, 12 | 256 MB | 1 ~ 1.5 GB ^ | -| Kali | Rolling | 256 MB | 1 ~ 1.5 GB ^ | -| Ubuntu | 16.04, 18.04, 20.04, 22.04, 24.04 | 512 MB \* | 2 GB | -| Anolis | 7, 8 | 512 MB \* | 5 GB | -| Oracle | 7, 8, 9 | 512 MB \* | 5 GB | -| RedHat   AlmaLinux   Rocky | 8, 9 | 512 MB \* | 5 GB | -| OpenCloudOS | 8, 9 | 512 MB \* | 5 GB | -| CentOS | 9, 10 | 512 MB \* | 5 GB | -| Fedora | 40, 41 | 512 MB \* | 5 GB | -| openEuler | 20.03, 22.03, 24.03 | 512 MB \* | 5 GB | -| openSUSE | 15.5, 15.6, Tumbleweed (Rolling) | 512 MB \* | 5 GB | -| NixOS | 24.11 | 512 MB | 5 GB | -| Arch | Rolling | 512 MB | 5 GB | -| Gentoo | Rolling | 512 MB | 5 GB | -| Windows (DD) | Any | 512 MB | Depending on the image | -| Windows (ISO) | Vista, 7, 8.x (Server 2008 ~ 2012 R2) | 512 MB | 25 GB | -| Windows (ISO) | 10, 11 (Server 2016 ~ 2025) | 1 GB | 25 GB | +| Target System | Version | Memory | Disk | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------- | --------- | ---------------------- | +| Alpine | 3.18, 3.19, 3.20, 3.21 | 256 MB | 1 GB | +| Debian | 9, 10, 11, 12 | 256 MB | 1 ~ 1.5 GB ^ | +| Kali | Rolling | 256 MB | 1 ~ 1.5 GB ^ | +| Ubuntu | 16.04, 18.04, 20.04, 22.04, 24.04 | 512 MB \* | 2 GB | +| Anolis | 7, 8 | 512 MB \* | 5 GB | +| RHEL   AlmaLinux   Rocky   Oracle | 8, 9 | 512 MB \* | 5 GB | +| OpenCloudOS | 8, 9 | 512 MB \* | 5 GB | +| CentOS | 9, 10 | 512 MB \* | 5 GB | +| Fedora | 40, 41 | 512 MB \* | 5 GB | +| openEuler | 20.03, 22.03, 24.03 | 512 MB \* | 5 GB | +| openSUSE | 15.6, Tumbleweed (Rolling) | 512 MB \* | 5 GB | +| NixOS | 24.11 | 512 MB | 5 GB | +| Arch | Rolling | 512 MB | 5 GB | +| Gentoo | Rolling | 512 MB | 5 GB | +| Windows (DD) | Any | 512 MB | Depending on the image | +| Windows (ISO) | Vista, 7, 8.x (Server 2008 ~ 2012 R2) | 512 MB | 25 GB | +| Windows (ISO) | 10, 11 (Server 2016 ~ 2025) | 1 GB | 25 GB | \* Indicates installation using cloud images, not traditional network installation. @@ -121,23 +120,23 @@ certutil -urlcache -f -split https://jihulab.com/bin456789/reinstall/-/raw/main/ - When installing the latest version, the version number does not need to be specified. - Maximizes disk space usage: no boot partition (except for Fedora) and no swap partition. - Automatically selects different optimized kernels based on machine type, such as `Cloud` or `HWE` kernels. -- When installing Red Hat, you must provide the `qcow2` image link obtained from . +- When installing Red Hat, you must provide the `qcow2` image link obtained from . You can also install other RHEL-based OS, such as `Alibaba Cloud Linux` and `TencentOS Server`. - After reinstallation, if you need to change the SSH port or switch to key-based login, make sure to also modify the files inside `/etc/ssh/sshd_config.d/`. ```bash bash reinstall.sh anolis 7|8 rocky 8|9 redhat 8|9 --img='http://xxx.com/xxx.qcow2' + oracle 8|9 almalinux 8|9 opencloudos 8|9 centos 9|10 - oracle 7|8|9 fedora 40|41 nixos 24.11 debian 9|10|11|12 + opensuse 15.6|tumbleweed openeuler 20.03|22.03|24.03 alpine 3.18|3.19|3.20|3.21 - opensuse 15.5|15.6|tumbleweed ubuntu 16.04|18.04|20.04|22.04|24.04 [--minimal] kali arch @@ -376,7 +375,7 @@ Open File menu > Open Image File, select the iso to be installed to get the imag #### The script will install the following drivers as needed - Virtio ([Virtio](https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/), [Alibaba Cloud](https://www.alibabacloud.com/help/ecs/user-guide/update-red-hat-virtio-drivers-of-windows-instances)) -- XEN ([XEN](https://xenproject.org/windows-pv-drivers/), [Citrix](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Upgrading_PV_drivers.html#win2008-citrix-upgrade), [AWS](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/xen-drivers-overview.html)) +- XEN ([XEN](https://xenproject.org/resources/downloads/), [Citrix](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Upgrading_PV_drivers.html#win2008-citrix-upgrade), [AWS](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/xen-drivers-overview.html)) - AWS ([ENA Network Adapter](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ena-driver-releases-windows.html), [NVMe Storage Controller](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/nvme-driver-version-history.html)) - GCP ([gVNIC Network Adapter](https://cloud.google.com/compute/docs/networking/using-gvnic), [GGA Display Adapter](https://cloud.google.com/compute/docs/instances/enable-instance-virtual-display)) - Azure ([MANA Network Adapter](https://learn.microsoft.com/azure/virtual-network/accelerated-networking-mana-windows)) diff --git a/README.md b/README.md index 2aa14cc..ece077d 100644 --- a/README.md +++ b/README.md @@ -31,26 +31,25 @@ 目标系统的配置要求如下: -| 目标系统 | 版本 | 内存 | 硬盘 | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------- | --------- | ------------ | -| Alpine | 3.18, 3.19, 3.20, 3.21 | 256 MB | 1 GB | -| Debian | 9, 10, 11, 12 | 256 MB | 1 ~ 1.5 GB ^ | -| Kali | 滚动 | 256 MB | 1 ~ 1.5 GB ^ | -| Ubuntu | 16.04, 18.04, 20.04, 22.04, 24.04 | 512 MB \* | 2 GB | -| Anolis | 7, 8 | 512 MB \* | 5 GB | -| Oracle | 7, 8, 9 | 512 MB \* | 5 GB | -| RedHat   AlmaLinux   Rocky | 8, 9 | 512 MB \* | 5 GB | -| OpenCloudOS | 8, 9 | 512 MB \* | 5 GB | -| CentOS | 9, 10 | 512 MB \* | 5 GB | -| Fedora | 40, 41 | 512 MB \* | 5 GB | -| openEuler | 20.03, 22.03, 24.03 | 512 MB \* | 5 GB | -| openSUSE | 15.5, 15.6, Tumbleweed (滚动) | 512 MB \* | 5 GB | -| NixOS | 24.11 | 512 MB | 5 GB | -| Arch | 滚动 | 512 MB | 5 GB | -| Gentoo | 滚动 | 512 MB | 5 GB | -| Windows (DD) | 任何 | 512 MB | 取决于镜像 | -| Windows (ISO) | Vista, 7, 8.x (Server 2008 ~ 2012 R2) | 512 MB | 25 GB | -| Windows (ISO) | 10, 11 (Server 2016 ~ 2025) | 1 GB | 25 GB | +| 目标系统 | 版本 | 内存 | 硬盘 | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------- | --------- | ------------ | +| Alpine | 3.18, 3.19, 3.20, 3.21 | 256 MB | 1 GB | +| Debian | 9, 10, 11, 12 | 256 MB | 1 ~ 1.5 GB ^ | +| Kali | 滚动 | 256 MB | 1 ~ 1.5 GB ^ | +| Ubuntu | 16.04, 18.04, 20.04, 22.04, 24.04 | 512 MB \* | 2 GB | +| Anolis | 7, 8 | 512 MB \* | 5 GB | +| RHEL   AlmaLinux   Rocky   Oracle | 8, 9 | 512 MB \* | 5 GB | +| OpenCloudOS | 8, 9 | 512 MB \* | 5 GB | +| CentOS | 9, 10 | 512 MB \* | 5 GB | +| Fedora | 40, 41 | 512 MB \* | 5 GB | +| openEuler | 20.03, 22.03, 24.03 | 512 MB \* | 5 GB | +| openSUSE | 15.6, Tumbleweed (滚动) | 512 MB \* | 5 GB | +| NixOS | 24.11 | 512 MB | 5 GB | +| Arch | 滚动 | 512 MB | 5 GB | +| Gentoo | 滚动 | 512 MB | 5 GB | +| Windows (DD) | 任何 | 512 MB | 取决于镜像 | +| Windows (ISO) | Vista, 7, 8.x (Server 2008 ~ 2012 R2) | 512 MB | 25 GB | +| Windows (ISO) | 10, 11 (Server 2016 ~ 2025) | 1 GB | 25 GB | \* 表示使用云镜像安装,非传统网络安装 @@ -121,23 +120,23 @@ certutil -urlcache -f -split https://jihulab.com/bin456789/reinstall/-/raw/main/ - 安装最新版可不输入版本号 - 最大化利用磁盘空间:不含 boot 分区(Fedora 例外),不含 swap 分区 - 自动根据机器类型选择不同的优化内核,例如 `Cloud`、`HWE` 内核 -- 安装 Red Hat 时需填写 得到的 `qcow2` 镜像链接 +- 安装 Red Hat 时需填写 得到的 `qcow2` 镜像链接,也可以安装其它类 RHEL 系统,例如 `Alibaba Cloud Linux` 和 `TencentOS Server` - 重装后如需修改 SSH 端口或者改成密钥登录,注意还要修改 `/etc/ssh/sshd_config.d/` 里面的文件 ```bash bash reinstall.sh anolis 7|8 rocky 8|9 redhat 8|9 --img='http://xxx.com/xxx.qcow2' + oracle 8|9 almalinux 8|9 opencloudos 8|9 centos 9|10 - oracle 7|8|9 fedora 40|41 nixos 24.11 debian 9|10|11|12 + opensuse 15.6|tumbleweed openeuler 20.03|22.03|24.03 alpine 3.18|3.19|3.20|3.21 - opensuse 15.5|15.6|tumbleweed ubuntu 16.04|18.04|20.04|22.04|24.04 [--minimal] kali arch @@ -376,7 +375,7 @@ Windows Server 2025 SERVERDATACENTER #### 脚本会按需安装以下驱动 - Virtio ([Virtio](https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/)、[阿里云](https://www.alibabacloud.com/help/ecs/user-guide/update-red-hat-virtio-drivers-of-windows-instances)) -- XEN ([XEN](https://xenproject.org/windows-pv-drivers/)、[Citrix](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Upgrading_PV_drivers.html#win2008-citrix-upgrade)、[AWS](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/xen-drivers-overview.html)) +- XEN ([XEN](https://xenproject.org/resources/downloads/)、[Citrix](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Upgrading_PV_drivers.html#win2008-citrix-upgrade)、[AWS](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/xen-drivers-overview.html)) - AWS ([ENA 网卡](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ena-driver-releases-windows.html)、[NVME 存储控制器](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/nvme-driver-version-history.html)) - GCP ([gVNIC 网卡](https://cloud.google.com/compute/docs/networking/using-gvnic)、[GGA 显卡](https://cloud.google.com/compute/docs/instances/enable-instance-virtual-display)) - Azure ([MANA 网卡](https://learn.microsoft.com/azure/virtual-network/accelerated-networking-mana-windows)) diff --git a/reinstall.sh b/reinstall.sh index faf1737..6d8c867 100644 --- a/reinstall.sh +++ b/reinstall.sh @@ -47,21 +47,21 @@ usage_and_exit() { Usage: $reinstall_____ anolis 7|8 rocky 8|9 redhat 8|9 --img='http://xxx.com/xxx.qcow2' + oracle 8|9 almalinux 8|9 opencloudos 8|9 centos 9|10 - oracle 7|8|9 fedora 40|41 nixos 24.11 debian 9|10|11|12 + opensuse 15.6|tumbleweed openeuler 20.03|22.03|24.03 alpine 3.18|3.19|3.20|3.21 - opensuse 15.5|15.6|tumbleweed ubuntu 16.04|18.04|20.04|22.04|24.04 [--minimal] kali arch gentoo - dd --img='http://xxx.com/xxx.raw' (supports raw vhd gzip xz) + dd --img='http://xxx.com/yyy.zzz' (raw image stores in raw/vhd/tar/gz/xz/zst) windows --image-name='windows xxx yyy' --lang=xx-yy windows --image-name='windows xxx yyy' --iso='http://xxx.com/xxx.iso' netboot.xyz @@ -1643,13 +1643,13 @@ verify_os_name() { 'rocky 8|9' \ 'redhat 8|9' \ 'opencloudos 8|9' \ - 'oracle 7|8|9' \ + 'oracle 8|9' \ 'fedora 40|41' \ 'nixos 24.11' \ 'debian 9|10|11|12' \ + 'opensuse 15.6|tumbleweed' \ 'openeuler 20.03|22.03|24.03' \ 'alpine 3.18|3.19|3.20|3.21' \ - 'opensuse 15.5|15.6|tumbleweed' \ 'ubuntu 16.04|18.04|20.04|22.04|24.04' \ 'kali' \ 'arch' \ diff --git a/trans.sh b/trans.sh index 50601f5..d3c4baf 100644 --- a/trans.sh +++ b/trans.sh @@ -2303,24 +2303,11 @@ download_cloud_init_config() { # swapfile # 如果分区表中已经有swapfile就跳过,例如arch if ! grep -w swap $os_dir/etc/fstab; then - # btrfs - # 目前只有 arch 和 fedora 镜像使用 btrfs - # 等 fedora 39 cloud-init 升级到 v23.3 后删除 - if mount | grep 'on /os type btrfs'; then - insert_into_file $ci_file after '^runcmd:' <> /etc/fstab - - systemctl daemon-reload -EOF - else - # ext4 xfs - cat <>$ci_file + cat <>$ci_file swap: filename: /swapfile size: auto EOF - fi fi create_cloud_init_network_config "$ci_file" "$recognize_static6" "$recognize_ipv6_types"