Sugar on a Stick/Installation
<imagemap>
File:Download-circle.png|120px rect 58 0 109 55 Microsoft Windows rect 146 28 195 85 GNU/Linux rect 146 128 200 185 OLPC XO rect 58 154 112 200 VirtualBox rect 0 37 50 130 Apple Mac OS X rect 86 32 125 130 Backup and Restore desc none </imagemap> |
SoaS installation on USB/SD devices
with Microsoft Windows
There are three ways to do this:
- 1. Burn a CD-ROM disc, boot from it, then run the script, livecd-iso-to-disk
- Use Windows 7 built-in Disk Image Burner or a free utility, like ImgBurn, to write the downloaded Sugar on a Stick .iso file onto a blank CD.
- Insert a USB flash drive (or SD Card Notes) with 2 GB or more of free space into your computer.
- Boot your computer with the CD-ROM disc. You probably need to press F1, F10, F12, Esc, or a similar key as the computer starts up in order to set the boot source for your computer to the CD-ROM device.
- A successful boot will take you into Sugar on a Stick. You can From there, open the Terminal Activity, , from the Home list View.
- Switch to run commands with 'root' user permissions by entering
su -
on the command line. - Change the working directory, by entering
cd /run/initramfs/live/LiveOS
- Verify the USB/SD scsi drive node name (such as sda, sdb, etc.) and partition (such as 1, 2, etc.) for your USB/SD device. It would look like, for example,
/dev/sdb1
.- The
df -Th
command shows your device filesystem on a device node, for example, /dev/sdb1, mounted on a directory mount point, such as /run/media/liveuser/<USBdeviceManufacturer>
- The
[root@localhost ~]# df -Th Filesystem Type Size Used Avail Use% Mounted on /dev/mapper/live-rw ext4 2.9G 2.1G 773M 74% / devtmpfs devtmpfs 2.0G 0 2.0G 0% /dev tmpfs tmpfs 2.0G 72K 2.0G 1% /dev/shm tmpfs tmpfs 2.0G 632K 2.0G 1% /run tmpfs tmpfs 2.0G 0 2.0G 0% /sys/fs/cgroup /dev/sr0 iso9660 670M 670M 0 100% /run/initramfs/live tmpfs tmpfs 2.0G 32K 2.0G 1% /tmp varcacheyum tmpfs 2.0G 0 2.0G 0% /var/cache/yum vartmp tmpfs 2.0G 0 2.0G 0% /var/tmp /dev/sdb1 vfat 3.8G 4.0K 3.8G 1% /run/media/liveuser/SanDisk
- Unmount the USB device filesystem with this command:
umount /run/media/liveuser/MyUSBdiscMountPoint
, whereMyUSBdiscMountPoint
isSanDisk
in the dropdown example, above. - Execute this command line: (Substitute the
/dev/sd?1
, below, with the node name you determined in step 7, above.)./livecd-iso-to-disk --reset-mbr --overlay-size-mb 500 --home-size-mb 800 --delete-home --unencrypted-home /run/initramfs/livedev /dev/sd?1
(The 500 and 800 size values, above, are suitable for a 2 GB USB device. For a 4 GB device, one might use 1000 and 1600 megabytes instead.)
- Shutdown the physical machine.
- Reboot your computer from the newly-installed Live USB with Sugar on a Stick.
[root@localhost LiveOS]# livecd-iso-to-disk --overlay-size-mb 500 --home-size-mb 800 --unencrypted-home /run/initramfs/livedev /dev/sdb1 Verifying image... /dev/sr0: b0a9414ff7eb79b680d5c86440e19587 Fragment sums: 9bfe23577651c88dcfb78c76ac3a28a5c53eead4561e3bdc5921b8b2e748 Fragment count: 20 Press [Esc] to abort check. Checking: 100.0% The media check is complete, the result is: PASS. It is OK to use this media. Copying live image to target device. squashfs.img 630,784,000 100% 1.96MB/s 0:05:06 (xfr#1, to-chk=0/1) osmin.img 8,192 100% 0.00kB/s 0:00:00 (xfr#1, to-chk=0/1) Updating boot config file Initializing persistent overlay file 500+0 records in 500+0 records out 524288000 bytes (524 MB) copied, 216.717 s, 2.4 MB/s Initializing persistent /home 800+0 records in 800+0 records out 838860800 bytes (839 MB) copied, 344.643 s, 2.4 MB/s Formatting unencrypted /home mke2fs 1.42.8 (20-Jun-2013) Filesystem label= OS type: Linux Block size=4096 (log=2) Fragment size=4096 (log=2) Stride=0 blocks, Stripe width=0 blocks 51296 inodes, 204800 blocks 10240 blocks (5.00%) reserved for the super user First data block=0 Maximum filesystem blocks=209715200 7 block groups 32768 blocks per group, 32768 fragments per group 7328 inodes per group Superblock backups stored on blocks: 32768, 98304, 163840 Allocating group tables: done Writing inode tables: done Creating journal (4096 blocks): done Writing superblocks and filesystem accounting information: done tune2fs 1.42.8 (20-Jun-2013) Setting maximal mount count to -1 Setting interval between checks to 0 seconds Installing boot loader Target device is now set up with a Live image!
- 2. Use Fedora Live USB Creator
- (This installation method is NOT recommended for LONG-TERM usage of Sugar on a Stick!! Catastrophic data corruption may occur when the USB stick gets full! See why.)
- Download the Live USB Creator from Fedora.
- Insert a USB flash drive (or SD Card Notes) with 2 GB or more of free space into your computer.
- Launch Live USB Creator.
- Select Either
- 1) the 'Browse' button to 'Use existing Live CD' and find the downloaded .iso file image on your system.
- 2) Download Fedora and select Fedora-SoaS-{i386|x86_64}-{22|23} (This automates the download and checksum routine and directly burns to the USB/ SDCard
- Adjust the Persistent Storage slider. This enables you to save changes to the system and additional Sugar Activities onto the device. (aka persistence file or Overlay --this space by default is write once only) --see below for additional way to make /home a rw overlay
- Select your flash drive as the target, and click the Create Live USB button.
- With the latest version of Fedora LiveUSB Creator you have TWO (2) option for burning method
- 1) CP (non destructive) -- meaning you can still use the unused space on a larger (8-16-32-64Gb) usb for whatever post burn.
- 2) DD ( the old school way) Note: THIS WILL destroy any previous data make sure you properly select the drive to use AND make backups of any pre-existing important data (you will not be easily able to retrieve overwritten data)
- Wait for the process to finish, then close the Live USB Creator program.
- Stop your flash drive with the Safely Remove Hardware and Eject Media notification area icon dialog, and eject it.
- See a screenshot tutorial for this.
- See a video of an earlier version of this process.
- 3. Launch a virtual machine with the Sugar on a Stick .iso file, then run the script, livecd-iso-to-disk
- Download and install VirtualBox (for example; you could do something similar with another vm).
- Create a new virtual machine.
- Choose Linux for the Operating System and Version Fedora (64 bit) if available, or Fedora, on systems lacking 64-bit functionality.
- Attach the Sugar on a Stick .iso file as a CD in the Storage Section
- Insert a USB storage device into your physical computer and enable the VirtualBox USB controller. Then add a filter to recognize the inserted device in the USB section of the VirtualBox machine setup.
- Start the new virtual machine.
- Verify that the USB device is recognized in the running virtual machine.
- Your device appears in the hover box for the USB stick icon in the virtual machine bottom frame.
df -Th
shows your device filesystem on a device node, for example, /dev/sda1, mounted on a directory mount point, such as /run/media/<AccountName>/<USBdeviceManufacturer>
[root@localhost LiveOS]# df -Th Filesystem Type Size Used Avail Use% Mounted on rootfs rootfs 4.0G 2.5G 1.5G 63% / devtmpfs devtmpfs 1.6G 0 1.6G 0% /dev tmpfs tmpfs 1.6G 84K 1.6G 1% /dev/shm tmpfs tmpfs 1.6G 1.2M 1.6G 1% /run /dev/sr0 iso9660 509M 509M 0 100% /run/initramfs/live /dev/mapper/live-rw ext4 4.0G 2.5G 1.5G 63% / tmpfs tmpfs 1.6G 0 1.6G 0% /sys/fs/cgroup tmpfs tmpfs 1.6G 0 1.6G 0% /media varcacheyum tmpfs 1.6G 0 1.6G 0% /var/cache/yum tmp tmpfs 1.6G 40K 1.6G 1% /tmp vartmp tmpfs 1.6G 0 1.6G 0% /var/tmp /dev/sda1 vfat 3.7G 2.1G 1.7G 56% /run/media/liveuser/TOSHIBA
- Continue from step #4 in the Burn a CD-ROM disc section above.
- Shutdown the virtual machine.
- Reboot your physical computer from the newly-installed Live USB with Sugar on a Stick.
Notes
A Secure Digital (SD) card may not be marked as a bootable device. To check this, use these instructions at a Linux terminal or console:
- Check the disk partition table for a device, such as
/dev/sdc
,
sudo fdisk -l /dev/sdc
<----that's a lowercase letter 'L' for the list option.
parted /dev/sdc
toggle 1 boot
quit
$ sudo fdisk -l /dev/sdc Disk /dev/sdc: 4012 MB, 4012900352 bytes 124 heads, 62 sectors/track, 1019 cylinders, total 7837696 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x0000a9c7 Device Boot Start End Blocks Id System /dev/sdc1 * 62 7834071 3917005 c W95 FAT32 (LBA)
The asterisk, * , under the Boot column indicates that the partition is bootable.
with Apple Macintosh
- See and adapt the instructions at Sugar on a Stick/Mac.
with GNU/Linux
(See Sugar on a Stick/Linux for more details.)
- Use this script file http://bit.ly/livecd-iso-to-disk to create a bootable image.
(Runchmod +x livecd-iso-to-disk.sh
after you download the script to make it executable.) - Execute, as the root user, in one command with arguments, the following:
./livecd-iso-to-disk.sh --reset-mbr --overlay-size-mb 300 --home-size-mb 175 --delete-home --unencrypted-home /path/to/source.iso /dev/sd?1
- where '
?
' in the final parameter represents the target bootable device node, such assdb1
orsdc1
, etc.
- Use the
df -Th
command to confirm your devices before executing the script.
- where '
[root@MyComputer ~]# df -Th Filesystem Type Size Used Avail Use% Mounted on /dev/sda1 ext4 18G 6.6G 11G 38% / tmpfs tmpfs 1.6G 740K 1.6G 1% /dev/shm /dev/sdc1 vfat 15G 697M 15G 5% /media/SANDY /dev/sdb1 vfat 15G 2.0G 13G 14% /media/TOSHIBA
- where the mount point and filesystem sizes should help you identify what you want.
$ sudo ./livecd-iso-to-disk.sh --reset-mbr --overlay-size-mb 300 --home-size-mb 200 --delete-home --unencrypted-home /mnt/VMs/Fedora-13-x86_64-Live-SoaS.iso /dev/sdb1 Verifying image... /mnt/VMs/Fedora-13-x86_64-Live-SoaS.iso: 7bb43cb6237802347e06d636b5974796 Fragment sums: 5cb46db2dd7545c7154d99616eaa942ca515fb37188c34cf82564a498b68 Fragment count: 20 Press [Esc] to abort check. Checking: 100.0% The media check is complete, the result is: PASS. It is OK to use this media. 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, 35.3334 s, 8.9 MB/s Initializing persistent /home 200+0 records in 200+0 records out 209715200 bytes (210 MB) copied, 24.2014 s, 8.7 MB/s Formatting unencrypted /home mke2fs 1.41.12 (17-May-2010) Filesystem label= OS type: Linux Block size=1024 (log=0) Fragment size=1024 (log=0) Stride=0 blocks, Stripe width=0 blocks 51200 inodes, 204800 blocks 10240 blocks (5.00%) reserved for the super user First data block=1 Maximum filesystem blocks=67371008 25 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 33 mounts or 180 days, whichever comes first. Use tune2fs -c or -i to override. tune2fs 1.41.12 (17-May-2010) Setting maximal mount count to -1 Setting interval between checks to 0 seconds Installing boot loader USB stick set up as live image!
on an OLPC XO
This discussion thread explains why Fedora 13 and Sugar on a Stick/Mirabelle are not compatible with the XO-1 (until a fix is implemented).
- See olpc:F14 for XO for Sugar 0.90 on Fedora 14 development builds.
- See Dextrose for Sugar version 0.88 on Fedora 11 for the XO.
SoaS on VirtualBox
VirtualBox
With VirtualBox® one can run Sugar on Microsoft Windows, Intel-based Apple Macintosh, or GNU/Linux host computers from within a virtual machine window.
See this VirtualBox overview. VirtualBox is a large software installation with many features and operating system options. A User Manual and other documentation is available online. Those who have not used VirtualBox before, might find it more easy to understand and install than expected.
VirtualBox Downloads: https://www.virtualbox.org/wiki/Downloads
(See VirtualBox/Technical for some collected details.)
The following instructions are intended for those Learners interested in using VirtualBox to run Sugar. The process is not fully mature as the technology is evolving both in the VirtualBox and operating system software.
- Online IRC support is available from http://www.virtualbox.org/wiki/IRC
- Various VirtualBox experiments may be found on the discussion page.
Install VirtualBox
on Mac OS X
Follow the instructions on the VirtualBox Downloads page for Mac OS X.
on Microsoft Windows
- Download from http://www.virtualbox.org/wiki/Downloads.
on GNU/Linux
Use the VirtualBox packages available in your GNU/Linux distribution. For example, on Ubuntu, it is available in Ubuntu Software Centre.
Or, use the most recent packages from VirtualBox, see Linux Downloads.
Also, see Talk:VirtualBox page for experimental installation variations.
Setup a Virtual Machine for Sugar on a Stick
Notice: Prebuilt VirtualBox 4.1 Appliances are available. Just click "import" on one of the .vmdk or .ovf files.
- One may also use these instructions, VirtualBox/Preparing a disk image, to prepare one's own.
- In VirtualBox click New
- Click Next
- Enter a name "Sugar"
- Operating System: choose Linux
- Version: choose Fedora
- Click Next
- For memory leave 256 MB
- Click Next
- Virtual Hard Disk click Existing
- Click the little folder to the right of the selection box
- A new window pops up
- Click Add button in the toolbar
- Browse to the location where you extracted the .vdi disk image
- Click Open
- Click Select
- Click Next
- Click Finish
- Select Sugar on the left
- Click Start in the toolbar
- After a minute or two you should see the Sugar screen asking for you name
- Enter your name
- Click Done at the bottom of the window. You might have to scroll.
- From now on you can start VirtualBox and start the "Sugar" virtual machine
Setup a Virtual Machine for Ubuntu Sugar
Use Ubuntu Software Centre to install the virtualbox-guest-utils package, so that your virtual machine display can be resized to fit your computer.
Issues
- Activating the Frame might be a little difficult. The lower 2 corners are easiest and you may want to configure edge activation in the My Settings > Frame panel. With VirtualBox Guest Additions installed (see here), only the bottom edge and corners are available for Frame activation.
- On Mac keyboards, you might wish to change the Virtual Box default key for switching the Sugar cursor to the normal one, as the default key (control right arrow on Mac keyboards) is trapped by Sugar. (Windows and Linux keyboards use Right Ctrl.) You may do this change in File/settings of the Virtual Box menu.
Resources
- http://www.virtualbox.org/
- OLPC:VirtualBox
- How To Install Virtualbox Guest Additions in Fedora Guest (Based on Fedora 8)
- install the virtualbox guest additions
- on Debian, Ubuntu, or derived distributions
Chat room help
- Sugar chat room in Español (with translations to English)
- Ask for help on either of these channels.
- Please be courteous and ask your questions.
- Volunteers may not be on line all of the time. Be patient and stay connected for several minutes to see their answer.
- Read the Floss_Manuals first!
Backup and Restore
Some backup and restore options for Sugar on a Stick include the following:
- Backup and Restore - these are Activities that can be used on any Sugar installation to backup or restore the Sugar Journal.
- olpc:School Server - requires a server installation.
- Sugar on a Stick/deja-dup - a configurable backup tool.
- Sugar on a Stick/Sugar Clone - full image (operating system and home folder) cloning.