mirror of
https://github.com/bin456789/reinstall.git
synced 2025-01-18 20:39:14 +08:00
redhat: 修复两步安装下el8卡在安装界面的bug
This commit is contained in:
parent
7ad7295844
commit
e7d7a03d96
26
redhat.cfg
26
redhat.cfg
@ -49,19 +49,21 @@ done
|
||||
include=/tmp/include-packages-for-resize
|
||||
touch $include
|
||||
if [ -e /dev/disk/by-label/installer ]; then
|
||||
# 1g内存下,安装器默认开启了zram ,但安装f38还是不够内存,所以还要开启swap
|
||||
mkdir /installer
|
||||
mount /dev/disk/by-label/installer /installer
|
||||
mount /dev/disk/by-label/installer /installer -o remount,rw
|
||||
swapfile=/installer/swapfile
|
||||
if command -v fallocate; then
|
||||
fallocate -l 1GiB $swapfile
|
||||
else
|
||||
dd if=/dev/zero of=$swapfile bs=1MiB count=1024
|
||||
# 1g内存下,安装器默认开启了zram ,但安装f38还是不够内存
|
||||
# 具体表现为不断重启安装界面,所以还要开启swap
|
||||
ram_size=$(lsmem -b 2>/dev/null | grep 'Total online memory:' | awk '{ print $NF/1024/1024 }')
|
||||
if [ -z $ram_size ] || [ $ram_size -le 1024 ]; then
|
||||
mount /dev/disk/by-label/installer /run/install/repo -o remount,rw
|
||||
swapfile=/run/install/repo/swapfile
|
||||
if command -v fallocate; then
|
||||
fallocate -l 1G $swapfile
|
||||
else
|
||||
dd if=/dev/zero of=$swapfile bs=1M count=1024
|
||||
fi
|
||||
chmod 0600 $swapfile
|
||||
mkswap $swapfile
|
||||
swapon $swapfile
|
||||
fi
|
||||
chmod 0600 $swapfile
|
||||
mkswap $swapfile
|
||||
swapon $swapfile
|
||||
|
||||
# feroda 默认不包含 cronie
|
||||
echo cronie >>$include
|
||||
|
Loading…
x
Reference in New Issue
Block a user