You are not logged in.

#1 2023-01-24 19:46:21

dojero
Member
Registered: 2011-11-26
Posts: 36

Splash screen bmp added to UKI file with mkinitcpio

I boot using a unified kernel image (an .efi file). I create the image with the mkinitcpio command that uses a linux-preset file and a kernel cmdline file. In the linux-preset file, I set the splash screen with a default_options setting.

To create the splash screen, I used GIMP to convert a jpg file to a bmp file, and then put that bmp file into /usr/share/systemd/bootctl/. And it works perfectly.

But then I wanted to change the splash screen. I went through the same process, acquiring a jgp file, and then exporting to to a bmp file with GIMP.

But when I boot, there's no splash screen...it's just blank. When I replace the splash screen option in linux-preset with the original bmp or with the arch-splash bmp, it works. But not with the new bmp.

Any suggestions as to why?

Offline

#2 2023-01-26 17:02:48

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,732
Website

Re: Splash screen bmp added to UKI file with mkinitcpio

Is the resolution the same? Run the `file` command on both .bmp images and compare the output.

Offline

#3 2023-03-01 21:30:33

kousu
Member
Registered: 2022-01-25
Posts: 9

Re: Splash screen bmp added to UKI file with mkinitcpio

I have this working. This is my UKI config:

[kousu@laptop ~]$ cat /etc/mkinitcpio.d/linux.preset 
# mkinitcpio preset file for the 'linux' package

ALL_config="/etc/mkinitcpio.conf"
ALL_kver="/boot/vmlinuz-linux"
ALL_microcode=(/boot/*-ucode.img)

PRESETS=('default' 'fallback')

#default_config="/etc/mkinitcpio.conf"
default_image="/boot/initramfs-linux.img"

#fallback_config="/etc/mkinitcpio.conf"
fallback_image="/boot/initramfs-linux-fallback.img"
fallback_options="-S autodetect"

default_uki="/boot/efi/boot/bootx64.efi"
default_options="--splash=/home/kousu/Pictures/Wallpapers/symbiontworld.bmp"
fallback_uki="/boot/efi/boot/archlinux-linux-fallback.efi"

And I installed as normal with

[kousu@laptop ~]$ sudo mkinitcpio -p linux

I cropped and resized the image using `pinta`, not GIMP. It's not the same dimensions as the default:

[root@bomp ~]# file /usr/share/systemd/bootctl/splash-arch.bmp /home/kousu/Pictures/Wallpapers/symbiontworld.bmp
/usr/share/systemd/bootctl/splash-arch.bmp:        PC bitmap, Windows 98/2000 and newer format, 566 x 167 x 32, cbSize 378226, bits offset 138
/home/kousu/Pictures/Wallpapers/symbiontworld.bmp: PC bitmap, Windows 3.x format, 566 x 347 x 24, image size 589900, cbSize 589954, bits offset 54

and it showed up for me during boot. However it looked like it was rescaled to 566 x 167, so maybe that's a limitation of UKI? That all splash images have to be that size?

I don't know why yours didn't show up at all. Are you sure you saved it as a .bmp image? Were there any errors when you ran `mkinitcpio`?

Last edited by kousu (2023-03-01 21:30:57)

Offline

Board footer

Powered by FluxBB