Firstrib booting via UUID and LABEL

QUESTION: Where on the filesystem are the various FirstRib boot components?

ANSWER: Wherever you wish them to be.

After another long day drinking coffee and clearing out a lot of dead wood from my garden prior to moving home, my recent change of habit, which greatly lowers my online presence, yet again provides me with some extra time to add a new blog post. Whilst eating my evening meal and watching TV with one eye, with the other I will continue therefore with a little bit of technical documentation concerning booting with FirstRib:

FirstRib simply uses boot loader kernel line arguments to specify anything to do with where all parts relevant to the booting of the distro are stored. All KLV-Airedale users, for example, despite my poor documentation, already understand:

w_bootfrom=UUID=424d8f42-e835-4111-9053-dd086b3d38e8=/WDL_klv

and also

w_changes=RAM2

(which is optional for those who want to hold all session changes only in RAM upper_changes and then have the option at any time to save that back to persistent media upper_changes savefolder or savefile).

So in simple arrangements, w_changes is the key parameter used to simply specify where the save persistence folder is located. With w_changes=RAM2 the upper_changes session changes are held only in RAM and would be lost on reboot if no save back to external media is undertaken. The optional external upper_changes (being a savefolder named upper_changes or a savefile named upper_changes.ucimg), with that simple and very common arrangement, is stored in the same bootfrom directory as vmlinuz and the FirstRib initrd.

But instead of RAM you can alternatively use w_changes to specify a different location than the bootfrom directory for a media device where upper_changes savefolder or savefile is to be found.

However, if you choose to specify external media upper_changes with something like w_changes=/mnt/sda4/path_to_a_directory somewhere on your system (instead of just using an upper_changes located in the bootfrom directory), there are two problems to (easily as it happens) resolve:

  1. How do you then also use the popular RAM2 mode if you want session saving to be optional? The answer to that one is that there is a second variable (w_changes1) you then use to specify that second needed function as: w_changes1=RAM2 Pretty easy really. So you end up with both: w_changes=/mnt/sda4/path_to_a_directory (where your external media upper_changes save folder is) and w_changes1=RAM2 so that save in-RAM session back to persistent media can be used.

  2. There is a little problem in item 1. above, specially with usb drives since every time you boot, the /mnt/sdXX part can change for a removable flash drive (e.g. /mnt/sdb might become /mnt/sdc). It is my recommendation, therefore, never to use that /mnt/sdXX/ way of saying where a partition is, but to instead either specify the UUID of the partition, or a partition LABEL name. So you can, for example use either of:

w_changes=LABEL=whatever_partition_label_is=/WDL_klv # that last part being the folder you are storing the frugal files in such as vmlinuz, initrd.gz, and probably the numbered addon sfs filesystems

OR

w_changes=UUID=whatever_uuid_of_partition_is=/WDL_klv

In other words, identical format as used to specify to FirstRib where you wish to bootfrom (using w_bootfrom), but upper_changes savefolder (or savefile) can thus be on entirely different partition to w_bootfrom location and with upper_changes in different folder there. Again, if also wanting RAM2 mode, all is perfectly consistent - just use the other related argument: w_changes1=RAM2 as well.

  1. Worth mentioning a further option here (though generally no one probably using it): if you want to store all the numbered addon filesystems other than in w_bootfrom location you can use another argument to tell that to FirstRib initrd. That argument is w_altNN=blahblahblah, where blahblahblah is the location entry in same possible UUID or LABEL formats as the above w_bootfrom and w_changes kernel linux boot loader (e.g. grub.conf) arguments. But let's not go into that further since totally optional and mind-blowing flexibility to some…

  2. I do not recommend the following further option generally at all, because it is really nowadays mainly a waste of always precious RAM: If you want all the numbered filesystems (sfs addons or uncompressed directories) to be stored in RAM prior to boot continuing you can specify that with argument w_copy2ram on the boot loader kernel line. Unlike in some other distros we know, that option is NOT active by default. Instead, I leave that option up to users to put in their grub.conf only if they really want it.

  3. Also, there is some particularly important and useful related information in blog post: FirstRib initrd RAM modes

My audience here, by the way - well, I don't know… but this blog was written and produced for my children.


Tiny Linux Blog: https://www.tinylinux.info/

Avatar
wiak
sometimes Linux system/apps developer

My earlier research interests included TCP/IP performance/optimisation over noise-prone, long-delay, VSAT links; and cloud-based, autobuild, virtual machines network construction methodologies for distance learning data-comms students’ research and laboratory work.