Member
Registered: Jul 2007
Posts: 101
Rep:
|
grub-1.99~rc1 replaces grub 0.97; some problems remain, e.g. setting the splashimage
When I wanted to give my multiboot system the ability to
boot an OS in which the kernel image resides on an
ext4fs, which grub 0.97 cannot read, I took the only
course of action that seemed open to me: I downloaded
the source code for the latest version of GRUB, built it
from source, and then installed it onto /dev/sda --
which is the boot disk -- and the root directory of the
system that resides on /dev/sda. I now have a
functioning multiboot system where I can boot my choice
of several different operating systems, including, as I
mentioned earlier, one that uses ext4fs, which Legacy
Grub cannot read.
This is not the reason why I write today, but I wonder,
in passing, why so few people are using the new GRUB,
when it is so much better than "Legacy Grub". Just the
"ls" command alone, I think, should be reason enough to
upgrade to the new GRUB -- have you not cursed the old
GRUB countless times for lacking an "ls" command? -- and
yet, most of the Linux community, for some inscrutable
reason, has not done so.
Did I say "so much better"? Pas tout-à-fait. "Better'
it may be, in the sense that it has more features, but
it is not easier to configure. After building and
installing the new GRUB, I found that I had to write a
grub.cfg file to take the place of the menu.lst file,
and it took hours of trial and error to do so (e.g., the
open-curly-brace that begins a menu had better be at the
end of the menuentry line, not the beginning of the next
line, and the title of the menuentry had better be
surrounded by quotes, even though there's nothing in the
documentation that says so). Nearly all the commentary
on the World Wide Web -- or, at least, all the
commentary that can be found by search engines -- is not
about writing a grub.cfg file at all, but, rather, about
writing some other file, e.g., /etc/default/grub, from
which a grub.cfg file can be partly generated, and there
is no discernible relationship between what a blogger
advises you to put in /etc/default/grub, and what you
actually have to put in /boot/grub/grub.cfg to get your
desired results. The official documentation is, in some
places, almost useless. Thus, the official
documentation will tell you that there is a "set" command,
and tell you its syntax, but it does not list any of the
predefined variables that you can set, nor tell you the
meaning of their values. Since half the functionality of
a grub.cfg file lies in setting variables to the right
values, this is an egregious lacuna in the
documentation.
As promised in the title to this posting, some problems
remain, and I pray that the gentle reader will be able
to help me solve at least one of them: How do I set the
background image? With the old, legacy grub, whatever
its limitations, the answer was simple: all you needed
to say was
splashimage=(hd0,0)/grub/splash.xpm.gz
and that was that. With the new grub, you must use the
background_image command rather than the splashimage
command, and it also seems that you must convert your
xpm file to either jpg or pnm format, but that is not
enough, nor even close to enough. With the new grub you
have to maybe load some modules, and maybe set the type
of terminal output, and maybe activate a video mode, and
maybe load some fonts. I have gone back to the search
engines again and again, and I can find nothing that
works. When I issue the command
background_image (hd0,1)/grub/splash.ppm
(yes, I incremented the slice number, thank you for
asking), GRUB issues the diagnostic:
error: no video mode activated.
and even after typing
insmod gfxterm
insmod vbe
background_image (hd0,1)/grub/splash.ppm
the diagnostic message is unchanged.
If, after typing the two "insmod" commands, I type
terminal_output gfxterm
so as to activate a video mode, the screen goes dark,
and, despite having received only a "terminal_output"
command, GRUB no longer reads from the keyboard, as
typing "reboot" at that point has no effect, there seems
to be nothing to do but power-cycle the computer.
Perhaps a font should have been loaded prior to the
"terminal_output" command, but I tried loading a font
that was mentioned on some page to which a search engine
had directed me, and was unable to do so.
How, then, does one set the background image using the
new GRUB? If you are using the new GRUB, and you have a
background image, what does your grub.cfg file look
like? I thank you in advance for your replies.
jay at m5 dot chicago dot il dot us
+1 773 7613784
|