Sugar on a Stick/Sugar Clone
Sugar Clone makes it easy to share your personally-customized version of Sugar on a Stick.
- Start with a fresh install of Sugar on a Stick (or use your current or favorite working image).
- (For greatest flexibility and reliability, use the livecd-iso-to-disk option, --home-size-mb NNN )
- Add Activities, change Home favorites, save Browse bookmarks, Etoys projects, Physics model templates, download distributable ebooks, ... ...
- Plug in a second, target USB/SD stick.
- Switch to the Terminal Activity and execute 3 simple commands.
Voilà, you have a Sugar Clone! And the Sugar Clone can make new Sugar Clones with just 1 simple, Terminal command.
Sugar Clone is, at this point in time (August 2010), a Bash script that aids in the copying of a customized LiveOS image, such as Sugar on a Stick, to a secondary device. It works from within a booted LiveOS image to copy that image. Or it may be used to copy a LiveOS image between 2 attached USB/SD storage devices. It is intended to support the Sugar customization kit projects.
A small, utility script, Sugar Cellar, is 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.
See this announcement post,
And this follow-on discussion thread,
- See the embedded help documentation in the script displayed below.
Pre-boot installation option:
- Obtain the SugarClone script at http://people.sugarlabs.org/fgrose/SugarClone.
- Before booting the SoaS device that will be the source of the new Sugar Clone, copy the SugarClone script to the root, '/', folder at the base of the filesystem for the device, or, to /mnt/live (from the perspective of a running LiveOS image).
- Boot the computer from the USB stick into SoaS, and insert, or have a second USB device inserted, into the computer.
- In the Terminal Activity of that running SoaS image, enter the command,
If there is more than one USB/SD storage device available, a menu of the devices will appear allowing for selection of the target device.
The scripts will copy the currently running image to the target device. When that device is booted, a new, Sugar Learner sign-in will be triggered. The previously customized Journal and operating system will be present on the Sugar Clone.
Live USB installation option
On a running LiveOS image, the root folder of the parent USB/SD device is available at the /mnt/live mount point. The SugarClone script can be obtained (assuming Internet connectivity) as follows:
In the Terminal Activity ,
change the working directory:
Get the SugarClone script file:
Possible Use Cases
- A teacher wants to prepare a SoaS image with a custom set of installed Activity bundles or a Journal of Activity instances for an upcoming class term.
- The teacher modifies their current working image by adding or deleting Activity bundles from their Home view and adding or removing Journal entries with specific content (such as a Physics model template or Etoys project), even saving distributable ebooks, or bookmarks in Browse Activity instances that are named for specific sets of local web destinations (a class portal perhaps for deployments lacking Internet connectivity).
- The teacher scrubs out any personal passwords or other history that should not be shared in the new copies.
- A fresh or recycled USB stick is inserted into the computer running the customized SoaS image and the SugarClone script is executed.
Full image backup or sharing
- A Learner has modified their environment, perhaps adding Activity bundles and prepared specific instances such as a Activities/Physics simulation.
- Their modifications include changes to their operating system installed through yum or RPM to obtain some new core functionality.
- The Learner wants to archive or share this image with friends or for a backup.
- Personal or private information is scrubbed from the Journal or Browse history and other potential stores.
- The User creates one or more Sugar Clones.
This method of backup has the advantage that it copies Learner changes to the core operating system as well as the Journal. A LiveOS image using a separate persistent home folder could be partially cloned with either the operating system overlay or home folder without the other should that be desired.
- Other neat uses for the modified_livecd-iso-to-disk script.
These scripts have been tested with SoaS-Mirabelle (available at http://alt.fedoraproject.org/pub/alt/nightly-composes/soas/) but should work with other versions of SoaS.
The current version of the script has the /bin/bash shell specified without the -x (xtrace) option. Set this option, #!/bin/bash -x in the first line of the script to aid testing. When set, the script will show a lot of output on the screen as it runs.
The script is copied to any new Sugar Clone devices prepared with this script so that Sugar Clone images can easily propagate themselves. This also applies to all new SoaS installations that are prepared with these scripts.
- More review and testing.
- SD cards
ONE PROBLEM on Acer Aspire One 532H: "Turns out the SD adapter uses the PCIe bus" and is not recognized by Sugar or your Script anyway to detect this in the script? (It is being used in test deployments now.) The SD slot is NOT bootable on this model but could be used to make clone custom SD's for use on other netbooks (EeePC900) satellit 04/26/2010
- Submission of the modified_livecd-iso-to-disk script upstream.
- Modifications for XOs.
- Modifications for Intel Macintosh computers.
Extraction of the Learner's Sugar image name for labeling the Clone.(available 14 April 2010)
- A Sugar Activity that calls or controls the scripts. See Activities/Toaster.
- A way to automatically identify extra partitions on devices with more than one available partition.
- A way to automatically identify live media images on secondary devices and partitions that could be used as sources for a Sugar Clone.
Bundling of the scripts for convenience until they are included in SoaS.(available 23 April 2010)
- Extend the capability to write CD-ROM image files for inexpensive distribution.
- Extend the facility to any Sugar image.
These all should help us better prepare a SoaS customization kit.
The script is available at http://people.sugarlabs.org/fgrose/SugarClone and is displayed from there below.
Embedded help, which describes the script and its usage in greater detail, is available in the script below (after the stock headers, click 3 to 5 times in the vertical scroll bar and look for 'shortusage()' and then the more complete 'usage()' functions).