openSUSE 12.2 and 12.3 is using Grub2 by default and Grub2 has a whole new command set to learn. In order to help us all better use Grub2, I have put together a small script that shows all 24 commands I have found. When a command is selected, its default help, if present, will be displayed for you. You can then enter any command options for that command and press the enter key for them to be executed, as root, or just press the enter key to look at another command. In addition, I have found and allow you to view the included Grub2 manuals if you select Help. Grub2Cmd will detect if you have Grub2 or Grub2-efi installed and use the properly located menu file.
And Now, you have the option to edit any of the grub2 configuration files from the following menu. Your desktop will be determined, the correct SU command used and the proper Text Editor will be selected. I have added the ability to add a new script, to be executed on each update of your grub.cfg file. You can also delete a script file if you wish, but be careful to not delete existing script files here.
I have added a new function that allows you to select the default Grub 2 boot menu selection, even if it is included in the Advanced menu section. When changing the default Grub 2 boot selection, I have made some assumptions. The value “GRUB_DEFAULT=” can only exist once in the /etc/default/grub text file with no commented out duplicate entries that contain this same string value. I assume you still have/use the Advanced openSUSE grub 2 menu and have not removed it. Any grub 2 Linux Kernel menu entry used for Recovery can not be set as the default. Finally, when reverting back to the openSUSE grub 2 default for menu option 1, “GRUB_DEFAULT=saved” will be used.
The main menu allows you to determine just what framebuffer video modes are supported by grub 2. If you select the same and final resolution as used by your desktop, some slight speed up will be noticed. This is a list of fram buffer modes supported on my PC.
If you are not using a GPT Disk to boot Grub 2 in EFI mode and you still have an installed copy of Windows, you can use my new option to create a custom Windows boot menu option for Grub 2. Your hard disk(s) will be scanned for bootable NTFS partitions using fdisk.
So, if you are running openSUSE 12.2 and grub2 is detected as being installed, you can use the grub2cmd helper bash script I have written. This bash script I call grub2cmd can be obtained from SUSE Paste. I have written the grub2cmd bash script to reside in the ~/bin folder. Select the Download option in the top right using the link shown below and select open with Kwrite or another text editor. Then save the following text into the file called grub2cmd (as in /home/username/bin/grub2cmd):
It is possible to directly download the script from SUSE Paste using the following commands (You must delete the old version of grub2cmd first should one exist). Just open up a terminal session and copy the text from any code block show here and past it after the terminal prompt and then press enter:
wget -nc http://paste.opensuse.org/view/download/58627662 -O ~/bin/grub2cmd
Next, you need to mark the file grub2cmd as executable with the following command:
chmod +x ~/bin/grub2cmd
You can add all three commands above and run it as one. Just copy and paste the following command into a terminal session:
rm ~/bin/grub2cmd ; wget -nc http://paste.opensuse.org/view/download/58627662 -O ~/bin/grub2cmd ; chmod +x ~/bin/grub2cmd
To use grub2cmd run the terminal command:
Grub2Cmd now creates a desktop icon if it finds you are running the KDE desktop and a KDE menu icon. Settings for these icons exist at the top of the script should you wish to disable them.
In my grub2cmd bash script I have the frame buffer command there to determine what is supported. You then go into YaST / System Boot loader, or use the same option from my bash script, then Boot Loader Options, and enter the VGA mode number in the VGA Mode number block (I use 0x034d), right after the number of seconds the menu is to wait. Then on the bottom left, I enter the equivalent Console Resolution number, I am using 1920x1200, that equates to the mode number. I use the highest resolution the Frame Buffer command finds, which may not be the highest supported by your monitor if you are then loading a Proprietary Video Driver I have found. But, it must be a supported Frame Buffer Mode on your setup to work properly. Following this method allows the Plymouth display to work I have found.
The new openSUSE 12.2 Documentation has a nice write up on using Grub 2 that is worth reading which you can find here:
We have some additional Great Articles about Grub 2 you can find here:
If you have any questions or comment about using the bash script grub2cmd, just leave me a comment here.
Blogs: asroot : Bash : Packet Filter : C.F.U. : GPU’s : fewrup : F.S.M. : H.I. : nVIDIA : LNVHW : N.S.F. : S.A.K.C. : MMCHECK
S.A.S.I. : S.C.L.U. : S.G.T.B. : S.K.I.M. : S.L.A.V.E. : S.L.R.C. : S.T.A.R.T. : S.U.F.F. : SYSEdit : systemd : YaST Power