We are modifying the Initrd file in order to modify the live user configuration which is not available via skel but can be modified by editing the casper configuration like hostname or the systemd configuration.
Linux has the Initrd or “Initial ram-disk” used during the boot process. A Linux kernel is modular. The Kernel files, drivers, reside in separate files, i.e., kernel modules. The kernel does not require drivers as BIOS handles all the work of loading Initrd into the memory. After the kernel is loaded, it starts the boot process. Initrd contains all the drivers Linux needs to boot and the user can rebuild Initrd without changing the kernel.
Files inside Initrd
The files inside Initrd include the conf where the casper configuration is found which is required for the live user creation and its configuration.
The Initrd file is used when booting a live Meilix and can be found in the casper directory of the ISO.
We start with downloading the ISO and mounting it:
sudo mount -o loop meilix-i386.iso /mnt
Modifying the Initrd
Now extract the content into a folder so that one can modify them. It depends on the image type in the Meilix. We have the image in lz format it can be in gzip format for other distributions.
mkdir initrd-tmp cd initrd-tmp lzma -dc -S .lz /mnt/casper/initrd.lz | cpio -id
Now we can modify the files like hostname or the files required to run during boot. The Initrd file is responsible for all the configuration available to the live user like the theme for Plymouth. We can modify the boot menu or plymouth or the files and folders the user gets like the default wallpaper.
Repack the modified files into a new initrd:
find . | cpio --quiet --dereference -o -H newc | gzip -9 > ~/new-initrd.gz
These are steps to modify the Initrd file which can be used to customize the Meilix live user configuration like hostname, Plymouth theme and user files.
You must log in to post a comment.