From 64548447663f2a97a8feab34fcd92bca021fcd28 Mon Sep 17 00:00:00 2001 From: "Joshua M. Boniface" Date: Sat, 15 Jun 2019 17:24:14 -0400 Subject: [PATCH] Theme the EFI Grub menu --- buildiso.sh | 3 ++- grub.cfg | 16 ++++------------ isolinux.cfg | 2 +- theme.txt | 22 ++++++++++++++++++++++ 4 files changed, 29 insertions(+), 14 deletions(-) create mode 100644 theme.txt diff --git a/buildiso.sh b/buildiso.sh index c96db3c..55abaf0 100755 --- a/buildiso.sh +++ b/buildiso.sh @@ -130,8 +130,9 @@ prepare_rootfs() { build_iso() { echo -n "Copying live boot configurations... " sudo cp -a grub.cfg ${tempdir}/installer/boot/grub/grub.cfg &>/dev/null || fail "Error copying grub.cfg file." + sudo cp -a theme.txt ${tempdir}/installer/boot/grub/theme.txt &>/dev/null || fail "Error copying theme.txt file." sudo cp -a isolinux.cfg ${tempdir}/installer/isolinux/isolinux.cfg &>/dev/null || fail "Error copying isolinux.cfg file." - sudo cp -a splash.png ${tempdir}/installer/isolinux/splash.png &>/dev/null || fail "Error copying splash.png file." + sudo cp -a splash.png ${tempdir}/installer/splash.png &>/dev/null || fail "Error copying splash.png file." echo "done." echo -n "Creating LiveCD ISO... " diff --git a/grub.cfg b/grub.cfg index 43d23e8..8d6158a 100644 --- a/grub.cfg +++ b/grub.cfg @@ -10,25 +10,17 @@ if loadfont $prefix/font.pf2 ; then terminal_output gfxterm fi -if background_image /isolinux/splash.png; then - set color_normal=light-gray/black - set color_highlight=white/black -elif background_image /splash.png; then - set color_normal=light-gray/black - set color_highlight=white/black -else - set menu_color_normal=cyan/blue - set menu_color_highlight=white/blue -fi +background_image /splash.png +set theme=($root)/boot/grub/theme.txt insmod play play 960 440 1 0 4 440 1 if [ ${iso_path} ] ; then -set loopback="findiso=${iso_path}" + set loopback="findiso=${iso_path}" fi set timeout=10 -menuentry "PVC Live Installer TEST" { +menuentry "PVC Live Installer" { linux /live/vmlinuz boot=live components splash quiet "${loopback}" initrd /live/initrd.img } diff --git a/isolinux.cfg b/isolinux.cfg index 17dde86..df79073 100644 --- a/isolinux.cfg +++ b/isolinux.cfg @@ -4,7 +4,7 @@ timeout 100 UI vesamenu.c32 -MENU background splash.png +MENU background /splash.png MENU color title * #FFFFFFFF * MENU color border * #00000000 #00000000 none MENU color sel * #ffffffff #76a1d0ff * diff --git a/theme.txt b/theme.txt new file mode 100644 index 0000000..654252c --- /dev/null +++ b/theme.txt @@ -0,0 +1,22 @@ +title-text: "" +desktop-image: "/splash.png" +terminal-width: "800" +terminal-height: "600" ++ boot_menu { + top = 40% + left = 24% + width = 60% + height = 20% + item_color = "#AAAAAA" + selected_item_color = "#FFFFFF" + item_spacing = 1 +} ++ progress_bar { + id = "__timeout__" + top = 90% + left = 30% + width = 40% + height = 1 + bg_color = "#000000" + fg_color = "#4444DD" +}