Changes

Jump to navigation Jump to search
3,331 bytes added ,  01:37, 22 July 2011
update
Line 10: Line 10:  
==References==
 
==References==
    +
* [http://git.fedorahosted.org/git/?p=hosted/livecd;a=blob;f=tools/livecd-iso-to-disk.sh;hb=HEAD livecd-iso-to-disk] (Usage instructions are on the first pages.)
 
* [[fedora:FedoraLiveCD|FedoraLiveCD]]
 
* [[fedora:FedoraLiveCD|FedoraLiveCD]]
 
* [[fedora:How to create and use a Live CD|How to create and use a Live CD]]
 
* [[fedora:How to create and use a Live CD|How to create and use a Live CD]]
Line 15: Line 16:     
==Storage==
 
==Storage==
The Fedora LiveOS system allows for persistent storage in 3 ways:
+
The Fedora LiveOS system allows for persistent storage in 3 locations:
    
# An all-purpose, persistent overlay - a compressed, write-once, fixed-size file space that will save updates and changes to the LiveOS image (Activities, operating system changes, anything written in the LiveOS file space).
 
# An all-purpose, persistent overlay - a compressed, write-once, fixed-size file space that will save updates and changes to the LiveOS image (Activities, operating system changes, anything written in the LiveOS file space).
# Persistent home folder - a re-writable, 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).  A persistent home folder is an option that must be selected at the time of installation of the LiveOS image. This option is only available through the installation scripts, 'livecd-iso-to-disk' or 'modified_livecd-iso-to-disk'. The Windows and Fedora 'Live USB Creator' installers do not provide this option as of June 2010.
+
# Persistent home folder - a re-writable, 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).  A persistent home folder is an option that may be selected at the time of installation of the LiveOS image (although with some effort, one could manually create a home.img filesystem in /LiveOS/ and move the /home/ folder to it). This installation option is only available through the script, '[[fedora:livecd-iso-to-disk|livecd-iso-to-disk]]'. The Windows and Fedora 'Live USB Creator' installers do not provide this option as of July 2011.
# Host device file space - this is the file system that is outside of the LiveOS file tree, but is accessible through the /mnt/live folder mount point.  There, one finds the boot configuration files and anything else one had on the device before loading the SoaS image.  One may save files here without consuming the other, limited file spaces. (This file space is limited by the device capacity).
+
# Host device file space - this is the USB stick or SD card file system that is outside of the LiveOS file tree, but which is accessible through the /mnt/live folder mount point of a booted LiveOS installation.  There, one finds the boot configuration files and anything else one had on the device before loading the SoaS image.  One may save files here without consuming the other, limited file spaces. (This file space is limited by the device capacity).
    
The all-purpose, persistent overlay is needed for operating system changes and updates.
 
The all-purpose, 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 (using the --home-size-mb NN --delete-home options), which will hold all the Activities one wants to try and, perhaps later, throw away—all without consuming the write-once, overlay that can be consumed very quickly, because file space is un-reusable.
+
But, one may find many advantages to installing Sugar on a Stick with a persistent, home folder (using the --home-size-mb NN --delete-home options), which will hold all the Activities one wants to try and, perhaps later, throw away—all without consuming the write-once, overlay that can be consumed very quickly, because this particular file space is not normally reusable.
    
Additionally, keeping some storage space on the device disc outside of the LiveOS system will let you copy, carry, and delete large resource files, such as 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.)
 
Additionally, keeping some storage space on the device disc outside of the LiveOS system will let you copy, carry, and delete large resource files, such as 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 the following options with '''livecd-iso-to-disk''' or '''modified_livecd-iso-to-disk''' (on a single Terminal Activity or console command line, even though the wiki may wrap the following text in accord with your browser window size):
+
[[Sugar on a Stick]] may be installed on a 1-GB USB device using the following options with '''[[fedora:livecd-iso-to-disk|livecd-iso-to-disk]]''' (on a single, Terminal Activity or console command line, even though the wiki may wrap the following text in accord with your browser window size):
    
:{{Code|./livecd-iso-to-disk --reset-mbr --overlay-size-mb 300 --home-size-mb 200 --delete-home --unencrypted-home /path/to/source/iso/or/device /dev/sd'''?'''1}}
 
:{{Code|./livecd-iso-to-disk --reset-mbr --overlay-size-mb 300 --home-size-mb 200 --delete-home --unencrypted-home /path/to/source/iso/or/device /dev/sd'''?'''1}}
Line 36: Line 37:  
The above configuration would allow space for the home folder, the operating system, and a little on the device root.
 
The above configuration would allow space for the home folder, the operating system, and a little on the device root.
   −
But with a larger capacity device, one can allocate the resources to suit the anticipated use, as described above.
+
But with a larger capacity device, one may allocate the resources to suit the anticipated use, as described above.
    
==File Systems==
 
==File Systems==
Line 42: Line 43:  
The Fedora LiveOS uses the [[wikipedia:Device mapper|Device-mapper]] service of the Linux kernel to manage the file stores on the device.  This is the same service that is used by [[wikipedia:Logical Volume Manager (Linux)|Logical Volume Manager]] to provide disc partition services.
 
The Fedora LiveOS uses the [[wikipedia:Device mapper|Device-mapper]] service of the Linux kernel to manage the file stores on the device.  This is the same service that is used by [[wikipedia:Logical Volume Manager (Linux)|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 [[wikipedia:Copy-on-write|Copy-on-write]] service that tracks only changed bits of data in the snapshot file and then re-referencing any pointers to any 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 so, physical storage space is consumed in the write-once file space rather than recovered.
+
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 (copied from the compressed SquashFS.img on the read-only LiveCD or installation .iso file) with a [[wikipedia:Copy-on-write|Copy-on-write]] service that tracks only changed bits of data in the snapshot (overlay) file and then re-referencing file 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.  With this mechanism, 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 {{Code|dmsetup}} provides a {{Code|status}} report.  '''Sugar Cellar''' is a small, utility script which 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.
+
Consumption of the space allocated for persistent storage in the snapshot overlay file may be tracked with the ''device mapper'' {{Code|dmsetup status}} report.  '''Sugar Cellar''' is a small, utility script which uses that service to allow for Learner testing and discovery. It will help Learners manage their storage resources and learn ways to economize limited resources.
 
   
 
   
 
* ''Sugar Cellar'' is available at http://people.sugarlabs.org/fgrose/SugarCellar and as a component of [[Sugar on a Stick/Sugar Clone]].
 
* ''Sugar Cellar'' is available at http://people.sugarlabs.org/fgrose/SugarCellar and as a component of [[Sugar on a Stick/Sugar Clone]].
 +
 +
 +
Several developments in the Sugar on a Stick design may be considered to maximize the endurance of the LiveOS image.
 +
 +
===Avoid persistent overlay consumption===
 +
 +
* Use a persistent /home folder (discussed above).
 +
*: This is a very effective method to avoid consumption and will also make the Journal files more available for sharing and backup purposes.
 +
* Move the root user's home to /home/root in a persistent home.img
 +
*: This would avoid some consumption, but would compromise the root user account if there was a boot problem and the /home folder was not mounted.
 +
* Mount more folders onto temporary, in-memory filesystems (like /var/cache/yum, /var/tmp, & /tmp are now).
 +
** /var/lib/NetworkManager (holds a timestamps file that is deleted and refreshed quite often, ~every 6 minutes)
 +
** /var/log/audit (holds the SELinux audit.log that records a great many file accesses.)
 +
** /var/spool/abrt (holds often large, error reports and core dumps).  Learners could be advised to act on any abrt reports in the current session or copy the reports to other permanent storage, such as in /home/ or external storage.
 +
** there may be other good candidates...
 +
 +
===Provide image recompression and overlay refreshment===
 +
 +
[[Sugar on a Stick/Sugar Clone]] provides a method to build a customized LiveOS image installation file through the [[Sugar_on_a_Stick/Sugar_Clone#SoaS-remix | SoaS-remix]] bundle.  The SoaS-remix.iso installation file can be used to redistribute the customized image.  A new installation from this .iso will have the old image recompressed and a fresh overlay. With the current version, the home.img file must be manually copied to a new installation.  One's aging SoaS image can be refreshed by an over-installation (see the instructions on the referenced page).
 +
 +
Development is proceeding on a new version of Sugar Clone, which uses the Device-mapper mirror facility to copy and merge the root filesystem and overlay, and then replaces the compressed SquashFS images on the USB or SD card with fresh, recompressed versions along with a refreshed overlay.  This procedure does not require re-running the livecd-iso-to-disk script to effect the refreshment.  An updated version of livecd-iso-to-disk will provide --copy-home, --reset-overlay, & --include <path s> options to support installation of the new, remixed builds.
 +
 +
The remixing a LiveOS image is also a good way to maintain and distribute system updates. Many software security, enhancements, and bug fixes are distributed through PackageKit (Software Update) or Yum update, which are turned off by default on LiveOS installations like SoaS.  After manually running an update, the image can be remixed to incorporate the changes into a new Updated-SoaS.iso file.  This process could be migrated to the Sugar BuildBot service to provide the Community with an up-to-date Sugar on a Stick image.

Navigation menu