Display splash image when loading huge initrd

Consider a live GNU / Linux distribution with the following limitations: all software must be contained in an initrd image (which leads to its huge size), and the kernel contains as few statically compiled modules as possible.

Consider the boot process of the described distribution: a bootloader (for example, grub or isolinux) loads the kernel, which then loads and extracts initrd into memory. During extraction (which takes 20-30 seconds on older computers) nothing happens on the screen.

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

  • Statically compile, for example, 600x480x8bit into the kernel and somehow flush it into the framebuffer, while initrd is retrieved.

  • Do the same, but make it load a specific video driver (for example, VESA) and crack its code, and not on the kernel framebuffer.

Thanks.

+7
source share
3 answers

Perhaps you can make it easier: create 2 initrd files. The first may be small. He can then call Plymouth to display the splash screen until the actual initrd is retrieved.

+1
source

You are mistaken if you think the kernel is loading the initrd image. This is done by the bootloader. If you want to display a splash screen, you must tell your bootloader to display the image. How to do this depends on your bootloader.

+1
source

You can try to create a simple .ppm file and use LZMA compression for kernel compression mode. This can be done using the boot logo option, but I'm not sure that it will work for you.

First you need to enable support in your kernel for the Bootup logo and the standard Linux 224 logo color:

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 

Secondly, if it is assumed that you have a .png image called screen.png, you need to generate the corresponding .ppm file: pngtopnm screen.png | ppmquant -fs 223 | pnmtoplainpnm> /usr/src/linux/drivers/video/logo/logo_linux_clut224.ppm

Then just compile, install, update the bootloader and see if it works for you.

+1
source

All Articles