Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Bootsplashes without kernel recompiliation!
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
mmiikkee12
n00b
n00b


Joined: 10 Sep 2005
Posts: 19

PostPosted: Thu May 25, 2006 1:03 am    Post subject: Bootsplashes without kernel recompiliation! Reply with quote

Warning: Yes, this is a hack :P

I couldn't make gensplash/fbsplash work, so I came up with this. It uses initscripts to show a bootsplash instead of kernel patches. I suppose it would also be good for people with ancient, slow systems that take way too long to compile a kernel :-)

First, you'll need to get your kernel to boot into a framebuffered console. Here's the kernel config I used for this. Some of this is probably changeable, I just didn't test it.
Code:

Device Drivers  --->
    Graphics support  --->
        <*> Support for frame buffer devices
        <*> VESA VGA graphics support
            VESA driver type (vesafb-tng)  --->
        (1280x1024@60) VESA default mode
        [*] Support for the framebuffer splash
        Console display driver support --->
            [*]   Video mode selection support
            <*> Framebuffer Console support

Then add something like this to your kernel command line:
Code:
        kernel          /boot/kernel root=/dev/hda2 ro quiet splash CONSOLE=/dev/tty8

Note I used just plain 'splash' instead of 'splash=blah,blah,blah' as in the fbsplash patch. CONSOLE=/dev/tty8 sends init's output to tty8 so it doesn't get all over your beautiful splash image while you're booting. 'quiet' is optional. It keeps most of the kernel messages from being printed before init starts. All you'll see is "Uncompressing Linux... ok, booting the kernel." You'll know this works when you reboot and get really high resolution text after a few moments.

Next you need to install fbi (a framebuffer image viewer). Just emerge fbi. Ignore the warning about it being deprecated, we don't care for this purpose. :D Then you need some images. Save them as /etc/splash/boot.jpg and /etc/splash/shutdown.jpg. The first one will be shown while booting (you'd have never guessed, eh?) and the other one will be shown while shutting down (equally obvious. I deserve the Captain Obvious award now.) 1024x768 is fine for these, the closer to your real resolution (the one you set in "VESA default mode" above) the better they'll show up.

And now for the fun part, the initscripts. These are actually pretty simple.
Code:

[b]cat > /etc/init.d/initsplash << 'EOF'[/b]
#!/sbin/runscript

BOOTING_SPLASH='/etc/splash/boot.jpg'
SHUTDOWN_SPLASH='/etc/splash/shutdown.jpg'

depend()
{
        before *
}

start()
{
        ebegin "Loading splash screen"
        fbi -T 1 -qa ${BOOTING_SPLASH}
        eend $? "Couldn't load splash screen ($?)"
}

stop()
{
        ebegin "Loading splash screen"
        fbi -T 1 -qa ${SHUTDOWN_SPLASH}
        eend $? "Couldn't load splash screen ($?)"
}
[i]EOF[/i]

Code:

[b]cat > /etc/init.d/initsplash_end << 'EOF'[/b]
#!/sbin/runscript

depend()
{
        after *
}

start()
{
        killall fbi
}

stop()
{
        killall fbi
}
[i]EOF[/i]

What's kinda confusing about these is that both the start()s are called on boot, and the stop()s are called on shutdown. So init will first run start() from the first file, run its other initscripts, and then run start() from the second file, which actually stops fbi instead of starting it, but init doesn't have to know that :D.

Now, to conclude this long boring tutorial, make sure the initscripts run:
Code:

rc-update add initsplash default
rc-update add initsplash_end default

and then reboot, and say a prayer that it works ;)
_________________
There are 10 kinds of people: those who count in binary and those who don't.
People tend to not click links that say "Click Here!" So don't click here.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum