fedora: 安装时使用 mount -a 挂载分区和子卷

fedora: 添加 44
This commit is contained in:
bin456789
2026-04-30 22:08:15 +08:00
parent 047b82aaa0
commit 0156afbbe7
4 changed files with 22 additions and 17 deletions

View File

@ -56,8 +56,8 @@ The system requirements for the target system are as follows:
| <img width="16" height="16" src="https://www.redhat.com/favicon.ico" /> RHEL &nbsp;<img width="16" height="16" src="https://almalinux.org/fav/favicon.ico" /> AlmaLinux &nbsp;<img width="16" height="16" src="https://rockylinux.org/favicon.png" /> Rocky &nbsp;<img width="16" height="16" src="https://www.oracle.com/asset/web/favicons/favicon-32.png" /> Oracle | 8, 9, 10 | 512 MB \* | 5 GB | | <img width="16" height="16" src="https://www.redhat.com/favicon.ico" /> RHEL &nbsp;<img width="16" height="16" src="https://almalinux.org/fav/favicon.ico" /> AlmaLinux &nbsp;<img width="16" height="16" src="https://rockylinux.org/favicon.png" /> Rocky &nbsp;<img width="16" height="16" src="https://www.oracle.com/asset/web/favicons/favicon-32.png" /> Oracle | 8, 9, 10 | 512 MB \* | 5 GB |
| <img width="16" height="16" src="https://opencloudos.org/qq.ico" /> OpenCloudOS | 8, 9, Stream 23 | 512 MB \* | 5 GB | | <img width="16" height="16" src="https://opencloudos.org/qq.ico" /> OpenCloudOS | 8, 9, Stream 23 | 512 MB \* | 5 GB |
| <img width="16" height="16" src="https://www.centos.org/assets/icons/favicon.svg" /> CentOS Stream | 9, 10 | 512 MB \* | 5 GB | | <img width="16" height="16" src="https://www.centos.org/assets/icons/favicon.svg" /> CentOS Stream | 9, 10 | 512 MB \* | 5 GB |
| <img width="16" height="16" src="https://fedoraproject.org/favicon.ico" /> Fedora | 42, 43 | 512 MB \* | 5 GB | | <img width="16" height="16" src="https://fedoraproject.org/favicon.ico" /> Fedora | 43, 44 | 512 MB \* | 5 GB |
| <img width="16" height="16" src="https://www.openeuler.org/favicon.ico" /> openEuler | 20.03 LTS - 24.03 LTS, 25.09 | 512 MB \* | 5 GB | | <img width="16" height="16" src="https://www.openeuler.org/favicon.ico" /> openEuler | 20.03 LTS - 24.03 LTS | 512 MB \* | 5 GB |
| <img width="16" height="16" src="https://static.opensuse.org/favicon.ico" /> openSUSE | Leap 15.6, 16.0, Tumbleweed (Rolling) | 512 MB \* | 5 GB | | <img width="16" height="16" src="https://static.opensuse.org/favicon.ico" /> openSUSE | Leap 15.6, 16.0, Tumbleweed (Rolling) | 512 MB \* | 5 GB |
| <img width="16" height="16" src="https://nixos.org/favicon.svg" /> NixOS | 25.11 | 512 MB | 5 GB | | <img width="16" height="16" src="https://nixos.org/favicon.svg" /> NixOS | 25.11 | 512 MB | 5 GB |
| <img width="16" height="16" src="https://archlinux.org/static/favicon.png" /> Arch | Rolling | 512 MB | 5 GB | | <img width="16" height="16" src="https://archlinux.org/static/favicon.png" /> Arch | Rolling | 512 MB | 5 GB |
@ -149,7 +149,7 @@ certutil -urlcache -f -split https://cnb.cool/bin456789/reinstall/-/git/raw/main
- Username `root`. The script prompts for a password. If left blank, a random one is generated. - Username `root`. The script prompts for a password. If left blank, a random one is generated.
- When installing the latest version, the version number does not need to be specified. - 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. - Maximizes disk space utilization: no boot or swap partitions.
- Automatically selects different optimized kernels based on machine type, such as `Cloud` or `HWE` kernels. - 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 <https://access.redhat.com/downloads/content/rhel>. You can also install `qcow2` of other RHEL-based OS, such as `Alibaba Cloud Linux` and `TencentOS Server`. - When installing Red Hat, you must provide the `qcow2` image link obtained from <https://access.redhat.com/downloads/content/rhel>. You can also install `qcow2` of 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/`. - 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/`.
@ -163,11 +163,11 @@ bash reinstall.sh anolis 7|8|23
centos 9|10 centos 9|10
fnos 1 fnos 1
nixos 25.11 nixos 25.11
fedora 42|43 fedora 43|44
debian 9|10|11|12|13 debian 9|10|11|12|13
openeuler 20.03|22.03|24.03
alpine 3.20|3.21|3.22|3.23 alpine 3.20|3.21|3.22|3.23
opensuse 15.6|16.0|tumbleweed opensuse 15.6|16.0|tumbleweed
openeuler 20.03|22.03|24.03|25.09
ubuntu 18.04|20.04|22.04|24.04|26.04 [--minimal] ubuntu 18.04|20.04|22.04|24.04|26.04 [--minimal]
kali kali
arch arch

View File

@ -56,8 +56,8 @@
| <img width="16" height="16" src="https://www.redhat.com/favicon.ico" /> RHEL &nbsp;<img width="16" height="16" src="https://almalinux.org/fav/favicon.ico" /> AlmaLinux &nbsp;<img width="16" height="16" src="https://rockylinux.org/favicon.png" /> Rocky &nbsp;<img width="16" height="16" src="https://www.oracle.com/asset/web/favicons/favicon-32.png" /> Oracle | 8, 9, 10 | 512 MB \* | 5 GB | | <img width="16" height="16" src="https://www.redhat.com/favicon.ico" /> RHEL &nbsp;<img width="16" height="16" src="https://almalinux.org/fav/favicon.ico" /> AlmaLinux &nbsp;<img width="16" height="16" src="https://rockylinux.org/favicon.png" /> Rocky &nbsp;<img width="16" height="16" src="https://www.oracle.com/asset/web/favicons/favicon-32.png" /> Oracle | 8, 9, 10 | 512 MB \* | 5 GB |
| <img width="16" height="16" src="https://opencloudos.org/qq.ico" /> OpenCloudOS | 8, 9, Stream 23 | 512 MB \* | 5 GB | | <img width="16" height="16" src="https://opencloudos.org/qq.ico" /> OpenCloudOS | 8, 9, Stream 23 | 512 MB \* | 5 GB |
| <img width="16" height="16" src="https://www.centos.org/assets/icons/favicon.svg" /> CentOS Stream | 9, 10 | 512 MB \* | 5 GB | | <img width="16" height="16" src="https://www.centos.org/assets/icons/favicon.svg" /> CentOS Stream | 9, 10 | 512 MB \* | 5 GB |
| <img width="16" height="16" src="https://fedoraproject.org/favicon.ico" /> Fedora | 42, 43 | 512 MB \* | 5 GB | | <img width="16" height="16" src="https://fedoraproject.org/favicon.ico" /> Fedora | 43, 44 | 512 MB \* | 5 GB |
| <img width="16" height="16" src="https://www.openeuler.org/favicon.ico" /> openEuler | 20.03 LTS - 24.03 LTS, 25.09 | 512 MB \* | 5 GB | | <img width="16" height="16" src="https://www.openeuler.org/favicon.ico" /> openEuler | 20.03 LTS - 24.03 LTS | 512 MB \* | 5 GB |
| <img width="16" height="16" src="https://static.opensuse.org/favicon.ico" /> openSUSE | Leap 15.6, 16.0, Tumbleweed (滚动) | 512 MB \* | 5 GB | | <img width="16" height="16" src="https://static.opensuse.org/favicon.ico" /> openSUSE | Leap 15.6, 16.0, Tumbleweed (滚动) | 512 MB \* | 5 GB |
| <img width="16" height="16" src="https://nixos.org/favicon.svg" /> NixOS | 25.11 | 512 MB | 5 GB | | <img width="16" height="16" src="https://nixos.org/favicon.svg" /> NixOS | 25.11 | 512 MB | 5 GB |
| <img width="16" height="16" src="https://archlinux.org/static/favicon.png" /> Arch | 滚动 | 512 MB | 5 GB | | <img width="16" height="16" src="https://archlinux.org/static/favicon.png" /> Arch | 滚动 | 512 MB | 5 GB |
@ -149,7 +149,7 @@ certutil -urlcache -f -split https://cnb.cool/bin456789/reinstall/-/git/raw/main
- 用户名为 `root`,脚本会提示输入密码,不输入则使用随机密码 - 用户名为 `root`,脚本会提示输入密码,不输入则使用随机密码
- 安装最新版可不输入版本号 - 安装最新版可不输入版本号
- 最大化利用磁盘空间:不含 boot 分区Fedora 例外),不含 swap 分区 - 最大化利用磁盘空间:不含 boot swap 分区
- 自动根据机器类型选择不同的优化内核,例如 `Cloud``HWE` 内核 - 自动根据机器类型选择不同的优化内核,例如 `Cloud``HWE` 内核
- 安装 Red Hat 时需填写 <https://access.redhat.com/downloads/content/rhel> 得到的 `qcow2` 镜像链接,也可以安装其它类 RHEL 系统的 `qcow2`,例如 `Alibaba Cloud Linux``TencentOS Server` - 安装 Red Hat 时需填写 <https://access.redhat.com/downloads/content/rhel> 得到的 `qcow2` 镜像链接,也可以安装其它类 RHEL 系统的 `qcow2`,例如 `Alibaba Cloud Linux``TencentOS Server`
- 重装后如需修改 SSH 端口或者改成密钥登录,注意还要修改 `/etc/ssh/sshd_config.d/` 里面的文件 - 重装后如需修改 SSH 端口或者改成密钥登录,注意还要修改 `/etc/ssh/sshd_config.d/` 里面的文件
@ -163,11 +163,11 @@ bash reinstall.sh anolis 7|8|23
centos 9|10 centos 9|10
fnos 1 fnos 1
nixos 25.11 nixos 25.11
fedora 42|43 fedora 43|44
debian 9|10|11|12|13 debian 9|10|11|12|13
openeuler 20.03|22.03|24.03
alpine 3.20|3.21|3.22|3.23 alpine 3.20|3.21|3.22|3.23
opensuse 15.6|16.0|tumbleweed opensuse 15.6|16.0|tumbleweed
openeuler 20.03|22.03|24.03|25.09
ubuntu 18.04|20.04|22.04|24.04|26.04 [--minimal] ubuntu 18.04|20.04|22.04|24.04|26.04 [--minimal]
kali kali
arch arch

View File

@ -84,11 +84,11 @@ Usage: $reinstall_____ anolis 7|8|23
centos 9|10 centos 9|10
fnos 1 fnos 1
nixos 25.11 nixos 25.11
fedora 42|43 fedora 43|44
debian 9|10|11|12|13 debian 9|10|11|12|13
openeuler 20.03|22.03|24.03
alpine 3.20|3.21|3.22|3.23 alpine 3.20|3.21|3.22|3.23
opensuse 15.6|16.0|tumbleweed opensuse 15.6|16.0|tumbleweed
openeuler 20.03|22.03|24.03|25.09
ubuntu 18.04|20.04|22.04|24.04|26.04 [--minimal] ubuntu 18.04|20.04|22.04|24.04|26.04 [--minimal]
kali kali
arch arch
@ -1910,12 +1910,12 @@ verify_os_name() {
'rocky 8|9|10' \ 'rocky 8|9|10' \
'oracle 8|9|10' \ 'oracle 8|9|10' \
'fnos 1' \ 'fnos 1' \
'fedora 42|43' \ 'fedora 43|44' \
'nixos 25.11' \ 'nixos 25.11' \
'debian 9|10|11|12|13' \ 'debian 9|10|11|12|13' \
'opensuse 15.6|16.0|tumbleweed' \ 'opensuse 15.6|16.0|tumbleweed' \
'alpine 3.20|3.21|3.22|3.23' \ 'alpine 3.20|3.21|3.22|3.23' \
'openeuler 20.03|22.03|24.03|25.09' \ 'openeuler 20.03|22.03|24.03' \
'ubuntu 18.04|20.04|22.04|24.04|26.04' \ 'ubuntu 18.04|20.04|22.04|24.04|26.04' \
'redhat' \ 'redhat' \
'kali' \ 'kali' \

View File

@ -3481,8 +3481,9 @@ modify_linux() {
find_and_mount() { find_and_mount() {
mount_point=$1 mount_point=$1
mount_dev=$(awk "\$2==\"$mount_point\" {print \$1}" $os_dir/etc/fstab) mount_dev=$(awk "\$2==\"$mount_point\" {print \$1}" $os_dir/etc/fstab)
mount_opts=$(awk "\$2==\"$mount_point\" {print \$4}" $os_dir/etc/fstab)
if [ -n "$mount_dev" ]; then if [ -n "$mount_dev" ]; then
mount $mount_dev $os_dir$mount_point mount -o "$mount_opts" "$mount_dev" "$os_dir$mount_point"
fi fi
} }
@ -3510,9 +3511,13 @@ EOF
# 防止删除 cloud-init / 安装 firmware 时不够内存 # 防止删除 cloud-init / 安装 firmware 时不够内存
create_swap_if_ram_less_than 2048 $os_dir/swapfile create_swap_if_ram_less_than 2048 $os_dir/swapfile
find_and_mount /boot
find_and_mount /boot/efi
mount_pseudo_fs $os_dir mount_pseudo_fs $os_dir
# find_and_mount /boot
# find_and_mount /boot/efi
# fedora 的 fstab 还有 /home /var因此用 mount -a
chroot $os_dir mount -a
cp_resolv_conf $os_dir cp_resolv_conf $os_dir
# 可以直接用 alpine 的 cloud-init 生成 Network Manager 配置 # 可以直接用 alpine 的 cloud-init 生成 Network Manager 配置