… then go to the last comment where I give a new script file you can add to grub, written by please_try_again which looks like this:
#!/bin/sh -e
set -e
prefix=/usr
exec_prefix=/usr
. /usr/share/grub2/grub-mkconfig_lib
COLOR_NORMAL="black/black"
COLOR_HIGHLIGHT="white/black"
if "${GRUB_TERMINAL_OUTPUT}" = "gfxterm" ] ; then
cat <<EOF
set color_normal=${COLOR_NORMAL}
set color_highlight=${COLOR_HIGHLIGHT}
EOF
else
cat << EOF
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
EOF
fi
It gets saved as the file: /etc/grub.d/05_menu_color and marked executable. Then you must run the update grub command: sudo /usr/sbin/grub2-mkconfig --output=/boot/grub2/grub.cfg
This solution was in the link I have already provided to you so please check it out.
Very simple: by using os-prober 1.55 from my repo. I fixed this bug a while ago (since version 1.53, I guess). I don’t know if it is fixed upstream. I don’t think so.
Here’s an example.
Let’s look for Fedora with os-prober 1.49 shipped with openSUSE 12.2
# **rpm -qa os-prober**
os-prober-1.49-2.1.2.x86_64
# **os-prober**
No volume groups found
/dev/sda1:Windows NT/2000/XP (loader):Windows:chain
/dev/sda13:Fedora release 16 (Verne):Fedora:linux
/dev/sda15:Debian GNU/Linux (squeeze/sid):Debian:linux
/dev/sda6:Ubuntu 12.04.1 LTS (12.04):Ubuntu:linux
/dev/sdb1:Windows NT/2000/XP (loader):Windows1:chain
/dev/sdb6:Arch Linux (rolling):archlinux:linux
# **linux-boot-prober /dev/sda13**
/dev/sda13:/dev/sda13::/boot/vmlinuz-3.4.9-1.fc16.x86_64:/boot/initramfs-3.4.9-1.fc16.x86_64.img:root=/dev/sda13
/dev/sda13:/dev/sda13::/boot/vmlinuz-3.4.9-2.fc16.x86_64:/boot/initramfs-3.4.9-2.fc16.x86_64.img:root=/dev/sda13
Look for os-prober updates (you need to install and refresh my repo):
# **zypper up os-prober**
Loading repository data...
Reading installed packages...
There is an update candidate for 'os-prober', but it is from different vendor. Use '**zypper install os-prober-1.55-100.1.x86_64**' to install this candidate.
Resolving package dependencies...
Nothing to do.
Install it as suggested above:
**# zypper install os-prober-1.55-100.1.x86_64**
Loading repository data...
Reading installed packages...
Resolving package dependencies...
The following package is going to be upgraded:
os-prober
The following package is going to change vendor:
os-prober openSUSE -> obs://build.opensuse.org/home:please_try_again
1 package to upgrade, 1 to change vendor.
Overall download size: 31.7 KiB. After the operation, additional 7.6 KiB will be used.
Continue? [y/n/?] (y): y
Retrieving package os-prober-1.55-100.1.x86_64 (1/1), 31.7 KiB ( 83.8 KiB unpacked)
Retrieving: os-prober-1.55-100.1.x86_64.rpm ..................................................[done]
Installing: os-prober-1.55-100.1 .............................................................[done]
And noticed that in case you’re going to trust me and add my repo, installing and running updategrub* once would just fix the menu color too (Sorry James, but … this feature has been in updateGrub2 since 12.1 - well, didnd’t work under 12.2 until I fixed a path which has changed) .
Just make sure that updategrub points to updateGrub2 - which might not be the case if you have both Grub2 and Legacy Grub installed (some people do).
I think all of your work is great please_try_again as I am only trying to work with what we get for Grub 2 and allowed to add as in the color changer. I think your body of work for Grub 2 deserves an article where you can explain and present your alternatives if you wish to.
I think I already did in several articles and many many posts … but I’m not such a great writer… and also need my wife to correct my articles (this explains the difference in quality of my english writing between my few articles an most of my posts, because I can not ask my wife to read everything).
There is nothing wrong with using os-prober 1.55 under openSUSE 12.2, and I would suggest anyone serious about multibooting to use this version.
There is AFAIK nothing wrong with using updategrub* on BIOS systems either (instead of sudo /usr/sbin/grub2-mkconfig --output=/boot/grub2/grub.cfg) … and if there is something wrong, I’ll fix it. updategrub does nothing less than /usr/bin/grub2-mkconfig, it does more … and could do a lot more if I had more time, although I would rather add features in os-prober directly (such as UEFI support for example). Another thing that could be implemented is sorting menu entries (the feature already exists in updateLegacyGrub) I’m thinking about it… :\
Notice ‘updategrub’ is a symlink:
under openSUSE <= 12.1: updategrub -> updateLegacyGrub
under openSUSE >= 12.2: updategrub -> updateGrub2
Yes, something like that. I haven’t looked at the code yet, but I agree with the concept. I would mount (all) fat32 partitions which GUID starts with C12A7328 (otherwise they are ordinary FAT32 partitions and not ESP) and look for efi boot loaders, then parse the output in /etc/grub.d/30_os-prober to write boot entries. Sounds good.
Could you test it with os-prober 1.55 in my repo?
Actually Andrey, you know what? I was thinking about asking you to add UEFI support to os-prober, because I don’t have time (but knew it wouldn’t be very complicated, not that I don’t trust you to do more complicated things though. ;))
If it works, I would add your patch to os-prober 1.55 in my repo. As for passing all these patches upstream … I’d need a secretary or a social person to take care of this.
That’s not possible with GRUB2 ATM. This requires adding “entry field” support to theme first. Or completely redesigning graphical menu, which is even less likely.
I don’t believe it. Please post the output of these commands:
# os-prober
# updateGrub2 -d
If you’re talking about openSUSE boot kernel options, it has nothing to do with os-prober though. os-prober ignores the host OS kernels. If the openSUSE boot options are truncated, look at the value of DEFAULT_APPEND in /etc/sysconfig/bootloader (assuming it is still used for Grub2, but I dont’ see why not).
>
> Hans_Linux;2492045 Wrote:
>> Thanks,
>> How can I get rid of the green background color in the box so I
can
>> the what comes up?
>>
>> Hans
>
> Download and run my Grub2Cmd bash script: ‘GNU Grub2 Command
> Help/Config Editor - Version: 1.85 - Blogs - openSUSE Forums’
> (http://tinyurl.com/7b2zspv)
>
> … then go to the last comment where I give a new script file
you can
> add to grub, written by please_try_again which looks like this:
>
>
> Code:
> --------------------
> #!/bin/sh -e
> set -e
>
> prefix=/usr
> exec_prefix=/usr
>
> . /usr/share/grub2/grub-mkconfig_lib
>
> COLOR_NORMAL=“black/black”
> COLOR_HIGHLIGHT=“white/black”
>
> if “${GRUB_TERMINAL_OUTPUT}” = “gfxterm” ] ; then
> cat <<EOF
> set color_normal=${COLOR_NORMAL}
> set color_highlight=${COLOR_HIGHLIGHT}
> EOF
> else
> cat << EOF
> set menu_color_normal=white/black
> set menu_color_highlight=black/light-gray
> EOF
> fi
> --------------------
>
>
> It gets saved as the file: /etc/grub.d/05_menu_color and
marked
> executable. Then you must run the update grub command: sudo
> /usr/sbin/grub2-mkconfig --output=/boot/grub2/grub.cfg
>
> This solution was in the link I have already provided to you so
please
> check it out.
>
> Thank You,
>
>
James just tried your script mentioned above:
I did the following:
Installed Grub2Cmd Version 1.85
Then started Grub2Cmd and gave it root password.
Next I selected option 2 (Grub 2 File Editor Menu)
Entered A on bottom Line
it asked for file name; Used 05_menu_color
asked again for root pass work, i entered it and it
brought up Kwrite. Pasted the script from your email in it and
saved it to /etc/grub.d/05_menu_color.
I then cd to /etc/grub.d and made the file executable
Code
-rwxr-xr-x 1 root root 471 Oct 1 14:34 /etc/grub.d/05_menu_color
/usr/sbin/grub2-mkconfig --output=/boot/grub2/grub.cfg
Generating grub.cfg …
Found theme: /boot/grub2/themes/openSUSE/theme.txt
Found background: /boot/grub2/themes/openSUSE/background.png
/etc/grub.d/05_menu_color: line 1: #!/bin/sh: No such file or
directory
/etc/grub.d/05_menu_color: line 2: $’\302\240\302\240set’: command
not found
/etc/grub.d/05_menu_color: line 3: $’\302\240\302\240’: command
not found
/etc/grub.d/05_menu_color: line 4: prefix=/usr: No such file or
directory
/etc/grub.d/05_menu_color: line 5: exec_prefix=/usr: No such
file or directory
/etc/grub.d/05_menu_color: line 6: $’\302\240\302\240’: command
not found
/etc/grub.d/05_menu_color: line 7: $’\302\240\302\240.’: command
not found
/etc/grub.d/05_menu_color: line 8: $’\302\240\302\240’: command
not found
/etc/grub.d/05_menu_color: line 9: COLOR_NORMAL=black/black: No
such file or directory
/etc/grub.d/05_menu_color: line 10: COLOR_HIGHLIGHT=white/black:
No such file or directory
/etc/grub.d/05_menu_color: line 11: $’\302\240\302\240’: command
not found
/etc/grub.d/05_menu_color: line 12: syntax error near unexpected
token then' /etc/grub.d/05_menu_color: line 12: if
“${GRUB_TERMINAL_OUTPUT}” = “gfxterm” ] ; then’
if “${GRUB_TERMINAL_OUTPUT}” = “gfxterm” ] ; then
cat <<EOF
set color_normal=${COLOR_NORMAL}
set color_highlight=${COLOR_HIGHLIGHT}
EOF
else
cat << EOF
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
EOF
fi
Any Idea what I should look for?
Thanks for all your scripts they have helped me several times.
Russ
So if this was me, I would write the following data back again to this file /etc/grub.d/05_menu_color:
#!/bin/sh -e
set -e
prefix=/usr
exec_prefix=/usr
. /usr/share/grub2/grub-mkconfig_lib
COLOR_NORMAL="black/black"
COLOR_HIGHLIGHT="white/black"
if "${GRUB_TERMINAL_OUTPUT}" = "gfxterm" ] ; then
cat <<EOF
set color_normal=${COLOR_NORMAL}
set color_highlight=${COLOR_HIGHLIGHT}
EOF
else
cat << EOF
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
EOF
fi
The file gets set executable by default from grub2cmd when the file is first created and no need to do it again outside of grub2cmd. When I update the grub.cfg file, I can do so from my grub2cmd file using the main menu option “3) Update grub.cfg Menu (For All Changes!)”. When I run the update, I get this output:
Update of your grub.cfg menu file is now in progress. Please wait ...
root's password:
Generating grub.cfg ...
Found theme: /boot/grub2/themes/openSUSE/theme.txt
Found background: /boot/grub2/themes/openSUSE/background.png
Found linux image: /boot/vmlinuz-3.5.4-2.10-desktop
Found initrd image: /boot/initrd-3.5.4-2.10-desktop
Found linux image: /boot/vmlinuz-3.4.6-2.10-desktop
Found initrd image: /boot/initrd-3.4.6-2.10-desktop
Found Windows 7 (loader) on /dev/sdb1
done
Update Complete. Press Any Key to continue ...
I installed the the Grub2 editing script and changed the color to yellow text on blue background. I could not get a entry field on the boot menu. Was therefore forced to remove Grub2 and install traditional Grub. She has used OS 10.0 ~ 11.4 for several years. Can’t teach a 73 year old women to enter ‘e’, then search through a Grub script and enter various boot options.
As you say: “Software efficiency halves ‘AND SOFTWARE BLOAT INCREASES’ every 18 months, thus compensating for Moore’s Law.”
I still have the box of Suse “Slackware” I purchased in 1995. This ran with X on 10 MB drive on a 286 box. Yggdrasil from 1994. booted of a 720Kb floppy and ran with X from a CD or hard drive. Used these for years as “X-terminals” to connected to a DOS PC with Deskview X via 9,600 modems.
Nobody said that. And as I presume she’s not multi booting several Linux distros, it wasn’t an os-prober problem. However I know that the os-prober version shipped with openSUSE truncates kernel options from Grub menu (hence my suggestion to install version 1.55), it doesn’t affect the running system’s boot entries (openSUSE 12.2 in your case). Dunno why the boot options were truncated. It should not happen - unless you deleted them in YaST during setup, which in turn deleted them in /etc/sysconfig/bootloader. In this case, yes, you’d pretty much end up with truncated boot options - no matter which Grub version you use. But anyway, if you managed to replace Grub2 with Legacy Grub (it seems not to have worked for anyone with YaST), it should be fine. Well … we’ll wait for the next kernel update to find out.
>
> So if this was me, I would write the following data back again
to this
> file /etc/grub.d/05_menu_color:
>
>
> Code:
> --------------------
> #!/bin/sh -e
> set -e
>
> prefix=/usr
> exec_prefix=/usr
>
> . /usr/share/grub2/grub-mkconfig_lib
>
> COLOR_NORMAL=“black/black”
> COLOR_HIGHLIGHT=“white/black”
>
> if “${GRUB_TERMINAL_OUTPUT}” = “gfxterm” ] ; then
> cat <<EOF
> set color_normal=${COLOR_NORMAL}
> set color_highlight=${COLOR_HIGHLIGHT}
> EOF
> else
> cat << EOF
> set menu_color_normal=white/black
> set menu_color_highlight=black/light-gray
> EOF
> fi
>
> --------------------
>
>
> The file gets set executable by default from grub2cmd when the
file is
> first created and no need to do it again outside of grub2cmd.
When I
> update the grub.cfg file, I can do so from my grub2cmd file
using the
> main menu option “3) Update grub.cfg Menu (For All Changes!)”.
When I
> run the update, I get this output:
>
>
> Code:
> --------------------
> Update of your grub.cfg menu file is now in progress.
Please wait
> …
>
> root’s password:
> Generating grub.cfg …
> Found theme: /boot/grub2/themes/openSUSE/theme.txt
> Found background: /boot/grub2/themes/openSUSE/background.png
> Found linux image: /boot/vmlinuz-3.5.4-2.10-desktop
> Found initrd image: /boot/initrd-3.5.4-2.10-desktop
> Found linux image: /boot/vmlinuz-3.4.6-2.10-desktop
> Found initrd image: /boot/initrd-3.4.6-2.10-desktop
> Found Windows 7 (loader) on /dev/sdb1
> done
>
> Update Complete. Press Any Key to continue …
> --------------------
>
>
> So I am not sure what the problem might be…
>
> Thank You,
>
>
I’ll try it in the morning. I know your at least 2 hours later
than me Austin.
>
> So if this was me, I would write the following data back again
to this
> file /etc/grub.d/05_menu_color:
>
>
> Code:
> --------------------
> #!/bin/sh -e
> set -e
>
> prefix=/usr
> exec_prefix=/usr
>
> . /usr/share/grub2/grub-mkconfig_lib
>
> COLOR_NORMAL=“black/black”
> COLOR_HIGHLIGHT=“white/black”
>
> if “${GRUB_TERMINAL_OUTPUT}” = “gfxterm” ] ; then
> cat <<EOF
> set color_normal=${COLOR_NORMAL}
> set color_highlight=${COLOR_HIGHLIGHT}
> EOF
> else
> cat << EOF
> set menu_color_normal=white/black
> set menu_color_highlight=black/light-gray
> EOF
> fi
>
> --------------------
>
>
> The file gets set executable by default from grub2cmd when the
file is
> first created and no need to do it again outside of grub2cmd.
When I
> update the grub.cfg file, I can do so from my grub2cmd file
using the
> main menu option “3) Update grub.cfg Menu (For All Changes!)”.
When I
> run the update, I get this output:
>
>
> Code:
> --------------------
> Update of your grub.cfg menu file is now in progress.
Please wait
> …
>
> root’s password:
> Generating grub.cfg …
> Found theme: /boot/grub2/themes/openSUSE/theme.txt
> Found background: /boot/grub2/themes/openSUSE/background.png
> Found linux image: /boot/vmlinuz-3.5.4-2.10-desktop
> Found initrd image: /boot/initrd-3.5.4-2.10-desktop
> Found linux image: /boot/vmlinuz-3.4.6-2.10-desktop
> Found initrd image: /boot/initrd-3.4.6-2.10-desktop
> Found Windows 7 (loader) on /dev/sdb1
> done
>
> Update Complete. Press Any Key to continue …
> --------------------
>
>
> So I am not sure what the problem might be…
>
> Thank You,
>
James I took your suggestion and now I can read my edit Menu. i
will search Bugzilla and see if anyone has asked for a color
change of the text or the menu.