Sugar on a Stick/Linux: Difference between revisions
→livecd-iso-to-disk.sh transcript: updated transcript for Pineapple |
update for Pineapple |
||
| Line 3: | Line 3: | ||
</noinclude> | </noinclude> | ||
== Introduction == | == Introduction == | ||
This page provides additional detail for | This page provides additional detail for loading '''[[Sugar on a Stick/Pineapple|Pineapple]]''', the most stable, released version of Sugar on a Stick (SoaS), available at [http://spins.fedoraproject.org/soas/#downloads this download site], onto a USB/SD flash storage device using GNU/Linux. | ||
: To explore a variety of '''experimental''' options for putting a [[What is Sugar?|Sugar]] image on a USB or SD flash drive under GNU/Linux, see the following pages: | : To explore a variety of '''experimental''' options for putting a [[What is Sugar?|Sugar]] image on a USB or SD flash drive under GNU/Linux, see the following pages: | ||
| Line 12: | Line 12: | ||
* See this reference for more background details: [[fedora:How to create and use Live USB#Graphical Method - Windows or Fedora]] | * See this reference for more background details: [[fedora:How to create and use Live USB#Graphical Method - Windows or Fedora]] | ||
== | == Load SoaS onto a stick using Fedora or Ubuntu == | ||
This is known to work in Fedora and Ubuntu. | This is known to work in Fedora and Ubuntu. | ||
| Line 24: | Line 24: | ||
:*''[[wikipedia:dm-crypt|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 {{Code|--unencrypted-home}} option. The {{Code|--unencrypted-home}} option is preferred because the reduced overhead improves robustness with the compressed ''[[wikipedia:SquashFS|SquashFS]]'' file system employed by the Live USB deployment. | :*''[[wikipedia:dm-crypt|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 {{Code|--unencrypted-home}} option. The {{Code|--unencrypted-home}} option is preferred because the reduced overhead improves robustness with the compressed ''[[wikipedia:SquashFS|SquashFS]]'' file system employed by the Live USB deployment. | ||
* Plug in a 2 GB or larger USB stick into your computer. | * Plug in a 2 GB or larger USB stick into your computer. | ||
* | * Mount the 'SoaS.iso' image to reach the onboard livecd-iso-to-disk installation script: | ||
: {{Code|sudo mkdir /mnt/soas/}} | |||
: {{Code|sudo mount /path/to/Fedora-16-x86_64-Live-SoaS.iso /mnt/soas/}} | |||
:: (mount: warning: /mnt/soas/ seems to be mounted read-only.) | |||
* Change the working directory to the LiveOS folder on the SoaS.iso mount: | |||
* | : {{Code|cd /mnt/soas/LiveOS}} | ||
* Execute {{Code|./livecd-iso-to-disk --help}} for usage details. (The file is already executable.) | |||
* | |||
* Check the USB device node name on your system. In the example below, the <abbr title="small computer system interface">'''s'''csi</abbr> '''d'''evice is /dev/ | * Check the USB device node name on your system. In the example below, the <abbr title="small computer system interface">'''s'''csi</abbr> '''d'''evice is /dev/sdc and filesystem partition on that device is /dev/sdc1: | ||
<pre> | <pre> | ||
$ df -Th | $ df -Th | ||
Filesystem Type Size Used Avail Use% Mounted on | Filesystem Type Size Used Avail Use% Mounted on | ||
/dev/ | rootfs rootfs 20G 12G 7.5G 61% / | ||
tmpfs tmpfs 1.6G | udev devtmpfs 1.6G 0 1.6G 0% /dev | ||
/dev/ | tmpfs tmpfs 1.6G 904K 1.6G 1% /dev/shm | ||
tmpfs tmpfs 1.6G 788K 1.6G 1% /run | |||
/dev/sda2 ext4 20G 12G 7.5G 61% / | |||
tmpfs tmpfs 1.6G 0 1.6G 0% /sys/fs/cgroup | |||
tmpfs tmpfs 1.6G 0 1.6G 0% /media | |||
/dev/sda2 ext4 20G 12G 7.5G 61% /tmp | |||
/dev/sda2 ext4 20G 12G 7.5G 61% /var/tmp | |||
/dev/sda2 ext4 20G 12G 7.5G 61% /home | |||
/dev/loop0 iso9660 443M 443M 0 100% /mnt/soas | |||
/dev/sdc1 vfat 3.8G 4.0K 3.8G 1% /media/MyUSBdiscMountPoint | |||
</pre> | </pre> | ||
* Unmount the drive,<br> | * Unmount the drive,<br> | ||
: {{Code|sudo umount /media/ | : {{Code|sudo umount /media/MyUSBdiscMountPoint}} | ||
* Then check to see that the partition is marked as bootable,<br> | * Then check to see that the partition is marked as bootable,<br> | ||
: {{Code|sudo fdisk '''-l'''}} ''<----that's a lowercase letter 'L' for the '''l'''ist option.'' | : {{Code|sudo fdisk '''-l''' /dev/sdc}} ''<----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: | ||
<pre> | |||
$ 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) | |||
</pre> | |||
The '*' under the Boot column is what you want to see. | The '*' under the Boot column is what you want to see. | ||
{{Show| 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/sd''b'' for the rest of these instructions), | ::# Select your USB device (/dev/sd''b'' for the rest of these instructions), | ||
| Line 68: | Line 79: | ||
:* For Fedora, | :* For Fedora, | ||
::# {{Code|parted /dev/sd'' | ::# {{Code|parted /dev/sd''c''}} | ||
::# {{Code|toggle 1 boot}} | ::# {{Code|toggle 1 boot}} | ||
::# {{Code|quit}} | ::# {{Code|quit}} | ||
}} | |||
* | * Run {{Code|livecd-iso-to-disk}} as the root user, making sure to pass the correct USB device node name and to set overlay and home size appropriately, depending on the target USB device storage capacity. | ||
: {{Code|sudo ./livecd-iso-to-disk --reset-mbr --overlay-size-mb '''500''' --home-size-mb '''900''' --delete-home --unencrypted-home /path/to/SoaS.iso /dev/sd'''c'''1}} | |||
:: (In the above example, the /path/to/SoaS.iso may be substituted with /dev/loop0, as this is the loop device that the mount command chose.) | |||
:: {{Highlight|'''Note''': Additional USB or SD devices may be loaded from a running ''Sugar on a Stick'' image that was loaded with the livecd-iso-to-disk script downloaded after 15 February 2011 (but not those installed by other methods) by running this command from a root user Terminal window:}} | |||
:: {{Code|/mnt/live/LiveOS/livecd-iso-to-disk --reset-mbr --overlay-size-mb '''500''' --home-size-mb '''900''' --delete-home --unencrypted-home /dev/sr0 /dev/sd'''?'''1}} | |||
: The ''livecd-iso-to-disk'' installation method has other advantages over the ''liveusb-creator'' method by allowing the creation of a separate, persistent /home/liveuser folder with the <tt>--home-size-mb ''NNN''</tt> option. This feature avoids consumption of the write-once persistent overlay for Activity storage (see [[LiveOS image]]) and allows one 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 method has other advantages over the ''liveusb-creator'' method by allowing the creation of a separate, persistent /home/liveuser folder with the <tt>--home-size-mb ''NNN''</tt> option. This feature avoids consumption of the write-once persistent overlay for Activity storage (see [[LiveOS image]]) and allows one 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}} option is used to avoid an error message while requesting both a new home (with {{Code|--home-size-mb}}) and a persistent home (indirectly with {{Code|--unencrypted-home}}). You wouldn't use the --delete-home option on an upgrade of the operation system only. | ::* The {{Code|--delete-home}} option is used to avoid an error message while requesting both a new home (with {{Code|--home-size-mb}}) and a persistent home (indirectly with {{Code|--unencrypted-home}}). You wouldn't use the --delete-home option on an upgrade of the operation system only. | ||