LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-22-2011, 11:21 PM   #1
shachter
Member
 
Registered: Jul 2007
Posts: 101

Rep: Reputation: 2
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
 
Old 03-23-2011, 04:52 PM   #2
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,841

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
http://linuxers.org/howto/how-change...-splash-images
http://linuxhub.net/2009/07/grub-2-a...autify-grub-2/
 
Old 03-23-2011, 10:48 PM   #3
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,504

Rep: Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490
Quote:
what does your grub.cfg file look
like?
The part relating to the splashimage
Code:
### BEGIN /etc/grub.d/05_debian_theme ###
insmod ext2
set root='(hd0,13)'
search --no-floppy --fs-uuid --set 35564916-6d4f-4ee1-9ca4-6debe761adee
insmod jpeg
if background_image /home/linux/Pictures/palmclouds.jpg ; then
  set color_normal=black/black
  set color_highlight=magenta/black
else
  set menu_color_normal=white/black
  set menu_color_highlight=black/light-gray
fi
### END /etc/grub.d/05_debian_theme ###
Can't find the link I got the info at but these are the steps:
Install Grub2-splashimages packages with: sudo aptitude install grub2-splashimages

Select an image you want. Go to /etc/grub.d/05_debian_theme file.
Need to do it as root by either: sudo gedit (to open text file and navigate to above file or; sudo nautilus and navigate to above file and open in text editor.

Change the line: WALLPAPER=/usr/share/images/desktop-base/moreblue-orbit-grub.png to whatever the path is where you have a picture, I used:
WALLPAPER=/home/username/Pictures/rainbow.jpg.

Then in a terminal update grub with: sudo update-grub. Should see a message indicating "Found background image", if not, it didn't work, try again.` I'd suggest commenting out whatever line you have and adding a new, in case it fails.
 
Old 03-24-2011, 03:51 AM   #4
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,841

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
I would think that in order to have video you also have to consider enabling framebuffer.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Grub splashimage? michaelbhahn Linux From Scratch 3 07-06-2004 03:45 AM
GRUB splashimage configuration / update GRUB rudL Linux - Software 1 05-10-2004 07:16 AM
grub splashimage Harp00 Debian 4 03-25-2004 05:03 PM
grub and splashimage kvikki Slackware 6 08-09-2003 11:33 PM
grub splashimage mathfeel Linux - General 4 05-31-2003 02:30 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:42 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration