Graphical Boot up!

June 9, 2007

So gnome blogs now has a nice wordpress setup thanks to Jeff Waugh, so I thought I’d take the opportunity to maybe start blogging. I don’t know if I’ll keep it going–all my past attempts have failed pretty miserably.

Anyway, at work right now I’m working on trying to lay some of the ground work toward getting a prettier boot sequence for Fedora. We have a wiki page that covers an overview-y superset of what I’m currently working on.

Specifically, my goals right now are to

  1. get a graphical splash screen up quickly
  2. have it do something interesting for the entire boot sequence
  3. not show any text during bootup
  4. have all the text we show during bootup now, available in a file after bootup
  5. have a way for users to turn off graphical boot up easily

A lot of this work is motivated by previous work by Kristian Høgsberg

What we currently have in Fedora is RHGB. It’s a small program that gets started as soon as /usr is available during bootup. The program starts an X server, throws up a progress bar that updates as boot progresses and has a detailed view that shows a terminal window with all the mesages in the middle of the screen.

RHGB has a number of disadvantages:

  1. boot up stalls (for as much as 10 seconds or more!) until the X server is started
  2. it’s X server is different than the X server GDM uses
    • this causes flicker from all the VT switching and mode changes when going from text mode to X to rhgb to text mode to X to gdm
    • this triggers X driver bugs that have issues starting multiple X servers simultaneously or in quick succession
  3. the details mode is ugly
  4. boot messages aren’t logged

What I’m working on now has a subtle (although still somewhat unpolished) animation that fades the fedora logo in and out against a dark blue background. Rather than having a traditional progress bar or spinner, I randomly add a new twinkling star somewhere on the screen whenever there is boot progress. It’s just a off the wall idea I’m using for test purposes right now. The framework for displaying the animation is intended to be somewhat flexible, so that the animation is simple to write and can be changed out easily (somewhat analogous to a screensaver, I guess).

Boot progress is reported using the same interface that RHGB takes advantage of now. The init scripts manually call rhgb-client –update whenever something interesting happens and rhgb-client –quit when its time for the splash screen to go away. It may make sense to do something different on this front in the future, not sure.

Boot messages are trapped by creating a pseudo-terminal early on and redirecting the console to the pseudo-terminal. This happens before anything else is run (even /bin/init!), in the very top of the initial ramdisk. Changing the initrd over to use the interface is as easy as changing the shebang line at the top of /init from
#!/bin/nash
to
#!/bin/plymouth /bin/nash
and installing the binary and support libraries in the ram disk image. /bin/plymouth sets up the psuedoterminal and passes off to /bin/nash transparently.

The messages sent to the pseudo-terminal are buffered until the filesystem is fully mounted and then the buffer is dumped to /var/log/bootmessages.log

For development purposes I’m using the standard vesa framebuffer implementation that’s sitting in the kernel, but we probably won’t ever ship anything that uses that. It’s just not a reliable enough solution and it doesn’t really play well with X (which is important if we want to get nice transitions between booting to sitting at the login screen). Right now there are efforts by Jesse Barnes and a few other people underway to get a a reliable drm modesetting interface set up for intel video hardware. It’s likely that we’ll punt shipping anything until that stuff lands upstream.

Anyway, you can follow my progress at a git repository I set up here:

http://people.freedesktop.org/~halfline/plymouth/

One Response to “Graphical Boot up!”


  1. […] June 2007 General So one thing I wanted for my Graphical Boot stuff was a standalone environment for it to work in. I wanted it to have its own /proc, device […]


Leave a Reply to detached directories - Ray Strode