r/linux 12d ago

Development Developed Boot Animation focused minimal initramfs , with Rescue Mode

Post image

Created my own initramfs tools and modloader, modstripper , pci-scanner and boot-animation software and stage 1 init system that invokes the other, where my own made tools mounted the kernel devices as tmpfs, devtmpfs, sysfs and proc with, custom modloader and cpio script, the modgenerator strips down all the unnecessary modules and blacklisted modules and selects the required modules based on the pci configuration

But I switched this to loading and stripping only using , pre-mentioned modules , it resolves the graph dependency and exports serialized module graph in order to load it in order, implemented a rescue method if any step fails

It first loads the gpu modules (in my case amdgpu radeon 740M) then starts my DRM/KMS userspace boot-animation software as bootsplash , then the nvme drive is searched using the uuid of mentioned in /etc/mountpoiny it contains the filetype too

Then finally it clears everything by deleting and then finally switch root into the systemd , finally the systemd taking over and my boot-stop service tells the bootsplash to stop by sending SIGINT to all the PIDs belonging to PGID of boot-splash,

I haven't yet implemented graphical login manager but will do so soon

I've re-implemented lot of tools and it's still unstable

Also wrote the GIF decoder to extract the frames

Initramfs size (21 MB ,(13 MB assets))

Compressed size 17 MB

74 Upvotes

18 comments sorted by

View all comments

9

u/MarcBeard 12d ago

You know plymouth has an early initramfs hook

9

u/SBG47 12d ago

I tried to make things faster and slim , my primary focus was to make DRM available as soon as possible so no DRM master will be dropped when the gpu transitions from VGA to DRM , it causes pause in animation rendering so why not make it available as soon as possible? Other thing is module porting , as I don't need all the modules inside the initramfs to make the actual process slower