Difference between revisions of "Sugar on a Stick/Linux"
(→Linux instructions: first step is start downloading the .iso) |
(→Linux instructions: formatting tweaks) |
||
Line 32: | Line 32: | ||
* Then check to see that the partition is marked as bootable,<br> | * Then check to see that the partition is marked as bootable,<br> | ||
− | : <tt>sudo fdisk '''-l'''</tt> ''<----that's a lowercase letter L for the | + | : <tt>sudo fdisk '''-l'''</tt> ''<----that's a lowercase letter 'L' for the '''l'''ist option.'' |
You should see output that looks like this: | You should see output that looks like this: | ||
Disk /dev/sdb: 1047 MB, 1047265280 bytes | Disk /dev/sdb: 1047 MB, 1047265280 bytes | ||
Line 44: | Line 44: | ||
: If not, then | : If not, then | ||
:* For Ubuntu 8.10, menu: System -> Administration -> Partition Editor (GParted). | :* For Ubuntu 8.10, menu: System -> Administration -> Partition Editor (GParted). | ||
− | ::# Select your USB device (/dev/ | + | ::# Select your USB device (/dev/sd''b'' for the rest of these instructions), |
− | ::# then your partition (/dev/ | + | ::# then your partition (/dev/sd''b1''), |
::# then menu: Partition -> Manage Flags, | ::# then menu: Partition -> Manage Flags, | ||
::# check the boot box, | ::# check the boot box, | ||
Line 51: | Line 51: | ||
:* For Fedora, | :* For Fedora, | ||
− | ::# <tt>parted /dev/ | + | ::# <tt>parted /dev/sd''b''</tt> |
::# toggle 1 boot | ::# toggle 1 boot | ||
::# quit | ::# 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: | * 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: | ||
− | : <tt>dd if=/dev/zero of=/dev/ | + | : <tt>dd if=/dev/zero of=/dev/sd''b'' bs=446 count=1</tt> |
− | * (Actually, that didn't work for me. But this did: | + | ** (Actually, that didn't work for me. But this did: |
− | : <tt>lilo -M /dev/ | + | **: <tt>lilo -M /dev/sd''b''</tt> |
− | :It put in a standard MBR that boots whichever partition has been called bootable. It does not install LILO as such.) | + | **:It put in a standard MBR that boots whichever partition has been called bootable. It does not install LILO as such.) |
* Unmount the drive,<br> | * Unmount the drive,<br> | ||
− | : <tt>sudo umount /dev/ | + | : <tt>sudo umount /dev/sd''b1''</tt> |
* Change mode to make the script executable. | * Change mode to make the script executable. | ||
: <tt>chmod +x livecd-iso-to-disk.sh</tt> | : <tt>chmod +x livecd-iso-to-disk.sh</tt> | ||
* 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/ | + | : <tt>sudo ./livecd-iso-to-disk.sh --overlay-size-mb 300 --home-size-mb 160 --delete-home --unencrypted-home soas-beta.iso /dev/sd''b1''</tt> |
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 ''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 | + | 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 installation methods == | == Alternative installation methods == |
Revision as of 20:28, 12 June 2009
Introduction
This page helps you to put your Sugar on a Stick image on a USB flash drive under Linux. 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.
First, start downloading the SoaS .iso image from the Sugar on a Stick page, then return here.
- 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 for the rest of these instructions),
- 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.)
- (Actually, that didn't work for me. But this did:
- 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.
- Choose the Diskimage ISO option.
- Select the downloaded .iso image file.
- Press OK and wait for your USB stick to be created.
Notes:
- Keep in mind that UNetbootin doesn't support persistent overlays, so you won't be able to save files using the Journal.
- Under soas gives errors
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.