From 78da23afce57080d43912d9513f3cc53b060d39e Mon Sep 17 00:00:00 2001 From: eailfly Date: Sun, 3 Nov 2019 19:42:27 +0800 Subject: [PATCH] set resolution for grub Make sure set the right resolution for grub for 2k and 4k --- install.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/install.sh b/install.sh index d3f5496..c678b11 100755 --- a/install.sh +++ b/install.sh @@ -112,9 +112,19 @@ install() { cp -an /etc/default/grub /etc/default/grub.bak grep "GRUB_THEME=" /etc/default/grub 2>&1 >/dev/null && sed -i '/GRUB_THEME=/d' /etc/default/grub + grep "GRUB_GFXMODE=" /etc/default/grub 2>&1 >/dev/null && sed -i '/GRUB_GFXMODE=/d' /etc/default/grub # Edit grub config echo "GRUB_THEME=\"${THEME_DIR}/${name}/theme.txt\"" >> /etc/default/grub + + # Make sure set the right resolution for grub + if [[ ${screen} == '4k' ]]; then + echo "GRUB_GFXMODE=3840x2160x32" >> /etc/default/grub + echo "GRUB_GFXPAYLOAD_LINUX=text" >> /etc/default/grub + elif [[ ${screen} == '2k' ]]; then + echo "GRUB_GFXMODE=2560×1440x32" >> /etc/default/grub + echo "GRUB_GFXPAYLOAD_LINUX=text" >> /etc/default/grub + fi # Update grub config prompt -i "\n Updating grub config..."