1
0
Fork 0

linux-setup.sh: install the 64k kernel if on RHEL

This commit is contained in:
Pratham Patel 2024-02-10 14:02:09 +05:30
parent c9a003f1da
commit 7b8a8cbe7b
Signed by: thefossguy
SSH Key Fingerprint: SHA256:/B3wAg7jnMEBQ2JwkebbS/eXVZANDmqRfnd9QkIhxMI
1 changed files with 11 additions and 0 deletions

View File

@ -100,6 +100,13 @@ function enable_epel() {
sudo dnf install --assumeyes epel-release
fi
}
function install_64k_kernel() {
sudo dnf install -y kernel-64k
KERNEL_64K=$(echo /boot/vmlinuz*64k)
sudo grubby --set-default="${KERNEL_64K}" \
--update-kernel="${KERNEL_64K}" \
--args='crashkernel=2G-:640M'
}
function install_pkgs_rhel() {
sudo dnf clean expire-cache
enable_epel "$1"
@ -174,8 +181,12 @@ elif grep "ID_LIKE=*.rhel*." /etc/os-release > /dev/null; then
function linux_setup() {
dnf_conf
install_pkgs_rhel "${RHEL_VERSION}"
install_64k_kernel
enable_ssh_daemon_fedora
common_setup
echo '64K kernel has been installed and will be what gets used upon the next boot.'
# shellcheck disable=SC2016
echo 'Please run `sudo dnf erase kernel` upon the next boot.'
}
else
echo 'Unsupported Linux distribution.'