Installing "Sugar on a stick" (Strawberry Release) On A USB Stick

Want to support HowtoForge? Become a subscriber!
 
Submitted by falko (Contact Author) (Forums) on Sun, 2009-08-02 17:25. :: Ubuntu | Desktop

Installing "Sugar on a stick" (Strawberry Release) On A USB Stick

Version 1.0
Author: Falko Timme <ft [at] falkotimme [dot] com>
Follow me on Twitter
Last edited 07/15/2009

Sugar is the desktop environment that is used for the "One Laptop per Child" (OLPC) netbooks. It can also be installed on normal computers and even run off of a USB stick (which should have at least 1GB of size). This guide shows how you can install Sugar (the Strawberry release which is based on Fedora 11) on a USB stick.

I do not issue any guarantee that this will work for you!

 

1 Preliminary Note

In this tutorial I use an Ubuntu 9.04 desktop to install Sugar onto a USB stick. You can as well use a Fedora 11 desktop as the needed packages are available for Fedora, too.

I'm using an 8GB USB stick here; the minimum recommended size is 1GB.

 

2 Installing "Sugar on a stick"

Go to http://wiki.sugarlabs.org/go/Sugar_on_a_Stick/Strawberry and download the soas-strawberry.iso file to your hard drive (e.g. your desktop, ~/Desktop):

Then open a terminal (Applications > Accessories > Terminal)...

... and install the packages syslinux, isomd5sum, and cryptsetup:

sudo aptitude install syslinux isomd5sum cryptsetup

We also need the livecd-iso-to-disk.sh script which we download to our desktop as well and make it executable:

cd ~/Desktop
wget http://download.sugarlabs.org/soas/releases/livecd-iso-to-disk.sh
chmod 755 livecd-iso-to-disk.sh

Then plug in your USB stick. You should see its icon on your desktop:

Run

df -h

to find out the device name of your USB stick. In this example it's /dev/sdf1:

falko@falko-desktop:~$ df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda1             449G  2.6G  423G   1% /
tmpfs                 1.8G     0  1.8G   0% /lib/init/rw
varrun                1.8G  104K  1.8G   1% /var/run
varlock               1.8G     0  1.8G   0% /var/lock
udev                  1.8G  168K  1.8G   1% /dev
tmpfs                 1.8G   76K  1.8G   1% /dev/shm
lrm                   1.8G  2.7M  1.8G   1% /lib/modules/2.6.28-11-generic/volatile
/dev/sdf1             7.6G  156K  7.6G   1% /media/disk
falko@falko-desktop:~$

Run

sudo fdisk -l

and make sure that you have an asterisk (*) in the Boot column of your USB stick:

falko@falko-desktop:~/Desktop$ sudo fdisk -l

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x0000c744

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1       59442   477467833+  83  Linux
/dev/sda2           59443       60801    10916167+   5  Extended
/dev/sda5           59443       60801    10916136   82  Linux swap / Solaris

Disk /dev/sdf: 8086 MB, 8086617600 bytes
255 heads, 63 sectors/track, 983 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x0000a19b

   Device Boot      Start         End      Blocks   Id  System
/dev/sdf1   *           1         983     7895916    b  W95 FAT32
falko@falko-desktop:~/Desktop$

Then unmount the USB stick (right-click its icon and select Unmount Volume)...

... and wipe the MBR of your USB stick:

sudo dd if=/dev/zero of=/dev/sdf bs=446 count=1

(Make sure you use the correct device name!)

Afterwards, you can install Sugar onto your USB stick as follows:

sudo ~/Desktop/livecd-iso-to-disk.sh --overlay-size-mb 300 --home-size-mb 160 --delete-home --unencrypted-home ~/Desktop/soas-strawberry.iso /dev/sdf1

Make sure you use the correct device name of your USB stick (/dev/sdf1 in this example) and the correct paths to livecd-iso-to-disk.sh and soas-strawberry.iso (as you remember, I stored both in ~/Desktop)!

Output should be as follows:

falko@falko-desktop:~/Desktop$ sudo ~/Desktop/livecd-iso-to-disk.sh --overlay-size-mb 300 --home-size-mb 160 --delete-home --unencrypted-home ~/Desktop/soas-strawberry.iso /dev/sdf1
Verifying image...
/home/falko/Desktop/soas-strawberry.iso:   2408e82d522599bfed47272bbba7e0b5
Fragment sums: 4ed71691b81c6c443f1ba9ad98ce9d262a1ef4ae3a4272f3f44956d3d998
Fragment count: 20
Checking: 100.0%

The media check is complete, the result is: PASS.

It is OK to use this media.
MBR appears to be blank.
Do you want to replace the MBR on this device?
Press Enter to continue or ctrl-c to abort

<-- ENTER
Copying live image to USB stick
Updating boot config file
Initializing persistent overlay file
300+0 records in
300+0 records out
314572800 bytes (315 MB) copied, 46.6754 s, 6.7 MB/s
Initializing persistent /home
160+0 records in
160+0 records out
167772160 bytes (168 MB) copied, 25.8972 s, 6.5 MB/s
Formatting unencrypted /home
mke2fs 1.41.4 (27-Jan-2009)
Filesystem label=
OS type: Linux
Block size=1024 (log=0)
Fragment size=1024 (log=0)
40960 inodes, 163840 blocks
8192 blocks (5.00%) reserved for the super user
First data block=1
Maximum filesystem blocks=67371008
20 block groups
8192 blocks per group, 8192 fragments per group
2048 inodes per group
Superblock backups stored on blocks:
        8193, 24577, 40961, 57345, 73729

Writing inode tables: done
Creating journal (4096 blocks): done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 30 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.
tune2fs 1.41.4 (27-Jan-2009)
Setting maximal mount count to -1
Setting interval between checks to 0 seconds
Installing boot loader
USB stick set up as live image!
falko@falko-desktop:~/Desktop$

Clean up the system afterwards by deleting soas-strawberry.iso and livecd-iso-to-disk.sh:

sudo rm -f ~/Desktop/soas-strawberry.iso ~/Desktop/livecd-iso-to-disk.sh

That's it! You can now boot your computer off your USB stick. Make sure that you configure the BIOS so that the computer boots off your USB stick and not the hard drive!

This is how Sugar looks:

In order to learn how to use Sugar, take a look at the Sugar manual and the Sugar keyboard shortcuts.

 

3 Links


Please do not use the comment function to ask for help! If you need help, please use our forum.
Comments will be published after administrator approval.
Submitted by Dragos (not registered) on Mon, 2009-08-03 12:10.
I did this last year to repair some laptops. The most time consuming part was the reading of the manual since it has that button pressiongs trick.
Submitted by Anonymous (not registered) on Mon, 2009-08-03 06:29.

Great job well explained!

Submitted by Anonymous (not registered) on Sun, 2010-04-18 13:25.

If you want to run Sugar as exclusive o.s. in you Hard Drive download the last soas go in the Sugar desktop to list view (is not present in the normal view), open Terminal activity and run " zyx-installer "  .  That`s all.

I tried it on four pc`s and it works without problem.

Submitted by SlartiMitvar (not registered) on Sun, 2010-10-03 03:15.
Apparently it's actually "zyx-liveinstaller" according to the sugarlabs wiki.