Difference between revisions of "Sugar on a Stick/Linux"
Line 63: | Line 63: | ||
* Run it as root, making sure to pass the correct USB device and to set overlay and home size appropriately, depending on the stick size. | * Run it as root, making sure to pass the correct USB device and to set overlay and home size appropriately, depending on the stick size. | ||
: <tt>sudo ./livecd-iso-to-disk.sh --overlay-size-mb 300 --home-size-mb 160 --delete-home --unencrypted-home soas-beta.iso /dev/sdb1</tt> | : <tt>sudo ./livecd-iso-to-disk.sh --overlay-size-mb 300 --home-size-mb 160 --delete-home --unencrypted-home soas-beta.iso /dev/sdb1</tt> | ||
− | The ''livecd-iso-to-disk'' installation has the advantage over the '' | + | The ''livecd-iso-to-disk'' installation has the advantage over the ''liveusb-creator'' installation method by allowing a persistent /home/liveuser folder with the <tt>--home-size-mb ''NNN''</tt> option. This feature would allow you to update the OS image while keeping the user files (by running the script against your existing installation but <u>leaving out</u> the --home-size-mb NNN option). |
* The <code>--delete-home</code> option is used to avoid an error message while requesting both a new home (with <code>--home-size-mb</code>) and a persistent home (indirectly with <code>--unencrypted-home</code>). You wouldn't use the --delete-home option on an upgrade of the operation system only. | * The <code>--delete-home</code> option is used to avoid an error message while requesting both a new home (with <code>--home-size-mb</code>) and a persistent home (indirectly with <code>--unencrypted-home</code>). You wouldn't use the --delete-home option on an upgrade of the operation system only. | ||
Depending on the size of your usb stick, you may have to decrease <code>--overlay-size-mb</code> and <code>--home-size-mb</code> values (example, for 1 GB stick, use 200 for each). | Depending on the size of your usb stick, you may have to decrease <code>--overlay-size-mb</code> and <code>--home-size-mb</code> values (example, for 1 GB stick, use 200 for each). | ||
− | == Alternative | + | == Alternative installation methods == |
=== UNetbootin === | === UNetbootin === | ||
Line 83: | Line 83: | ||
=== Fedora Live USB Creator === | === Fedora Live USB Creator === | ||
+ | (This section is under construction.) | ||
− | Fedora | + | Fedora's ''liveusb-creator'' (see [[Sugar on a Stick/Windows | windows install section]] above for how to use). |
Needs to be loaded from Synaptic Package Manager | Needs to be loaded from Synaptic Package Manager | ||
Line 102: | Line 103: | ||
== What's next? == | == What's next? == | ||
− | After you've created your stick, it's time to [[Sugar_on_a_Stick# | + | After you've created your stick, it's time to [[Sugar_on_a_Stick#Boot|boot your stick]] and [[Sugar on a Stick/Getting Involved | test]] it out. Please also [[Sugar on a Stick/Getting Involved/Testing | report]] your observations. |
[[Category:HowTo]] | [[Category:HowTo]] |
Revision as of 08:49, 9 May 2009
Introduction
This page is designed to help you to put your Sugar on a Stick image under Linux on a thumbdrive. If you have questions, trouble or feedback, please let us know on the SoaS talk page. If you can improve these instructions, please edit the page and do so!
SoaS on an OLPC XO-1
See Sugar on a Stick/Installation/OLPC for booting an OLPC XO-1 with SoaS images.
Linux instructions
This is known to work in Fedora and Ubuntu and should work in other Linux distributions.
- Make sure you have the isomd5sum, cryptsetup, and syslinux packages installed in your distribution, as they will be needed by the "livecd-iso-to-disk" installation script. (On Ubuntu,
sudo apt-get install isomd5sum cryptsetup syslinux
will install the packages.)- isomd5sum is only needed for the recommended verification step, which checks that the .iso file is complete after its travels. The script will exit and provide a failure message if there is a problem with the file. Verification can be bypassed by using the --noverify option.
- syslinux is needed to set up booting on the FAT file system of the USB disc or Live CD.
- cryptsetup is only needed for the option to provide password protection and encryption for the persistent /home/liveuser folder. It is not necessary if one applies the recommended --unencrypted-home option. The
--unencrypted-home
option is preferred because the reduced overhead improves robustness with the compressed squashfs file system employed by the Live USB deployment.
- Plug in a 1GB or larger USB stick into your computer.
- Download the installation script: http://people.sugarlabs.org/sdz/livecd-iso-to-disk.sh (09 April 2009)
- Check the USB device. In the example below the device is /dev/sdb:
- df -h
Filesystem Size Used Avail Use% Mounted on /dev/sda1 19G 7.0G 11G 40% / tmpfs 1.5G 0 1.5G 0% /lib/init/rw varrun 1.5G 96K 1.5G 1% /var/run varlock 1.5G 0 1.5G 0% /var/lock udev 1.5G 2.9M 1.5G 1% /dev tmpfs 1.5G 104K 1.5G 1% /dev/shm lrm 1.5G 2.0M 1.5G 1% /lib/modules/2.6.27-11-generic/volatile /dev/sdb1 996M 913M 84M 92% /mnt/myUSBdisc
- Then check to see that the partition is marked as bootable,
- sudo fdisk -l <----that's a lowercase letter L for the List option.
You should see output that looks like this:
Disk /dev/sdb: 1047 MB, 1047265280 bytes 255 heads, 63 sectors/track, 127 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk identifier: 0x0008325f . Device Boot Start End Blocks Id System /dev/sdb1 * 1 127 1020096 6 FAT16
The '*' under the Boot column is what you want to see.
- If not, then
- For Ubuntu 8.10, menu: System -> Administration -> Partition Editor (GParted).
- Select your USB device (/dev/sdb in your case),
- then your partition (/dev/sdb1),
- then menu: Partition -> Manage Flags,
- check the boot box,
- and Close to mark the partition as bootable.
- For Fedora,
- parted /dev/sdb
- toggle 1 boot
- quit
- Also, check to see that you do not already have an existing bootloader (such as GRUB) in the MBR of your stick. (If you have not previously used this stick as a live boot, you can skip this step.) To be sure that the USB stick's MBR is wiped clean, overwrite it completely using:
- dd if=/dev/zero of=/dev/sdb bs=446 count=1
- (Actually, that didn't work for me. But this did:
- lilo -M /dev/sdb
- It put in a standard MBR that boots whichever partition has been called bootable. It does not install LILO as such.)
- Unmount the drive,
- sudo umount /dev/sdb1
- Change mode to make the script executable.
- chmod +x livecd-iso-to-disk.sh
- Run it as root, making sure to pass the correct USB device and to set overlay and home size appropriately, depending on the stick size.
- sudo ./livecd-iso-to-disk.sh --overlay-size-mb 300 --home-size-mb 160 --delete-home --unencrypted-home soas-beta.iso /dev/sdb1
The livecd-iso-to-disk installation has the advantage over the liveusb-creator installation method by allowing a persistent /home/liveuser folder with the --home-size-mb NNN option. This feature would allow you to update the OS image while keeping the user files (by running the script against your existing installation but leaving out the --home-size-mb NNN option).
- The
--delete-home
option is used to avoid an error message while requesting both a new home (with--home-size-mb
) and a persistent home (indirectly with--unencrypted-home
). You wouldn't use the --delete-home option on an upgrade of the operation system only.
Depending on the size of your usb stick, you may have to decrease --overlay-size-mb
and --home-size-mb
values (example, for 1 GB stick, use 200 for each).
Alternative installation methods
UNetbootin
UNetbootin (Universal Netboot Installer) is a cross-platform utility that can create Live USB systems.
Keep in mind that UNetbootin doesn't support persistent overlays, so you won't be able to save files using the Journal.
- Choose the Diskimage ISO option.
- Select the downloaded .iso image file.
- Press OK and wait for your USB stick to be created.
Fedora Live USB Creator
(This section is under construction.)
Fedora's liveusb-creator (see windows install section above for how to use).
Needs to be loaded from Synaptic Package Manager
Has persistence, easy to use.
Instructions are at http://wiki.sugarlabs.org/go/Sugar_on_a_Stick/Getting_Involved/Testing/Soas-F11b_Sugar0.84.2
-On full installs of Fedora 11 Preview can add sugar desktop and make a Soas version with a Full Gnome desktop plus a Sugar Desktop on one USB Stick or SD Card (Wireless WPA works with EeePC900)
-see for details :
++++PREPARATORY WORK : use Partition Editor to erase existing partition on sdb? (CHECK THIS CAREFULLY!);then make NEW partition as a fat16 primary partition LABELED FEDORA then set boot flag.++++
-to label the partition FEDORA on Fedora, use
dosfslabel devicename FEDORA
dosfslabel comes with the "dosfstools" rpm package.
What's next?
After you've created your stick, it's time to boot your stick and test it out. Please also report your observations.