Changes

no edit summary
Line 5: Line 5:       −
{{Message|'''Latest news''': An alpha version of a python script that allows one to rebuild a custom iso image from a running image by 1.) staging the build on an attached hard drive and then 2.) copy only the content already on the current image. See http://www.mail-archive.com/soas@lists.sugarlabs.org/msg02044.html '''28 January 2011''' See '''[[#edit-liveos.py]]''' below.}}
+
{{Message|'''Latest news''':
 +
'''10 February 2011''': A new bundle, named '''[[#SoaS-remix|SoaS-remix]]''', has been prepared, which includes edit-liveos.py with a launcher named 'livecd-disk-to-iso', and temporary versions of fs.py, live.py, creator.py (pending livecd-tools acceptance).   
 +
The SoaS-remix bundle will inject itself into the image, unbundle itself into /tmp,
 +
launch edit-liveos.py (with editable options), then cleanup /tmp.
 +
Sugar Clone is now in a Sugar on a Stick repository clone at http://git.sugarlabs.org/~FGrose/soas/sugar-clone-extensions.
 +
 
 +
'''28 January 2011''': An alpha version of a python script that allows one to rebuild a custom iso image from a running image by 1.) staging the build on an attached hard drive and then 2.) copy only the content already on the current image. See http://www.mail-archive.com/soas@lists.sugarlabs.org/msg02044.html See '''[[#edit-liveos.py]]''' below.}}
      Line 141: Line 147:     
===Sugar Cellar===
 
===Sugar Cellar===
 +
A small, utility script, available in the bundle, or separately.  It is used to report on the storage space available on the persistent overlay, home directory, and other file spaces attached to the running image.
 +
 
{{Iframe|collapsed=|http://git.sugarlabs.org/~FGrose/soas/sugar-clone-extensions/blobs/master/sugar-clone/SugarCellar|http://git.sugarlabs.org/~FGrose/soas/sugar-clone-extensions/blobs/master/sugar-clone/SugarCellar#line4|800|200|1}}
 
{{Iframe|collapsed=|http://git.sugarlabs.org/~FGrose/soas/sugar-clone-extensions/blobs/master/sugar-clone/SugarCellar|http://git.sugarlabs.org/~FGrose/soas/sugar-clone-extensions/blobs/master/sugar-clone/SugarCellar#line4|800|200|1}}
 
===Bundle===
 
===Bundle===
Line 152: Line 160:  
** ''livecd-iso-to-disk'' uses the --home-size-mb NNN options to specify the home.img installation.  
 
** ''livecd-iso-to-disk'' uses the --home-size-mb NNN options to specify the home.img installation.  
 
* With edit-liveos (disk-to-iso), a nearly-consumed overlay can be refreshed by rebuilding the system into a new, SquashFS image that re[[wikipedia:Sparse_file|sparse]]s the system files and repackages them into an iso installation file for reuse or distribution.
 
* With edit-liveos (disk-to-iso), a nearly-consumed overlay can be refreshed by rebuilding the system into a new, SquashFS image that re[[wikipedia:Sparse_file|sparse]]s the system files and repackages them into an iso installation file for reuse or distribution.
 +
===SoaS-remix===
 +
'''SoaS-remix''' is a bundle of edit-liveos.py and supporting scripts to make testing and use easier.  The bundle will change with development. As of 10 February 2011 it contains,
 +
* edit-liveos.py - the primary remix builder
 +
* livecd-disk-to-iso - a Bash launcher script for edit-liveos.py
 +
* fs2.py, live2.py, creator2.py - temporary modules from livecd-tools with pending squashfs-compression_type() functionality
 +
 +
Get the '''SoaS-remix''' bundle:
 +
:{{Code|wget http://people.sugarlabs.org/fgrose/SoaS-remix}}
 +
 
====Usage====
 
====Usage====
 
This is my recipe:
 
This is my recipe:
 
# Having used the ''livecd-iso-to-disk'' with --home-size-mb NNN to install my SoaS iso onto a Live USB device, I proceed to customize my working Stick with new Activites, content, or system settings as described [[#Introduction|above]] in step 2.
 
# Having used the ''livecd-iso-to-disk'' with --home-size-mb NNN to install my SoaS iso onto a Live USB device, I proceed to customize my working Stick with new Activites, content, or system settings as described [[#Introduction|above]] in step 2.
# I copy ''edit-liveos.py'' onto the USB device bearing SoaS (to the /LiveOS/ folder on the device's filesystem).
+
# Before copying ''SoaS-remix'' to the Live USB, it may be easiest to open it in an editor and adjust the {{Code|Set}} command at line 80 to something appropriate for your system.<br>
# Before running the ''edit-liveos'' script, I run these 2 system updates:
+
#:{{Code|# Example command line. Edit and uncomment the set statement below to suit.}}
 +
#:{{Code|#set -- -v -n SoaSremix -o /media/WD-ext4 -t /media/WD-ext4 -i /GPL \}}
 +
#:{{Code|#      -r /boot/olpc_build --builder fgrose --clone /dev/live}}
 +
# I then copy ''SoaS-remix'' onto the USB device bearing a SoaS installation (to the /LiveOS/ folder on the device's filesystem).
 +
# Before running the ''SoaS-remix'' script bundle, I run these 2 system updates:
 
#* <code>yum install rsync</code>
 
#* <code>yum install rsync</code>
 
#* <code>yum update livecd-tools</code>
 
#* <code>yum update livecd-tools</code>
 +
#*: (Together, these operations consume about 8 MiB of overlay capacity, so be sure to have that available.  You can use [[#Sugar Cellar]] to check.)
 
# I boot my Sugar Stick on a system with a hard disc bearing an ext4-formatted partition with well over 5 GiB of free space.
 
# I boot my Sugar Stick on a system with a hard disc bearing an ext4-formatted partition with well over 5 GiB of free space.
 
# Once booted, I mount the partition from a Terminal activity with the root user account:
 
# Once booted, I mount the partition from a Terminal activity with the root user account:
 
#* <code>su -</code>
 
#* <code>su -</code>
#* <code>mount /dev/sdb2 /mnt/ext4</code>
+
#* <code>mount /dev/sdb2 /media/ext4</code>
 
#*:(The device node and mountpoint names will depend on your resource names.  You might find the device node by issuing <code>df -Th</code> or <code>cat /proc/partitions</code> and knowing something about your disc resources.)
 
#*:(The device node and mountpoint names will depend on your resource names.  You might find the device node by issuing <code>df -Th</code> or <code>cat /proc/partitions</code> and knowing something about your disc resources.)
# I invoked ''edit-liveos'' (saved as edit-liveos.py) with this command line:
+
# If you didn't edit the {{Code|Set}} command before copying, you can use the vi editor or just invoke ''SoaS-remix'' with suitable parameters, such as,
#: <code>/mnt/live/LiveOS/edit-liveos.py -n SoaSremix -o /mnt/ext4 -t /mnt/ext4 -i /GPL -r /boot/olpc-build --builder fgrose --clone /dev/live</code>
+
#: {{Code|/mnt/live/LiveOS/SoaS-remix -v -n SoaSremix -o /media/ext4 -t /media/ext4 -i /GPL -r /boot/olpc-build --builder fgrose --clone /dev/live}}
  <nowiki> -n names the remix,
+
# Otherwise, with a proper {{Code|Set}} command, ''SoaS-remix'' may be invoked simply with this command line:
 +
#: {{Code|/mnt/live/LiveOS/SoaS-remix}}
 +
 
 +
'''Common options''':
 +
  <nowiki> -v requests a slightly more verbose output,
 +
-n names the remix,
 
  -o designates the output file location,
 
  -o designates the output file location,
 
  -t designates the temporary directory to use,
 
  -t designates the temporary directory to use,
Line 174: Line 201:  
  --builder names the builder,
 
  --builder names the builder,
 
  --clone flags the cloning feature to be invoked by the script on the
 
  --clone flags the cloning feature to be invoked by the script on the
  /dev/live device partition (the currently running image).</nowiki>
+
  /dev/live device partition (the currently running image).
The script will launch and spew the files being copied to the screen and the progress of the rebuilding process.
     −
After about 10 minutes (on my system) the product iso file will be ready in the file, <code>/mnt/ext4/SoaSremix-x86_64-YYYYMMDD.HH.iso</code>
+
-h (alone) will show you some more options</nowiki>ns</nowiki>
* This iso holds, in the <code>/LiveOS/</code> directory, the {{Code|home.img}} from the booted Live USB Stick, and fresh {{Code|squashfs.img osmin.img}} files.
+
 
 +
 
 +
The script will launch and provide limited process reporting. (I open another Terminal tab and list the contents of my temporary directory to see the changes occurring.)
 +
 
 +
After about 10 minutes (on my system) the product iso file will be ready in the file, {{Code|/media/ext4/SoaSremix-x86_64-YYYYMMDD.HHMM.iso}}
 +
* This iso holds, in the {{Code|/LiveOS/}} directory, the {{Code|home.img}} from the booted Live USB Stick, and the fresh {{Code|squashfs.img osmin.img}} files.
    
The ''livecd-iso-to-disk'' script should be used to install the new build, but it currently doesn't propagate a home.img file from the iso, so you will have to manually move the home.img file to the /LiveOS/ folder of a new USB device.
 
The ''livecd-iso-to-disk'' script should be used to install the new build, but it currently doesn't propagate a home.img file from the iso, so you will have to manually move the home.img file to the /LiveOS/ folder of a new USB device.
Line 191: Line 222:  
If the source Live USB was installed without a separate {{Code|home.img}}, the above commands will also refresh your image, but it will consume the overlay more rapidly as all Activity storage is in the write-once overlay storage.  Even deleting Activities will consume more of the storage! (See [[LiveOS image]].) Because the home folder (Learner's Journal and Activities) are mixed into the system SquashFS image file in this configuration, that portfolio as a whole will be less easily swapped or shared from one device or machine to another.
 
If the source Live USB was installed without a separate {{Code|home.img}}, the above commands will also refresh your image, but it will consume the overlay more rapidly as all Activity storage is in the write-once overlay storage.  Even deleting Activities will consume more of the storage! (See [[LiveOS image]].) Because the home folder (Learner's Journal and Activities) are mixed into the system SquashFS image file in this configuration, that portfolio as a whole will be less easily swapped or shared from one device or machine to another.
   −
(Some of the above statements need to actually be tested. So please do so.)
+
Testing of all of the above would be appreciated.
 
      
The script code is below:
 
The script code is below: