Sugar on a Stick/Sugar Clone: Difference between revisions

No edit summary
No edit summary
 
(4 intermediate revisions by the same user not shown)
Line 6: Line 6:


{{Message|'''Latest news''':
{{Message|'''Latest news''':
'''23 September 2012''': I've updated editliveos.py with bug fixes and simplifications.  Run it in from a folder with these files:
https://git.sugarlabs.org/~FGrose/soas/sugar-clone-extensions/trees/master/editliveos
There is also a new Bash script, LiveOS-merge, for merging a LiveOS snapshot and refreshing an installation with the new image. (A new
osmin.img is not created, but it is only used during installation of a traditional image from a LiveOS image.)
'''17 June 2012''': I've posted my working files for a new version of edit-livecd, which I named editliveos.py in this commit,
'''17 June 2012''': I've posted my working files for a new version of edit-livecd, which I named editliveos.py in this commit,
http://git.sugarlabs.org/soas/sugar-clone-extensions/commit/8c4e03323fc9a7e630e6c62213bb842909fbaa00
http://git.sugarlabs.org/soas/sugar-clone-extensions/commit/8c4e03323fc9a7e630e6c62213bb842909fbaa00
Line 14: Line 20:
It includes several new options for adjusting the image filesystem size as well as home.img and overlay file sizes. Expand the [[#editliveos.help]] listing below.
It includes several new options for adjusting the image filesystem size as well as home.img and overlay file sizes. Expand the [[#editliveos.help]] listing below.


It includes editliveos.py, liveimage-mount, and temporary versions of fs.py, live.py, creator.py, util.py (pending incremental patches for livecd-tools acceptance).  The livecd-iso-to-disk version is not up-to-date with all the recent changes and improvements.
It includes editliveos.py, liveimage-mount, and temporary versions of fs.py, live.py, creator.py, util.py (pending incremental patches for livecd-tools acceptance).  The livecd-iso-to-disk version is not up-to-date with all the recent changes and improvements.}}
 
'''10 February 2011''': A new bundle, named '''[[#SoaS-remix|SoaS-remix]]''', is an installable .iso system image file builder. It includes edit-liveos.py, a launcher named 'liveos-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), build a new iso, 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 172: Line 170:
* 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.
====editliveos.help====
====editliveos.help====
Below is the output of editliveos --help in a working version from 17 June 2012.
Below is the output of editliveos --help in a working version from 25 January 2013.
{{Show|'''editliveos.py --help'''|<pre>Usage:  
{{Show|'''editliveos.py --help'''|<pre>Usage:  
               editliveos.py: [options] <LiveOS_source>
               editliveos.py: [options] <LiveOS_source>
Line 187: Line 185:
                         [-N, --noshell]
                         [-N, --noshell]
                         [-t, --tmpdir <tmpdir>]
                         [-t, --tmpdir <tmpdir>]
                        [-T, --leave-tmpfiles]
                         [-y, --yumcache <cachedir>]
                         [-y, --yumcache <cachedir>]
                         [-e, --exclude <exclude, s>]
                         [-e, --exclude <exclude, s>]
Line 258: Line 257:
                         Temporary directory to use for staging the build.
                         Temporary directory to use for staging the build.
                         (default: /var/tmp)
                         (default: /var/tmp)
  -T, --leave-tmpfiles  Skip deletion of temporary files and directories and
                        unmounting of the edited image.
   -y CACHEDIR, --yumcache=CACHEDIR
   -y CACHEDIR, --yumcache=CACHEDIR
                         Directory to use for for the yum cache. default: None
                         Directory to use for for the yum cache. default: None
Line 312: Line 313:
                         Specifies a new size of NN MiB for the overlay (or
                         Specifies a new size of NN MiB for the overlay (or
                         changing the size by a difference of +NN or -NN MiB,
                         changing the size by a difference of +NN or -NN MiB,
                         if a sign is prefixed).  If NN = 0 (or nets to <= 0),
                         if a size is prefixed).  If NN = 0 (or nets to <= 0),
                         no change will be made.
                         no change will be made.
   --refresh-only        Specify replacing the squashfs.img or ext3fs.img of
   --refresh-only        Specify replacing the squashfs.img or rootfs_img of
                         the source LiveOS installation instance with such
                         the source LiveOS installation instance with such
                         files from the new build, and resetting any overlay.
                         files from the new build, and resetting any overlay.
Line 322: Line 323:
                         Specify the compression type for SquashFS. Will
                         Specify the compression type for SquashFS. Will
                         override the current compression or lack thereof.
                         override the current compression or lack thereof.
   --compress            Specify compression of the filesystem image,
   --compress            Specify compression for the filesystem imageUsed when
                         ext3fs.img. Used when overriding an uncompressed
                         overriding an uncompressed source.
                        source.
   --skip-compression    Specify building the .iso with an uncompressed root
   --skip-compression    Specify building the .iso with an uncompressed
                         file system.
                         ext3fs.img file system.
   --refresh-uncompressed
   --refresh-uncompressed
                         Specify refreshing the source with an uncompressed
                         Specify refreshing the source with an uncompressed
                         ext3fs.img
                         root file system.
   --skip-minimize      Specify no osmin.img minimal snapshot.
   --skip-minimize      Specify no osmin.img minimal snapshot.
   -a KERNELARGS, --extra-kernel-args=KERNELARGS
   -a KERNELARGS, --extra-kernel-args=KERNELARGS
Line 417: Line 417:
The script code is below:
The script code is below:
{{Iframe
{{Iframe
|http://git.sugarlabs.org/~FGrose/soas/sugar-clone-extensions/blobs/master/sugar-clone/edit-liveos.py
|https://git.sugarlabs.org/~FGrose/soas/sugar-clone-extensions/blobs/master/editliveos/editliveos.py
|http://git.sugarlabs.org/~FGrose/soas/sugar-clone-extensions/blobs/master/sugar-clone/edit-liveos.py#line4|800|600|1}}
|https://git.sugarlabs.org/~FGrose/soas/sugar-clone-extensions/blobs/master/editliveos/editliveos.py#line4|800|600|1}}