Sharing KL/FirstRib components between KL distros
KL/FirstRib-based distros have a lot in common; they are all booted with same FR initrd functionality and thus most system scripts they use are identical.
A major plus of FirstRib design is its ability to use either sfs addons, uncompressed addons, or a mixture of both and can store these in different partitions/disks if you really want to...
Also, when using skeleton FR initrd.gz, with a huge-kernel type vmlinuz, where modules are typically put at layer 00 (either in sfs or uncompressed dir form of course) and firmware at layer 01 we quite often might end up using same vmlinuz, 00 modules and 01 firmware along with that same skeleton initrd.gz as well as sometimes same KLgtkdialog sfs and more besides...
But you may not have realised that because FirstRib doesn't care what the addon filenames are (aside from their 2-digit number) no matter what KL/FR distro you are using, you can actually share most of these same components between your bootable KL distros with only the 07 main root filesystem (or whatever layer you are putting it at) different. Actually, you could even share that!!! for the case where you want to boot same distro but with a different upper_changes, for example... the mind boggles...
For example, attached is my KLV-Airedale bootfrom directory (which I am currently posting from in fact).
Note that everything is a symlink apart from the upper_changes folder...!!!
I have all the actual components in a different directory on the same partition. In fact with a suitable w_altNN= kernel line you could even symlink to components stored on totally different disks and partitions... including some parts on removable devices if you wish. There is really no limitation to this FR facility.
If you want to try the idea, for simplicity just create a directory in / directory of the bootfrom partition; I used the name "shared", but you can call it anything you like.
Then put all the main bootfrom components into that "shared" directory, and from terminal opened at say, KLV-Airedale bootfrom directory make the symlinks (or use rox to do it... In fact rox is really great for making this symlink-type structure though simple script to make it is much more convenient once written):
Code: Select all
ln -s ../shared/vmlinuz vmlinuz
ln -s ../shared/initrd.gz initrd.gz
ln -s ../shared/00modules_whatevername.sfs 00.sfs # note that only the 2-digit numeric (and the .sfs in this example case) is important in the filename here
ln -s ../shared/01fireware_whatevername.sfs 01.sfs
ln -s ../shared/07KLV-Airedale.sfs 07.sfs
ln -s ../shared/10KLgtkdialog_whatevername.sfs 10.sfs
ln -s ../shared/20pipewire.sfs 20.sfs
etc etc etc
Of course if the addon was instead an uncompressed directory, for example, ../shared/myaddonA, that could be linked in similarly but without the .sfs extension (since not an sfs...):
Code: Select all
ln -s ../shared/myaddonA 24
# where in this example I am placing myaddonA at layer 24 (user-to-decide...)
Of course there is no reason to store them all in that single "shared" directory. Could store the different parts where you like. For example, a nice arrangement would be to store alternative huge-kernels in separate directories of their own - a simple frontend utility could be used to reconfigure/choose which components you actually want involved on boot...
So this is a huge advantage of a typical FirstRib-based frugal install compared to say booting from ISO with Ventoy and especially when using same huge-kernel to boot several KL distro variants such as KLA, KLV, KLU and whatever... You only thus need ONE copy of vmlinuz, initrd.gz, 00modules, 01firmware, 10KLgtkdialog, 20pipewire and so on!!! yet have all the KL distros able to boot using that!!! And even same KL distro if you want but with totally different upper_changes used with each. Now that is powerful and a true way to save distro storage size if that is really what concerns the user...!
EDIT: Note that you could make similar arrangements for using a multitude of KL distros (or variants with different upper_changes) for use with Qemu virtual machines and so on. I haven't tried this: but seems to me since lower layers are read-only it should be possible to share multiple components in parallel running Qemu distros as well. Of course each running virtual machine still needs its usual RAM allocation, but disk storage size can be minimised by this FirstRib shared-component ability.