Monday, 14 November 2011

Enable graphical plymouth boot in Fedora 16 with nvidia drivers

Installation of nvidia drivers under Fedora is well documented. (See http://forums.fedoraforum.org/showthread.php?t=204752). In previous versions of Fedora, enabling the plymouth graphical boot was quite easy. All one had to do was to add the following kernel arguments to grub.conf.
rdblacklist=nouveau nomodeset vga=ask

Starting from release 16, Fedora uses Grub2 as the bootloader. The unfortunate side effect of this change is that the vga parameter is now obsolete. I absolutely hate the ugly text based boot screen - but going back to the nouveau driver was not an option. (Simply because I am stubborn like a mule). So after a lot of tinkering, here's how I managed to get back the graphical boot screen.

DISCLAIMER: Modifying Grub configuration files could make your system unbootable. Proceed at your own risk.
  1. Find the video modes supported by the vbe driver. To do this, press "c" at the grub menu to launch the grub console and run the following commands:
    set pager=1
    insmod vbe
    vbeinfo
    

    vbeinfo command will list all the accessible video modes it finds. Choose one that you like. Eg. 1280x800x24. Press ESC to exit the console and hit ENTER to boot the OS.

  2. Create a Grub2 font. I chose the excellent DejaVu font as the example here. Feel free to choose a different font in it's place.
    sudo grub2-mkfont --output=/boot/grub2/DejaVuSansMono.pf2 --size=24 /usr/share/fonts/dejavu/DejaVuSansMono.ttf

  3. Edit /etc/default/grub and add the following lines to the end
    GRUB_VIDEO_BACKEND="vbe"
    GRUB_TERMINAL_OUTPUT="gfxterm"
    GRUB_FONT_PATH="/boot/grub2/DejaVuSansMono.pf2"
    GRUB_GFXMODE="1280x800x24"
    

    replace GRUB_FONT_PATH with the correct filename of the font you generated in the previous step. GRUB_GFXMODE should be the mode you chose from the output of the vbeinfo command.

  4. Backup /boot/grub2/grub.cfg and regenerate it using the new settings.
    sudo cp /boot/grub2/grub.cfg /boot/grub2/grub.cfg.bkp
    sudo grub2-mkconfig -o /boot/grub2/grub.cfg

  5. Reboot and enjoy the graphics.

11 comments:

Unknown said...

Thanks! Finally I have a nice plymouth! Great solution! :D

MM said...

I had to add "rdblacklist=nouveau noveau.modeset=0" options in GRUB_CMDLINE_LINUX section of /etc/default/grub for me to work, it was deleted somehow after grub2-mkconfig (I'm using kmod-nvidia from rpm fusion) anyway thanks a lot! plymouth is beautiful once again!!

Mezek said...

Great job! It works like a charm, thanx.

gm said...

Excellent! Thanks a lot. Very well written.

I tried in vain and gave up until I started searching again and stumbled over your blog.

Alan Childs said...

Odd, but on my system I had to change strip the last command to just -

sudo grub2-mkconfig

No idea why.

Gaello said...

Thanks! Awsome solution ! :D

jgrnst said...

Thank you very much!

ferhh801234 said...

Wow... You rule dude! Thank you very much :D Blessings.

JoR said...
This comment has been removed by the author.
M said...

what does the command:

set pager=1

do?

JanuZ said...

It switches on paging so that you can see the information a page at a time. Otherwise everything will scroll past very quickly.