Fedora Linux Support Community & Resources Center
  #31  
Old 28th April 2012, 11:16 AM
jeffrey Offline
Registered User
 
Join Date: Jun 2011
Location: Mumbai, India
Posts: 36
linuxfirefox
Re: Grub Splash, For those interested

Hurray! Thanks to your script, it worked. I now have the theme. Looks cool - only the font should be bigger - 12pt can hardly be seen on my monitor. Does the starfield.tar.gz have to be in the same folder as the script? and what about LiberationSansRegular.ttf how can I try that?
__________________
Pentium(R) Dual-core CPU @2.5Ghz / Memory 2.0 GiB / 15" LCD / Gallium 0.4 on NV46 / F20 - Windows 8 dual boot
Reply With Quote
  #32  
Old 28th April 2012, 11:29 AM
glennzo Online
Un-Retired Administrator
 
Join Date: Mar 2004
Location: Salem, Mass USA
Age: 57
Posts: 14,671
linuxfirefox
Re: Grub Splash, For those interested

For the font size I'd just use the instruction in jakes document where you create a font. Just use a larger size. Then run the grub2-mkconfig command again.

You can substitute LiberationSansRegular. It should work just fine. Do the same thing as above but use LiberationSansRegular in place of DejaVuSans.

Starfield.tar.gz is not needed once you have finished with the script or jakes instructions.

Glad to hear that someone used the script and that it was a success.
__________________
Glenn
The Bassinator © ®

[SIGPIC][/SIGPIC]
Laptop: Toshiba Satellite / Intel Core 2 Duo 1.73 GHz / 2GB / 160GB / Intel Mobile 945GM/GMS/GME/943/940GML Integrated Graphics
Desktop: BioStar MCP6PB M2+ / AMD Phenom 9750 Quad Core / 4GB / 1TB SATA / 500GB SATA / EVGA GeForce 8400 GS 1GB
Reply With Quote
  #33  
Old 28th April 2012, 12:22 PM
jeffrey Offline
Registered User
 
Join Date: Jun 2011
Location: Mumbai, India
Posts: 36
linuxfirefox
Re: Grub Splash, For those interested

There are some corrections to be made in jake's instructions. He instructed to add x lines before when it is supposed to be after; at least in two places. One is in the /etc/default/grub file and the other in the 10_linux file.
Glenn your script is proper and entered those lines in the correct places. That is how it got corrected for me.

So my advice for those who want to theme grub to use the script instead of manually doing so.

Another issue is the icons. The fedora icon shows up in the menu. I also have LinuxMint and Ubuntu on other partitions but the icons do not show up in the menu
__________________
Pentium(R) Dual-core CPU @2.5Ghz / Memory 2.0 GiB / 15" LCD / Gallium 0.4 on NV46 / F20 - Windows 8 dual boot

Last edited by jeffrey; 28th April 2012 at 01:14 PM. Reason: Line was added
Reply With Quote
  #34  
Old 28th April 2012, 01:54 PM
glennzo Online
Un-Retired Administrator
 
Join Date: Mar 2004
Location: Salem, Mass USA
Age: 57
Posts: 14,671
windows_xp_2003chrome
Re: Grub Splash, For those interested

If there is a typo or errors in jakebpg's how-to he needs to know about it. I'll PM him when I have time. To keep the record straight, he helped me with parts of the script so I can't take full credit for it. A few others also helped with things that were above my bash scripting experience level.

Can you point out the errors?
__________________
Glenn
The Bassinator © ®

[SIGPIC][/SIGPIC]
Laptop: Toshiba Satellite / Intel Core 2 Duo 1.73 GHz / 2GB / 160GB / Intel Mobile 945GM/GMS/GME/943/940GML Integrated Graphics
Desktop: BioStar MCP6PB M2+ / AMD Phenom 9750 Quad Core / 4GB / 1TB SATA / 500GB SATA / EVGA GeForce 8400 GS 1GB
Reply With Quote
  #35  
Old 30th April 2012, 07:45 AM
NovaTam Offline
Registered User
 
Join Date: Oct 2010
Posts: 3
linuxchrome
Re: Grub Splash, For those interested

It looks attractive!
Reply With Quote
  #36  
Old 2nd May 2012, 11:30 AM
jakebpg Offline
Registered User
 
Join Date: Feb 2009
Location: Northeast
Posts: 292
linuxfirefox
Cool Re: Grub Splash, For those interested

Sorry guys for being AWOL for so long. Still dealing with other issues.

Jeff I haven't completed the section to add those Icons in yet. Once that section is done I'll post an update to my original post as I have done previously so that you don't have to wade through all the posts to see if that section has been completed yet.

To all using the written instructions. Please use glennzo's install script. Much easier that way and NO chance of errors whether it be from typos or difficult to follow instructions.

I'll try to correct the written instructions as soon as I can. I hope to have the final section(for additional OS icons not being picked up) done to add to the written instructions.
Reply With Quote
  #37  
Old 4th May 2012, 10:28 AM
sea Offline
"Shells" (of a sub world)
 
Join Date: May 2011
Location: Confoederatio Helvetica (Swissh)
Age: 34
Posts: 3,291
linuxfedorafirefox
Re: Grub Splash, For those interested

Dang i had started writing a script either, but glennzo was faster

I'll share it regardless and hope it'll be of use either:

PHP Code:
#!/bin/bash
# |
# | Tweak grub2 script, Mai 4th 2012 by sea
# | Requires: chmod +x sea-tweak-grub2
# |
# | Edit your background picture here, as you (as i guess) wont change that often
# | But since you probably have to play with the resolution and font size,
# | this script lets you easy change those values.
# |
# | This script is written with best intention to help, 
# | but there is NO warranty and I deny ANY responsiblity
# | that may or may not affect your system.
# |
# | Lisence:        GPL v3
# | Author:         Simon A. Erat (sea)
# | Release Date:   2012 May 4th
    
script_version="0.2"
# | Resource URL:   
# | Release URL:    
# |
# | Variables
    
test "0" "$UID&& echo "This script should be run as root.." && exit 1
    press
() { echo -"\n---------------------------";read -"--- >> ENTER << ---" buffeer;}
    
bg_pic="/usr/share/backgrounds/verne/default/wide/verne.png" # Default
    
bg_pic=/home/simon/Pictures/hubble-eldorado_1280_780.jpg
    fontdir
=/usr/share/fonts
    fonts
=$(find $fontdir/ -name *.ttf|grep Mono )
    
grubdir=/boot/grub2
    grubfile
=/etc/default/grub
    tmpfile
=/tmp/grub
    fontsizes
="12 14 16 18 20 22 24"
    
gfxmodes="auto 640x480 800x600 1024x600 1024x768 1280x800 1280x1024 1440x900 1600x900"
    
cdepth="auto 8 16 32" depth=""
    
replTasks="FONT GFXM GFXP BACK left"
# |
# | Backup
    
cat $grubfile $grubfile.bak
# |
# | Get input
    
clear
    
echo -"\n\nsea's \tTweak GRUB2 slpash screen script ($script_version)\n\n"

    
echo "Please choose a font:"
    
select font in $fonts
    
do        fontbase=$(dirname $font)
            
font=$(basename $font)
            echo 
"Select a font size for $font:"
            
font="${font:0: ( -) }.pf2"
            
select fsize in $fontsizes;do break;done
            
#
            # Actualy create the font
            
echo "Generating font: $(basename $font)"
            
sudo grub2-mkfont --output=$grubdir/$font --size=$fsize $fontbase/${font:0: ( -)}ttf
            
break
    
done
    
echo "Select your display resolution"
    
select gfxmode in $gfxmodes; do
        if [ ! 
"auto" "$gfxmode]
        
then    echo "Please choose color depth:"
                
select depth in $cdepth;do break;done
        fi
        
if [ ! "" "$depth] && [ ! "auto" "$depth]
        
then    colorsstring="$gfxmode"x"$depth"
        
else    colorsstring="$gfxmode"
        
fi
        
break
    
done
    
echo
    echo -
"The background image will be changed to: \t $bg_pic"
    
echo "Press \"y\" to change or leave empty to keep."
    
read -n1 newBG
# |
# | Generate output
    
test "y" "$newBG&& select bg_pic in $(find /home/ -name *.jpg );do break;done
    grep TIMEO $grubfile  
$tmpfile
    grep DISTR $grubfile 
>> $tmpfile
    grep CMDLI $grubfile 
>> $tmpfile
    grep DEFAU $grubfile 
>> $tmpfile
    cat 
>> $tmpfile << EOF
    GRUB_FONT
=/boot/grub2/$font
    GRUB_GFXMODE
=$colorsstring
    GRUB_GFXPAYLOAD_LINUX
=keep
    GRUB_BACKGROUND
=$bg_pic
EOF
# | 
# | Present it and save ?
    
echo
    echo -
"\tGRUB2:\t new"
    
cat $tmpfile
    
echo
    echo 
"The above outpout matches your expection?"
    
echo "Hit enter to save, or CTRL+C to abort/cancel"
    
press
    cat $tmpfile 
$grubfile && echo "Saved successfully" && \
        
sudo grub2-mkconfig -/boot/grub2/grub.cfg || echo -"Error writing: $tmpfile \t to \t $grubfile
Attached Files
File Type: sh sea-tweak-grub2.sh (3.0 KB, 53 views)
__________________
Laptop: Toshiba satellite p50-a-11 CPU: Intel i7 8*2400 MHz GPU: GeForce GT 745M RAM: 8192 MB Distro: Fedora (Rawhide) DE: Awesome
Text User Interface (TUI) // Windows 8+ & Fedora 20+ Dualboot

Last edited by sea; 4th May 2012 at 12:16 PM.
Reply With Quote
  #38  
Old 4th May 2012, 11:42 AM
glennzo Online
Un-Retired Administrator
 
Join Date: Mar 2004
Location: Salem, Mass USA
Age: 57
Posts: 14,671
linuxfirefox
Re: Grub Splash, For those interested

Sea, nice job! I tried your script on Fedora 16 installed under VirtualBox. It worked perfectly! I did run into 2 issues that you may want to look into.

1. Need to run this script as root or with sudo / su. Permisison denied when the script tried to run grub2-mkconfig as regular user.

2. The list of fonts was so long it scrolled off of the screen. I don't know if you can or want to correct this. It's a minor issue but one that would cause the user to have to scroll up/down to examine all possible choices.
__________________
Glenn
The Bassinator © ®

[SIGPIC][/SIGPIC]
Laptop: Toshiba Satellite / Intel Core 2 Duo 1.73 GHz / 2GB / 160GB / Intel Mobile 945GM/GMS/GME/943/940GML Integrated Graphics
Desktop: BioStar MCP6PB M2+ / AMD Phenom 9750 Quad Core / 4GB / 1TB SATA / 500GB SATA / EVGA GeForce 8400 GS 1GB
Reply With Quote
  #39  
Old 4th May 2012, 12:28 PM
sea Offline
"Shells" (of a sub world)
 
Join Date: May 2011
Location: Confoederatio Helvetica (Swissh)
Age: 34
Posts: 3,291
linuxfedorafirefox
Re: Grub Splash, For those interested

Thanks Glenn.

1) Now aborts if script is not run as user, as the sudo obviously didnt step in
2) enlarged the scan to all fonts, but restricted selection to mono (fixed-size) fonts only.

EDIT:
updated code and attachment in above post.

---------- Post added at 11:28 AM ---------- Previous post was at 11:13 AM ----------

There's only 1 thing that still disturbs me...
After the grub menu with the modified splash screen... it disapears after "loading initramfs...".
Meaning the screen 're-calibrates' itself and looses those settings, but i'd like to keep the splashscreen during the boot procedure...
The playmouth screen was set to "details" and the initrd was rebuilt either...

PHP Code:
#!/bin/bash
# |
# | Plymouth script, Mai 4th 2012 by sea
# | Requires: chmod +x sea-plymouth
# |
# | Lets you easy change the plymouth screen.
# | Very helpfull if you want to change GRUB2 splash screen.
# |
# | This script is written with best intention to help, 
# | but there is NO warranty and I deny ANY responsiblity
# | that may or may not affect your system.
# |
# | Lisence:        GPL v3
# | Author:         Simon A. Erat (sea)
# | Release Date:   2012 May 4th
    
script_version="0.1"
# | Resource URL:   
# | Release URL:    
# |
# | Variables
    
setTheme=$(which plymouth-set-default-theme)
    
plyDir=$(dirname $setTheme)
    
themes=$(ls /usr/share/plymouth/themes)
    
curTheme=$($setTheme)
# |
# | output
    
echo "Current theme is:       $curTheme"
    
echo "If you want more themes, run: # yum install plymouth-them*"
    
echo "Please select a new theme..."
    
select theme in $themes NONE
    
do    test "NONE" "$theme&& break
    echo 
"Do you want to rebuild initrd, eventhough this may take a while? (y/n)"
    
read -n1 rebuild
    
if [ "y" "$rebuild]
        
then    sudo $setTheme $theme --rebuild-initrd
        
else    sudo $setTheme $theme
        fi
        
break
    
done 
And ideas how to solve this 'recalibrate-issue' of the boot procedure?
Attached Files
File Type: sh sea-plymouth.sh (1.2 KB, 53 views)
__________________
Laptop: Toshiba satellite p50-a-11 CPU: Intel i7 8*2400 MHz GPU: GeForce GT 745M RAM: 8192 MB Distro: Fedora (Rawhide) DE: Awesome
Text User Interface (TUI) // Windows 8+ & Fedora 20+ Dualboot

Last edited by sea; 4th May 2012 at 03:19 PM.
Reply With Quote
  #40  
Old 31st May 2012, 02:56 AM
RupertPupkin Offline
Registered User
 
Join Date: Nov 2006
Location: Detroit
Posts: 5,620
linuxfirefox
Re: Grub Splash, For those interested

It doesn't look like jakebpg's Grub theme made it into F17. At least the icons aren't there. What happened?

Also, I don't know if anyone's noticed but in F17 the dejavu.pf2 font files in both /boot/grub2/themes/system and /boot/grub2/themes/starfield are not fonts! They are virtually empty files containing no real font information, only 150 bytes in size. It seems like whoever made those files forgot to use the corresponding TrueType font as input to the grub2-mkfont command, as mentioned in this thread (see PabloTwo's post). It should produce a file somewhere around 20-35KB in size for most fonts. So my guess is that those two themes are using some default Grub font.

I ended up copying the starfield theme (and called the new theme "fedora" ) and used a different background and a different font with different colors. It looks pretty good; I'll have to figure out a way to take a decent picture of it.
__________________
OS: Fedora 20 x86_64 | Machine: HP Pavilion a6130n | CPU: AMD 64 X2 Dual-Core 5000+ 2.6GHz | RAM: 5GB PC5300 DDR2 | Disk: 400GB SATA | Video: ATI Radeon HD 4350 512MB | Sound: Realtek ALC888S | Ethernet: Realtek RTL8201N
Reply With Quote
  #41  
Old 31st May 2012, 03:40 PM
jakebpg Offline
Registered User
 
Join Date: Feb 2009
Location: Northeast
Posts: 292
linuxfirefox
Cool Re: Grub Splash, For those interested

Quote:
Originally Posted by RupertPupkin View Post
It doesn't look like jakebpg's Grub theme made it into F17. At least the icons aren't there. What happened?

Also, I don't know if anyone's noticed but in F17 the dejavu.pf2 font files in both /boot/grub2/themes/system and /boot/grub2/themes/starfield are not fonts! They are virtually empty files containing no real font information, only 150 bytes in size. It seems like whoever made those files forgot to use the corresponding TrueType font as input to the grub2-mkfont command, as mentioned in this thread (see PabloTwo's post). It should produce a file somewhere around 20-35KB in size for most fonts. So my guess is that those two themes are using some default Grub font.

I ended up copying the starfield theme (and called the new theme "fedora" ) and used a different background and a different font with different colors. It looks pretty good; I'll have to figure out a way to take a decent picture of it.
If you have the space just create a vm then simply take a screen shot of the vm booting. That's how I got the original screen shots for this post. Never took notice to the font file size as I created my own and have been using that instead of the one included with F17. Oh and by the way I'm not the creator of the splash that comes with F17. I just found it on the install and figured out how to make it work correctly. and that is the reason that there are no icons included on the default install.Not to mention the changes I made to the splash and numerous other files to make the icons available for the splash screen.

If you read through all of my posts you'll see that I gave credit to the original creator of the grub splash theme. And I also changed my back ground to something I like better then the starfield that was included which I used as a starting point to get the grub splash actually working.
Reply With Quote
  #42  
Old 31st May 2012, 07:38 PM
lightman47 Offline
Registered User
 
Join Date: Apr 2009
Location: central NY, USA
Posts: 572
linuxchrome
Re: Grub Splash, For those interested

Totally awesome! Can the text be another color?? (Experience with a system forced upon us at work as well as research: blue/black are not terrific foreground/background colors). That aside, OUTSTANDING!!
Reply With Quote
  #43  
Old 1st June 2012, 05:55 PM
RupertPupkin Offline
Registered User
 
Join Date: Nov 2006
Location: Detroit
Posts: 5,620
linuxfedorafirefox
Re: Grub Splash, For those interested

Ok, I managed to take a picture of my monitor with the custom GRUB theme I made (modified from the starfield theme):
Attached Thumbnails
Click image for larger version

Name:	grub2-f17.jpg
Views:	109
Size:	125.0 KB
ID:	23156  
__________________
OS: Fedora 20 x86_64 | Machine: HP Pavilion a6130n | CPU: AMD 64 X2 Dual-Core 5000+ 2.6GHz | RAM: 5GB PC5300 DDR2 | Disk: 400GB SATA | Video: ATI Radeon HD 4350 512MB | Sound: Realtek ALC888S | Ethernet: Realtek RTL8201N
Reply With Quote
  #44  
Old 1st June 2012, 07:06 PM
PabloTwo Online
"Registered User" T-Shirt Winner
 
Join Date: Mar 2007
Location: Seville, FL
Posts: 6,078
linuxchrome
Re: Grub Splash, For those interested

Quote:
Originally Posted by lightman47 View Post
Totally awesome! Can the text be another color?? (Experience with a system forced upon us at work as well as research: blue/black are not terrific foreground/background colors). That aside, OUTSTANDING!!
I'm not running F17, still happy to stay with F16 a good bit longer. The graphic image I chose for a grub2 menu background image had a lot of white fluffy clouds at the top of the scene, and with the default white text, that wasn't working so good. I did some looking at some theme configuration files as used on Ubuntu, and came up with this:

Created the file: /etc/grub.d/05_font_color
The file contents are:
Code:
#!/bin/sh
cat <<EOF
set root='(hd0,msdos5)'
if [ -f /grub/farcry_3-1440x900.jpg ]; then
set menu_color_normal=black/black
set menu_color_hightlight=white/dark-gray
set color_normal=black/black
set color_highlight=white/dark-gray
fi
EOF
The "if" test is there in case I should want to use a different background image where black text wouldn't be appropriate. If that was the case, I'd simply relocate the specified image from that directory and the font color would default back to white, without having to remove, disable or edit the file.

The line "set menu_color_normal=black/black" is what sets the text color to black.

I would imagine F17 already has some sort of "theme" configuration file in /etc/grub.d/, so you'd probably just do a modification to the existing theme file to change text colors.
Reply With Quote
Reply

Tags
&ltb&gt, grub, interested, splash

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off

Forum Jump


Current GMT-time: 22:26 (Wednesday, 20-08-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat