Changes

Jump to navigation Jump to search
no edit summary
Line 142: Line 142:  
{{Iframe|collapsed=|http://people.sugarlabs.org/fgrose/launcher|http://people.sugarlabs.org/fgrose/launcher|800|200|1}}
 
{{Iframe|collapsed=|http://people.sugarlabs.org/fgrose/launcher|http://people.sugarlabs.org/fgrose/launcher|800|200|1}}
 
===edit-liveos.py===
 
===edit-liveos.py===
 +
* The edit-liveos script can be thought of as a "liveos-disk-to-iso" script.  It takes the currently installed system and converts it back into an iso9660 image file—but with all the current customizations to the system and Learner files.
 +
* It is [[LiveOS image|recommended]] that you use a separate, home.img file for the Learner's /home/liveuser directory to maximize your "mileage" with the consumable storage in the system overlay file.
 +
** This installation variation is only available currently from the ''livecd-iso-to-disk'' script packaged on the installation iso at either /LiveOS/ or /mnt/live/LiveOS/ (from inside a running installation) or, in standard Fedora LiveOS Spins, in /LiveOS/ in the device's outer filesystem (this is equivalent to /mnt/live/LiveOS/ from within the running 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.
 +
====Usage====
 +
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.
 +
# I copy ''edit-liveos.py'' onto the USB device bearing SoaS (to the /LiveOS/ folder on the device's filesystem).
 +
# Before running the ''edit-liveos'' script, I run these 2 system updates:
 +
#* <code>yum install rsync</code>
 +
#* <code>yum update livecd-tools</code>
 +
# 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:
 +
#* <code>su -</code>
 +
#* <code>mount /dev/sdb2 /mnt/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.)
 +
# I invoked ''edit-liveos'' (saved as edit-liveos.py) with this command line:
 +
#: <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>
 +
#:* -n names the remix, -o designates the output file location, -t designates the temporary directory to use, #:* -i designates files from the outer USB device's filesystem to include in the build.
 +
#:*: (Multiple files may be included with this syntax: {{Code|-i "/f1, /d/f2, /d[/d.../f3]"}})
 +
#:* -r designates releasefile names in the image that may need adjustment, --builder names the builder, --clone flags the cloning feature to be invoked by the script on the {{Code|/dev/live}} 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 20 minutes (on my system) the product iso file will be ready in the file, <code>/mnt/ext4/SoaSremix-x86_64-YYYYMMDD.HH.iso</code>
 +
#* 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 code is below:
 
{{Iframe|collapsed=
 
{{Iframe|collapsed=
 
|http://people.sugarlabs.org/fgrose/edit-liveos
 
|http://people.sugarlabs.org/fgrose/edit-liveos
 
|http://people.sugarlabs.org/fgrose/edit-liveos|800|200|1}}
 
|http://people.sugarlabs.org/fgrose/edit-liveos|800|200|1}}

Navigation menu