Fedora has developed Live CD USB DVD images for their GNU/Linux operating system. Since they store the image file systems on the devices in the /LiveOS folder, this is the name we'll use to reference their product.
This page shares some information about the LiveOS design that helps Sugar on a Stick Learners make better use of their resources.
The Fedora LiveOS system allows for persistent storage in 3 ways:
- A general persistent overlay - a compressed, write-once, fixed-size file space that will save updates and changes the LiveOS image (Activities, operating system changes, anything written in the LiveOS file space.
- Persistent Home folder - a re-sizable (with difficulty), uncompressed, optionally-encryptable, file space for anything that goes in the Learner's /home/ folder (all the Sugar Activities, logs, and good stuff).
- The device's original partition file space - outside of the LiveOS file tree, but accessible through the /mnt/live folder mount point. There, one will find the boot configuration files and anything else one had on the device before loading SoaS. Any file one might want to carry on the stick, without consuming the other limited file spaces, may be saved here (limited by device capacity).
The standard persistent overlay is needed for operating system changes and updates.
But, one may find many advantages to installing Sugar on a Stick with a persistent home folder (--home-size-mb NN --delete-home) that will hold all the Activities one wants to try and, perhaps later, throw away--all without consuming the write-once overlay that would fill up very quickly.
Additionally, keeping some device disc storage space out of the LiveOS system will let you copy, carry, and delete large resource files, such as alternate image .iso files, or anything you might want to use or share. (We should adjust the Journal code to show this root mount to facilitate file sharing.)
Sugar on a Stick may be installed on a 1-GB USB device using these options to livecd-iso-to-disk or modified_livecd-iso-to-disk (on one Terminal Activity or console command line, even though the wiki may wrap the following text according to your browser window size):
./livecd-iso-to-disk --overlay-size-mb 200 --home-size-mb 200 --delete-home --unencrypted-home /path/to/source/iso/or/device /dev/sdA1
- where '
A' in the final parameter represents the target bootable device node, such as
- (You may use '\' line-continuation symbols followed by a newline [enter or return keypress] to break a long line visually on the terminal, but not logically to the script processing software.)
- where '
That would allow space for the home folder, the operating system, and a little on the device root.
But with a larger storage device, one can allocate the resources to suit the anticipated use as described above.
The Fedora LiveOS uses the Device-mapper service of the Linux kernel to manage the file stores on the device. This is the same service that is used by Logical Volume Manager to provide disc partition services.
One limitation, mentioned above, is that the LiveOS persistent overlay is a write-once file space. This is related to its use of device mapper snapshots to merge a read-only file system image with a Copy-on-write service that tracks only changed bits of data in the snapshot file and re-referencing any pointers to the updated bits. Any changes to the operating system files are stored as differences from the base. As such, "deletions" of files are saved as additional difference references, and the originals are hidden and physical storage space is consumed in the write-once file space rather than recovered.
To track the consumption of the space allocated for persistent storage, the snapshot overlay file, the device mapper service dmsetup provides a status report. Sugar Cellar is a small utility script that uses that service to allow for Learner testing and discovery. This will help Learners manage their storage resources and learn ways to economize limited resources.