* Andrey Borzenkov
В Tue, 29 Jan 2013 13:25:48 -0500 Patrick Shanahan
пишет: * Andrey Borzenkov
[01-29-13 13:03]: В Tue, 29 Jan 2013 12:50:33 -0500 Roman Bysh
пишет: First off, never edit the "grub.cfg" file manually due to the fact that when you run grub2-mkconfig command, all of the manual entries will disappear.
If you want to make chainloader entries, use the /etc/grub.d/40_custom file. Save your changes and then run:
grub2-mkconfig -o /boot/grub2/grub.cfg
On openSUSE you can also edit /boot/grub2/custom.cfg which is sourced during boot. No need to run grub2-mkconfig.
so cp /boot/grub2/grub.cfg /boot/grub2/custom.cfg and edit custom.cfg?
No copy, just edit.
If I *create* custom.cfg, ie: touch ./custom.cfg, it is an empty file. Remember I am not expert with grub2. What do I edit?
if custom.cfg exists, is it used instead of grub.cfg or in addition to?
In addition to. custom.cfg is included into grub.cfg at runtime.
So "melded together" or added at the end of or ...
in editing "40_custom" it must be necessary to copy and alter "entire" sections of grub.cfg as "40_custom" appears to merely add lines to the "bottom" of grub.cfg. ie: its format/usage is not well explained, aics.
info grub2, Configuration - Simple Configuration. Did you read it?
Ah, some enlightenment. No, I had not.
I tried to add "video=1600x1200-32" to grub.cfg kernel parameters line via 40_custom and it only added a single line at the bottom of grub.cfg and had *no* effect.
There is "Additional kernel command line parameters" in YaST2 bootloader configuration (loosely translation back to English). Does it not work if you add it there?
It was yast that added unwanted chars to the kernel parameter line and would not remove them. I have since correct it by editing "grub.old" but that was a *lucky* guess. Perhaps I was too focused on the video parameter list that I didn't try, think of, using the parameters line. Forgive my frustration.
thus far, usage/adaptation of grub2 as in unix text configuration files seem to be quite illogical and convoluted.
grub2.cfg is not unix text configuration file. It is script that is interpreted at runtime. grub-mkconfig is a convenience layer which automatically generates this script. Use of it is not mandatory and I have seen several projects that claim to do better job in maintaining grub.cfg.
I somehow after using grub2-mkconfig realized unwanted/unusable addiitons to the kernel parameters line in grub.cfg and could find *no* reference for correcting. On a "stab-in-the-dark" edited /etc/default/grub.old and was able to removed the unwanted chars from the grub.cfg kernel param lines. This is definitely *not* intuitive, expected, logical or documented (that I could find).
Let's be fair. Use of grub-mkconfig is documented well enough.
I am not disillusioned with grub-mkconfig, it takes a formated list of variables and their parameters and formats it for use in booting, ie: provides grub.cfg I was not *blaming* grub-mkconfig, rather I believe yast deformed the kernel parameters line with, iirc, "24-bit" and another partial string beginning with "(".
grub2 "may be a good thing" but is a mess to the unknowing w/o very good documentation and that requirement does not exist. This point is a *major* failure.
What exactly do you need to customize that is not documented?
Perhaps I view too narrowly the useage as I wanted to add "video=1600x1200x32" to the kernel parameters using the drop-down table offered in "yast bootloader" but could never get the system to boot to that video mode. Indeed, yast does not offer "video=" but "vga=". So I tried to add by 40_custom, which did add the string to grub.cfg (at the bottom). Which also did not work and I now surmise that some other variable needed to be set to that string, instead. I may appear to not be "open minded" about this but I am more confused than anything. I have no problem using grub2 for my systems, but do have a problem *understanding* it's configuration. And thank-you for taking the time to help. I am sure others that see this discussion that are also confused will also benefit. I also was paying more attention to on-line documentation than that within my own system, shame on me. tks -- (paka)Patrick Shanahan Plainfield, Indiana, USA HOG # US1244711 http://wahoo.no-ip.org Photo Album: http://wahoo.no-ip.org/gallery2 http://en.opensuse.org openSUSE Community Member Registered Linux User #207535 @ http://linuxcounter.net -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org