mirror of
https://github.com/bin456789/reinstall.git
synced 2025-01-31 19:08:07 +08:00
alpine: 支持 v3.19
This commit is contained in:
parent
4fd0011bd7
commit
5327fe2e20
@ -43,7 +43,7 @@ bash reinstall.sh centos 7|8|9 (8|9 为 stream 版本)
|
|||||||
fedora 37|38
|
fedora 37|38
|
||||||
debian 10|11|12
|
debian 10|11|12
|
||||||
ubuntu 20.04|22.04
|
ubuntu 20.04|22.04
|
||||||
alpine 3.16|3.17|3.18
|
alpine 3.16|3.17|3.18|3.19
|
||||||
opensuse 15.4|15.5|tumbleweed (只支持云镜像)
|
opensuse 15.4|15.5|tumbleweed (只支持云镜像)
|
||||||
arch (只支持 amd64 云镜像)
|
arch (只支持 amd64 云镜像)
|
||||||
gentoo (只支持 amd64 云镜像)
|
gentoo (只支持 amd64 云镜像)
|
||||||
|
11
reinstall.sh
11
reinstall.sh
@ -24,7 +24,7 @@ Usage: reinstall.sh centos 7|8|9
|
|||||||
fedora 37|38
|
fedora 37|38
|
||||||
debian 10|11|12
|
debian 10|11|12
|
||||||
ubuntu 20.04|22.04
|
ubuntu 20.04|22.04
|
||||||
alpine 3.16|3.17|3.18
|
alpine 3.16|3.17|3.18|3.19
|
||||||
opensuse 15.4|15.5|tumbleweed
|
opensuse 15.4|15.5|tumbleweed
|
||||||
arch
|
arch
|
||||||
gentoo
|
gentoo
|
||||||
@ -619,7 +619,7 @@ verify_os_name() {
|
|||||||
'fedora 37|38' \
|
'fedora 37|38' \
|
||||||
'debian 10|11|12' \
|
'debian 10|11|12' \
|
||||||
'ubuntu 20.04|22.04' \
|
'ubuntu 20.04|22.04' \
|
||||||
'alpine 3.16|3.17|3.18' \
|
'alpine 3.16|3.17|3.18|3.19' \
|
||||||
'opensuse 15.4|15.5|tumbleweed' \
|
'opensuse 15.4|15.5|tumbleweed' \
|
||||||
'arch' \
|
'arch' \
|
||||||
'gentoo' \
|
'gentoo' \
|
||||||
@ -1356,8 +1356,8 @@ if is_netboot_xyz ||
|
|||||||
}; }; then
|
}; }; then
|
||||||
setos nextos $distro $releasever
|
setos nextos $distro $releasever
|
||||||
else
|
else
|
||||||
# alpine 作为中间系统时,使用 3.18
|
# alpine 作为中间系统时,使用 3.19
|
||||||
alpine_ver_for_trans=3.18
|
alpine_ver_for_trans=3.19
|
||||||
setos finalos $distro $releasever
|
setos finalos $distro $releasever
|
||||||
setos nextos alpine $alpine_ver_for_trans
|
setos nextos alpine $alpine_ver_for_trans
|
||||||
fi
|
fi
|
||||||
@ -1428,7 +1428,8 @@ if is_use_grub; then
|
|||||||
# linux grub
|
# linux grub
|
||||||
if ! is_in_windows; then
|
if ! is_in_windows; then
|
||||||
if is_have_cmd update-grub; then
|
if is_have_cmd update-grub; then
|
||||||
grub_cfg=$(grep -o '[^ ]*grub.cfg' "$(get_cmd_path update-grub)")
|
# alpine debian ubuntu
|
||||||
|
grub_cfg=$(grep -o '[^ ]*grub.cfg' "$(get_cmd_path update-grub)" | head -1)
|
||||||
else
|
else
|
||||||
# 找出主配置文件(含有menuentry|blscfg)
|
# 找出主配置文件(含有menuentry|blscfg)
|
||||||
# 如果是efi,先搜索efi目录
|
# 如果是efi,先搜索efi目录
|
||||||
|
5
trans.sh
5
trans.sh
@ -660,6 +660,11 @@ EOF
|
|||||||
export BOOTLOADER="grub"
|
export BOOTLOADER="grub"
|
||||||
printf 'y' | setup-disk -m sys -k $kernel_flavor /os
|
printf 'y' | setup-disk -m sys -k $kernel_flavor /os
|
||||||
|
|
||||||
|
# 3.19 或以上,非 efi 需要手动安装 grub
|
||||||
|
if ! is_efi && grep -F '3.19' /etc/alpine-release; then
|
||||||
|
grub-install --boot-directory=/os/boot --target=i386-pc /dev/$xda
|
||||||
|
fi
|
||||||
|
|
||||||
# 是否保留 swap
|
# 是否保留 swap
|
||||||
if [ -e /os/swapfile ]; then
|
if [ -e /os/swapfile ]; then
|
||||||
if false; then
|
if false; then
|
||||||
|
Loading…
x
Reference in New Issue
Block a user