Difference between revisions of "Sugar on a Stick/Linux"
(→Alternative instructions: add instructions how to label a fat partition FEDORA under Fedora) |
|||
Line 91: | Line 91: | ||
++++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.++++ | ++++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 <pre>dosfslabel | + | -to label the partition FEDORA on Fedora, use <pre>dosfslabel devicename FEDORA</pre> dosfslabel comes with the "dosfstools" rpm package. |
== What's next? == | == What's next? == |
Revision as of 14:27, 27 April 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!
Linux instructions
This is known to work in Fedora and Ubuntu 8.10 and should work in other Linux distributions.
- Make sure you have the isomd5sum and cryptsetup packages installed in your distribution, as they will be needed by the installation script.
- (These packages are needed for the verification and persistent home folder options of the installation script; they are not necessary if one applies the --noverify and --unencrypted-home options, respectively. The verification step checks that the file is complete after its travels, and it will signal a failure warning if there is a problem.) The --unencrypted-home option may be preferred for improved robustness with the compressed file system employed by the LiveUSB 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
- 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 Linux installation has the advantage of 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
--unencrypted-home
option prevents password protection and encryption of the /home/liveuser folder. This releaves overhead on the compressed sqaushfs, and should be more robust to file system failures (outside of security). - 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 instructions
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 (see windows install section above for how to use)
Has persistence, easy to use.
Use Fedora Live USB Creator if using Fedora11 Gnome Beta
-works for full system installations and for Soas2 Installations to USB and SD cards
-On full installs of F11 beta can add sugar desktop and make a Soas version with a Full Gnome desktop plus a Sugar Destop on one USB Stick or SD Card (Wireless WPA works with EeePC900)
-see for details :http://wiki.sugarlabs.org/go/Sugar_on_a_Stick/Getting_Involved/Testing/Soas-F11b_Sugar0.84.2
++++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.