mirror of
https://github.com/bin456789/reinstall.git
synced 2025-01-31 10:58:06 +08:00
redhat: 修复用云镜像安装 fedara 时,启动项没禁用 selinux 和 crashkernel
This commit is contained in:
parent
f980d5448c
commit
1f648fceb3
13
trans.sh
13
trans.sh
@ -449,6 +449,15 @@ EOF
|
|||||||
}
|
}
|
||||||
|
|
||||||
modify_dd_os() {
|
modify_dd_os() {
|
||||||
|
find_and_mount() {
|
||||||
|
mount_point=$1
|
||||||
|
|
||||||
|
mount_dev=$(awk "\$2==\"$mount_point\" {print \$1}" $os_dir/etc/fstab)
|
||||||
|
if [ -n "$mount_dev" ]; then
|
||||||
|
mount $mount_dev $os_dir$mount_point
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
apk add lsblk
|
apk add lsblk
|
||||||
mkdir -p /os
|
mkdir -p /os
|
||||||
# 按分区容量大到小,依次寻找系统分区
|
# 按分区容量大到小,依次寻找系统分区
|
||||||
@ -470,10 +479,10 @@ modify_dd_os() {
|
|||||||
|
|
||||||
download_cloud_init_config $os_dir
|
download_cloud_init_config $os_dir
|
||||||
if [ -f $os_dir/etc/redhat-release ]; then
|
if [ -f $os_dir/etc/redhat-release ]; then
|
||||||
|
find_and_mount /boot
|
||||||
|
find_and_mount /boot/efi
|
||||||
disable_selinux_kdump $os_dir
|
disable_selinux_kdump $os_dir
|
||||||
fi
|
fi
|
||||||
|
|
||||||
umount /os
|
|
||||||
}
|
}
|
||||||
|
|
||||||
install_cloud_image_by_dd() {
|
install_cloud_image_by_dd() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user