FirstRib savefiles

Whilst I'm on the topic of KLV-Airedale, I thought it might be useful to document some technical features of all FirstRib built distributions.

There is a lot to document, and this isn't the best place for that really, so I won't be blogging consecutively on this topic. However, I had some recent questions about the usage/configuration of a couple of FirstRib facilities, including how to achieve save persistence between boots on a partition not using a Linux format, and I was also asked about the use of LABEL and UUID to specify where the distribution component parts can be found by FirstRib's boot components.

Though not in the form of polished documentation, I'm simply posting here the quick answer I gave, starting with creation and usage of the savefile, which in FirstRib is any linux-formatted image file ending with the extension .ucimg

FirstRib savefiles

First of all, any created savefile (file with extension .ucimg) stored in the bootfrom directory will be used instead of any pre-existing upper_changes directory.

If there is more than one savefile only the alphanumeric first one found will be used.

Creating a savefile

There are many utilities and ways to do this, but I'll just give one roughly explained example in which dd was used. For simplicity, the following just shows the terminal commands used and the resulting output (the prompt being /WDL_klv$ since /WDL_klv was name of the directory I used to store the FirstRib frugal installation for KLV-Airedale onto an ntfs partition with uuid A181941E80239B44):

/WDL_klv$ dd if=/dev/zero of=upper_changes.ucimg bs=4096 count=16384 2>&1
16384+0 records in
16384+0 records out
67108864 bytes (67 MB, 64 MiB) copied, 0.255895 s, 262 MB/s
/WDL_klv$ mkfs.ext4 -q -m 0 upper_changes.ucimg
/WDL_klv$ file upper_changes.ucimg 
upper_changes.ucimg: Linux rev 1.0 ext4 filesystem data, UUID=ecf757b4-45d0-4c84-bfe1-cb498e0fce94 (extents) (64bit) (large files) (huge files)

Then I modified my grub.conf to contain stanza:

menuentry "WDL_klv ntfs" {
  insmod ext2
  search --no-floppy --fs-uuid --set A181941E80239B44
  linux /WDL_klv/vmlinuz w_bootfrom=UUID=A181941E80239B44=/WDL_klv
  initrd /WDL_klv/initrd.gz

and rebooted

Then in terminal at /root directory, did:

touch anyfile

and on reboot anyfile was there. i.e. save persistence worked to upper_changes.ucimg savefile

I also looked at contents of /mnt/layers/uc_rw (which is the savefile) and sure enough /mnt/layers/uc_rw/upper_changes/root/anyfile was there, as was /mnt/layers/uc_rw/work (I didn't need to make these two folders in the savefile, the initrd created them automatically during boot).

After reboot, the result is per the image at the top of this page.

NOTE that if your are installing a FirstRib-based distro onto a Linux formatted partition, it is probably more efficient and convenient to use a simple upper_changes save folder in preference to a .ucimg savefile.

Tiny Linux Blog:

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.