alpine: 添加 3.22

This commit is contained in:
bin456789 2025-05-30 23:53:16 +08:00
parent 1a156e9741
commit b58e09952e
No known key found for this signature in database
GPG Key ID: EE301B386DE6C11B
4 changed files with 21 additions and 14 deletions

View File

@ -31,7 +31,7 @@ The system requirements for the target system are as follows:
| System | Version | Memory | Disk | | System | Version | Memory | Disk |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------- | --------- | ---------------- | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------- | --------- | ---------------- |
| <img width="16" height="16" src="https://www.alpinelinux.org/alpine-logo.ico" /> Alpine | 3.18, 3.19, 3.20, 3.21 | 256 MB | 1 GB | | <img width="16" height="16" src="https://www.alpinelinux.org/alpine-logo.ico" /> Alpine | 3.19, 3.20, 3.21, 3.22 | 256 MB | 1 GB |
| <img width="16" height="16" src="https://www.debian.org/favicon.ico" /> Debian | 9, 10, 11, 12 | 256 MB | 1 ~ 1.5 GB ^ | | <img width="16" height="16" src="https://www.debian.org/favicon.ico" /> Debian | 9, 10, 11, 12 | 256 MB | 1 ~ 1.5 GB ^ |
| <img width="16" height="16" src="https://github.com/bin456789/reinstall/assets/7548515/f74b3d5b-085f-4df3-bcc9-8a9bd80bb16d" /> Kali | Rolling | 256 MB | 1 ~ 1.5 GB ^ | | <img width="16" height="16" src="https://github.com/bin456789/reinstall/assets/7548515/f74b3d5b-085f-4df3-bcc9-8a9bd80bb16d" /> Kali | Rolling | 256 MB | 1 ~ 1.5 GB ^ |
| <img width="16" height="16" src="https://documentation.ubuntu.com/server/_static/favicon.png" /> Ubuntu | 16.04 LTS - 24.04 LTS, 25.04 | 512 MB \* | 2 GB | | <img width="16" height="16" src="https://documentation.ubuntu.com/server/_static/favicon.png" /> Ubuntu | 16.04 LTS - 24.04 LTS, 25.04 | 512 MB \* | 2 GB |
@ -135,7 +135,7 @@ bash reinstall.sh anolis 7|8|23
nixos 25.05 nixos 25.05
debian 9|10|11|12 debian 9|10|11|12
opensuse 15.6|tumbleweed opensuse 15.6|tumbleweed
alpine 3.18|3.19|3.20|3.21 alpine 3.19|3.20|3.21|3.22
openeuler 20.03|22.03|24.03|25.03 openeuler 20.03|22.03|24.03|25.03
ubuntu 16.04|18.04|20.04|22.04|24.04|25.04 [--minimal] ubuntu 16.04|18.04|20.04|22.04|24.04|25.04 [--minimal]
kali kali

View File

@ -31,7 +31,7 @@
| 系统 | 版本 | 内存 | 硬盘 | | 系统 | 版本 | 内存 | 硬盘 |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------- | --------- | ------------ | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------- | --------- | ------------ |
| <img width="16" height="16" src="https://www.alpinelinux.org/alpine-logo.ico" /> Alpine | 3.18, 3.19, 3.20, 3.21 | 256 MB | 1 GB | | <img width="16" height="16" src="https://www.alpinelinux.org/alpine-logo.ico" /> Alpine | 3.19, 3.20, 3.21, 3.22 | 256 MB | 1 GB |
| <img width="16" height="16" src="https://www.debian.org/favicon.ico" /> Debian | 9, 10, 11, 12 | 256 MB | 1 ~ 1.5 GB ^ | | <img width="16" height="16" src="https://www.debian.org/favicon.ico" /> Debian | 9, 10, 11, 12 | 256 MB | 1 ~ 1.5 GB ^ |
| <img width="16" height="16" src="https://github.com/bin456789/reinstall/assets/7548515/f74b3d5b-085f-4df3-bcc9-8a9bd80bb16d" /> Kali | 滚动 | 256 MB | 1 ~ 1.5 GB ^ | | <img width="16" height="16" src="https://github.com/bin456789/reinstall/assets/7548515/f74b3d5b-085f-4df3-bcc9-8a9bd80bb16d" /> Kali | 滚动 | 256 MB | 1 ~ 1.5 GB ^ |
| <img width="16" height="16" src="https://documentation.ubuntu.com/server/_static/favicon.png" /> Ubuntu | 16.04 LTS - 24.04 LTS, 25.04 | 512 MB \* | 2 GB | | <img width="16" height="16" src="https://documentation.ubuntu.com/server/_static/favicon.png" /> Ubuntu | 16.04 LTS - 24.04 LTS, 25.04 | 512 MB \* | 2 GB |
@ -135,7 +135,7 @@ bash reinstall.sh anolis 7|8|23
nixos 25.05 nixos 25.05
debian 9|10|11|12 debian 9|10|11|12
opensuse 15.6|tumbleweed opensuse 15.6|tumbleweed
alpine 3.18|3.19|3.20|3.21 alpine 3.19|3.20|3.21|3.22
openeuler 20.03|22.03|24.03|25.03 openeuler 20.03|22.03|24.03|25.03
ubuntu 16.04|18.04|20.04|22.04|24.04|25.04 [--minimal] ubuntu 16.04|18.04|20.04|22.04|24.04|25.04 [--minimal]
kali kali

View File

@ -55,7 +55,7 @@ Usage: $reinstall_____ anolis 7|8|23
nixos 25.05 nixos 25.05
debian 9|10|11|12 debian 9|10|11|12
opensuse 15.6|tumbleweed opensuse 15.6|tumbleweed
alpine 3.18|3.19|3.20|3.21 alpine 3.19|3.20|3.21|3.22
openeuler 20.03|22.03|24.03|25.03 openeuler 20.03|22.03|24.03|25.03
ubuntu 16.04|18.04|20.04|22.04|24.04|25.04 [--minimal] ubuntu 16.04|18.04|20.04|22.04|24.04|25.04 [--minimal]
kali kali
@ -1830,7 +1830,7 @@ verify_os_name() {
'nixos 25.05' \ 'nixos 25.05' \
'debian 9|10|11|12' \ 'debian 9|10|11|12' \
'opensuse 15.6|16.0|tumbleweed' \ 'opensuse 15.6|16.0|tumbleweed' \
'alpine 3.18|3.19|3.20|3.21' \ 'alpine 3.19|3.20|3.21|3.22' \
'openeuler 20.03|22.03|24.03|25.03' \ 'openeuler 20.03|22.03|24.03|25.03' \
'ubuntu 16.04|18.04|20.04|22.04|24.04|25.04' \ 'ubuntu 16.04|18.04|20.04|22.04|24.04|25.04' \
'redhat' \ 'redhat' \

View File

@ -1403,6 +1403,18 @@ install_alpine() {
# 删除 setup-disk 时自动安装的包 # 删除 setup-disk 时自动安装的包
apk del e2fsprogs dosfstools efibootmgr grub* apk del e2fsprogs dosfstools efibootmgr grub*
# 如果没有挂载 /proc
# 1. chroot /os setup-keymap us us 会报错
# grep: /proc/filesystems: No such file or directory
# 2. 安装固件微码会触发 grub-probe如果没挂载会报错
# Executing grub-2.12-r5.trigger
# /usr/sbin/grub-probe: error: failed to get canonical path of `/dev/vda1'.
# ERROR: grub-2.12-r5.trigger: script exited with error 1
mount_pseudo_fs /os
# 安装到硬盘后才安装各种应用 # 安装到硬盘后才安装各种应用
# 避免占用 Live OS 内存 # 避免占用 Live OS 内存
@ -1432,7 +1444,9 @@ install_alpine() {
# 安装其他部件 # 安装其他部件
chroot /os setup-keymap us us chroot /os setup-keymap us us
chroot /os setup-timezone -i Asia/Shanghai chroot /os setup-timezone -i Asia/Shanghai
chroot /os setup-ntp chrony || true # 3.21 默认是 chrony
# 3.22 默认是 busybox ntp
printf '\n' | chroot /os setup-ntp || true
# 设置公钥 # 设置公钥
if is_need_set_ssh_keys; then if is_need_set_ssh_keys; then
@ -1454,13 +1468,6 @@ install_alpine() {
cp /configs/frpc.toml /os/etc/frp/frpc.toml cp /configs/frpc.toml /os/etc/frp/frpc.toml
fi fi
# 安装固件微码会触发 grub-probe
# 如果没挂载会报错
# Executing grub-2.12-r5.trigger
# /usr/sbin/grub-probe: error: failed to get canonical path of `/dev/vda1'.
# ERROR: grub-2.12-r5.trigger: script exited with error 1
mount_pseudo_fs /os
# setup-disk 会自动选择固件,但不包括微码? # setup-disk 会自动选择固件,但不包括微码?
# https://github.com/alpinelinux/alpine-conf/blob/3.18.1/setup-disk.in#L421 # https://github.com/alpinelinux/alpine-conf/blob/3.18.1/setup-disk.in#L421
if fw_pkgs="$fw_pkgs $(get_ucode_firmware_pkgs)" && [ -n "$fw_pkgs" ]; then if fw_pkgs="$fw_pkgs $(get_ucode_firmware_pkgs)" && [ -n "$fw_pkgs" ]; then