| Summary: | change grub2 background color | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | hhlp <hhlouzao> |
| Component: | grub2 | Assignee: | Peter Jones <pjones> |
| Status: | CLOSED NOTABUG | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | low | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 16 | CC: | dennis, mads, pjones |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2012-04-16 22:42:37 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
|
Description
hhlp
2011-12-06 19:10:00 UTC
as you can see in the answer there is a workaround but it isn't optimal...
I think there is two option:
1.- the first one ...
Edit /etc/default/grub and include this 2 line with its variables GRUB :
GRUB_COLOR_NORMAL="light-blue/black"
GRUB_COLOR_HIGHLIGHT="light-cyan/blue"
in any part of 00_headers files for example here after that :
make_timeout ()
{
if [ "x${1}" != "x" ] ; then
if [ "x${GRUB_HIDDEN_TIMEOUT_QUIET}" = "xtrue" ] ; then
verbose=
else
verbose=" --verbose"
fi
cat << EOF
if sleep$verbose --interruptible ${1} ; then
set timeout=${2}
fi
EOF
else
cat << EOF
set timeout=${2}
EOF
fi
}
set color_normal=${GRUB_COLOR_NORMAL}
set color_highlight=${GRUB_COLOR_HIGHLIGHT}
2.- isn't optimal but work modify the file 41_custom and permit access to grub variables:
set color_normal=${GRUB_COLOR_NORMAL}
set color_highlight=${GRUB_COLOR_HIGHLIGHT}
I think this option isn't well enough because this file isn't for this function....
I attach my /boot/grub2/grub.cfg :
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub2-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#
### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
load_env
fi
set default="0"
if [ "${prev_saved_entry}" ]; then
set saved_entry="${prev_saved_entry}"
save_env saved_entry
set prev_saved_entry=
save_env prev_saved_entry
set boot_once=true
fi
function savedefault {
if [ -z "${boot_once}" ]; then
saved_entry="${chosen}"
save_env saved_entry
fi
}
function load_video {
insmod vbe
insmod vga
insmod video_bochs
insmod video_cirrus
}
insmod part_msdos
insmod ext2
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set=root cb1f1dc3-a149-4a4e-93ba-034afef0f7b4
if loadfont /boot/grub2/unicode.pf2 ; then
set gfxmode=1280x960x16
load_video
insmod gfxterm
fi
terminal_output gfxterm
insmod part_msdos
insmod ext2
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set=root cb1f1dc3-a149-4a4e-93ba-034afef0f7b4
insmod png
background_image -m stretch /boot/grub2/wallpaper.png
set timeout=5
set color_normal=white/black <-------------------------- see
set color_highlight=light-cyan/black <-------------------------- see
### END /etc/grub.d/00_header ###
### BEGIN /etc/grub.d/10_linux ###
menuentry 'Fedora Linux, with Linux 3.1.2-1.fc16.x86_64' --class fedora --class gnu-linux --class gnu --class os {
load_video
set gfxpayload=keep
insmod gzio
insmod part_msdos
insmod ext2
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set=root cb1f1dc3-a149-4a4e-93ba-034afef0f7b4
echo 'Loading Linux 3.1.2-1.fc16.x86_64 ...'
linux /boot/vmlinuz-3.1.2-1.fc16.x86_64 root=UUID=cb1f1dc3-a149-4a4e-93ba-034afef0f7b4 ro rd.md=0 rd.lvm=0 rd.dm=0 quiet SYSFONT=latarcyrheb-sun16 rhgb rd.luks=0 LANG=es_ES.UTF-8 KEYTABLE=es
echo 'Loading initial ramdisk ...'
initrd /boot/initramfs-3.1.2-1.fc16.x86_64.img
}
menuentry 'Fedora Linux, with Linux 3.1.2-1.fc16.x86_64 (recovery mode)' --class fedora --class gnu-linux --class gnu --class os {
load_video
set gfxpayload=keep
insmod gzio
insmod part_msdos
insmod ext2
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set=root cb1f1dc3-a149-4a4e-93ba-034afef0f7b4
echo 'Loading Linux 3.1.2-1.fc16.x86_64 ...'
linux /boot/vmlinuz-3.1.2-1.fc16.x86_64 root=UUID=cb1f1dc3-a149-4a4e-93ba-034afef0f7b4 ro single rd.md=0 rd.lvm=0 rd.dm=0 quiet SYSFONT=latarcyrheb-sun16 rhgb rd.luks=0 LANG=es_ES.UTF-8 KEYTABLE=es
echo 'Loading initial ramdisk ...'
initrd /boot/initramfs-3.1.2-1.fc16.x86_64.img
}
menuentry 'Fedora Linux, with Linux 3.1.1-2.fc16.x86_64' --class fedora --class gnu-linux --class gnu --class os {
load_video
set gfxpayload=keep
insmod gzio
insmod part_msdos
insmod ext2
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set=root cb1f1dc3-a149-4a4e-93ba-034afef0f7b4
echo 'Loading Linux 3.1.1-2.fc16.x86_64 ...'
linux /boot/vmlinuz-3.1.1-2.fc16.x86_64 root=UUID=cb1f1dc3-a149-4a4e-93ba-034afef0f7b4 ro rd.md=0 rd.lvm=0 rd.dm=0 quiet SYSFONT=latarcyrheb-sun16 rhgb rd.luks=0 LANG=es_ES.UTF-8 KEYTABLE=es
echo 'Loading initial ramdisk ...'
initrd /boot/initramfs-3.1.1-2.fc16.x86_64.img
}
menuentry 'Fedora Linux, with Linux 3.1.1-2.fc16.x86_64 (recovery mode)' --class fedora --class gnu-linux --class gnu --class os {
load_video
set gfxpayload=keep
insmod gzio
insmod part_msdos
insmod ext2
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set=root cb1f1dc3-a149-4a4e-93ba-034afef0f7b4
echo 'Loading Linux 3.1.1-2.fc16.x86_64 ...'
linux /boot/vmlinuz-3.1.1-2.fc16.x86_64 root=UUID=cb1f1dc3-a149-4a4e-93ba-034afef0f7b4 ro single rd.md=0 rd.lvm=0 rd.dm=0 quiet SYSFONT=latarcyrheb-sun16 rhgb rd.luks=0 LANG=es_ES.UTF-8 KEYTABLE=es
echo 'Loading initial ramdisk ...'
initrd /boot/initramfs-3.1.1-2.fc16.x86_64.img
}
### END /etc/grub.d/10_linux ###
### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###
### BEGIN /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_os-prober ###
### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###
### BEGIN /etc/grub.d/41_custom ###
if [ -f $prefix/custom.cfg ]; then
source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###
### BEGIN /etc/grub.d/90_persistent ###
### END /etc/grub.d/90_persistent ###
I could make the patch but i don't know why the follow variables aren't availables or I'm missing something :
GRUB_COLOR_NORMAL
GRUB_COLOR_HIGHLIGHT
P.S : i modify /boot/grub2/grub.cfg manualy to probe that this option will work well....
grub2 do not have any support for specifying the colors directly in /etc/default/grub . There is no indication that GRUB_COLOR_NORMAL and GRUB_COLOR_HIGHLIGHT should work. The right way to set the color is to create a theme and specify GRUB_THEME in /etc/default/grub. |