Showing a splash image while loading a huge initrd
Asked Answered
C

3

7

Consider a live GNU/Linux distro with the following constraints: all the software should be contained in an initrd image (which results in its huge size) and the kernel contains as few statically-compiled modules as possible.

Consider the bootup process of the described distro: the bootloader (e.g. grub or isolinux) loads the kernel, which then loads and extracts the initrd into the memory. During the extraction (which takes 20-30 seconds on old computers) nothing happens on the screen.

I was wondering, is there a ready-made solution of showing a splash screen during the initrd extraction process? If not, can you please comment on the following ideas:

  1. Statically compile an e.g. 600x480x8bit image into the kernel and somehow flush it into the framebuffer while initrd is being extracted.

  2. Do the same, but force a particular video driver to be loaded (e.g. VESA) and hack into its code, rather that kernel's framebuffer.

Thank you.

Castellanos answered 19/11, 2012 at 9:14 Comment(2)
+1 I would like to know about this.Bokbokhara
I'd say the static option is the best without tacking on another few seconds of boot time.Crowberry
S
2

Perhaps you can make it simpler: Create 2 initrd files. The first one can be small. Then it can call Plymouth to show a splash screen while the real initrd is extracted.

Sakhuja answered 16/12, 2013 at 16:34 Comment(0)
F
1

You are wrong if you think, that the kernel loads the initrd image. It is done by the boot loader. If you want to show a splash screen you have to tell your boot loader to display an image. How to do this depends on your boot loader.

Fandango answered 21/5, 2013 at 17:4 Comment(0)
L
1

You might try creating a plain .ppm file and use LZMA compression for the Kernel Compression Mode. This might be done by using the boot logo option, but not sure if it will work for you.

First you need to enable support in your kernel for Bootup logo and Standard 224-color Linux Logo:

Device Drivers —> Graphics Support –>

Support for frame buffer devices
VESA VGA graphics support
Video mode selection support
Framebuffer Console support
Select compiled-in fonts
VGA 8×16 font
Bootup logo
Standard 224-color Linux log

Second,if supposed that you have a .png image named screen.png, you need to generate the appropiate .ppm file:

pngtopnm screen.png| ppmquant -fs 223 | pnmtoplainpnm > /usr/src/linux/drivers/video/logo/logo_linux_clut224.ppm 

Then just compile, install, update your bootloader and check if it works for you.

Lucania answered 9/7, 2013 at 13:31 Comment(1)
Thank you @blu3g3! Definitely worth trying.Castellanos

© 2022 - 2024 — McMap. All rights reserved.