Changes

549 bytes removed ,  12:40, 14 December 2013
adjust sizes for SoaS 10
Line 3: Line 3:  
</noinclude>
 
</noinclude>
 
== Introduction ==
 
== Introduction ==
This page provides additional detail for loading '''[[Sugar on a Stick/Quandong|Quandong]]''', the most stable, released version of Sugar on a Stick (SoaS), available at [[Sugar on a Stick/Downloads]], onto a USB/SD flash storage device using GNU/Linux.
+
This page provides additional detail for loading '''[[Sugar on a Stick/10]]''', the most recent, released version of Sugar on a Stick (SoaS), available at [[Sugar on a Stick/Downloads]], 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 25: Line 25:  
* 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:
 
* Mount the 'SoaS.iso' image to reach the onboard livecd-iso-to-disk installation script:
: {{Code|sudo mkdir /media/soas/}}
+
: {{Code|sudo mkdir /run/soas/}}
: {{Code|sudo mount /path/to/Fedora-17-x86_64-Live-SoaS.iso /media/soas/}}
+
: {{Code|sudo mount /path/to/Fedora-Live-SoaS-x86_64-20-1 /run/soas/}}
:: (mount: warning: /media/soas/ seems to be mounted read-only.)
+
:: (mount: /dev/loop0 is write-protected, mounting read-only)
 
* Change the working directory to the LiveOS folder on the SoaS.iso mount:
 
* Change the working directory to the LiveOS folder on the SoaS.iso mount:
: {{Code|cd /media/soas/LiveOS}}
+
: {{Code|cd /run/soas/LiveOS}}
 
* Execute {{Code|./livecd-iso-to-disk --help}} for usage details. (The file is already executable.)
 
* Execute {{Code|./livecd-iso-to-disk --help}} for usage details. (The file is already executable.)
   Line 46: Line 46:  
/dev/sda2    ext4    20G  12G  7.5G  61% /var/tmp
 
/dev/sda2    ext4    20G  12G  7.5G  61% /var/tmp
 
/dev/sda2    ext4    20G  12G  7.5G  61% /home
 
/dev/sda2    ext4    20G  12G  7.5G  61% /home
/dev/loop0 iso9660    509M 509M     0 100% /media/soas
+
/dev/loop0 iso9660    668M 668M     0 100% /run/soas
 
/dev/sdc1    vfat    3.8G  4.0K  3.8G  1% /run/media/MyAccount/MyUSBdiscMountPoint
 
/dev/sdc1    vfat    3.8G  4.0K  3.8G  1% /run/media/MyAccount/MyUSBdiscMountPoint
 
</pre>
 
</pre>
Line 74: Line 74:  
* Unmount the drive,<br>
 
* Unmount the drive,<br>
 
: {{Code|sudo umount /run/media/MyAccount/MyUSBdiscMountPoint}}
 
: {{Code|sudo umount /run/media/MyAccount/MyUSBdiscMountPoint}}
:: <small>(The {{Code|/run/media/MyAccount/}} path is the new, Fedora 17 standard mount point. Other operating systems may use {{Code|/media/MyMountPoint}}.)</small>
+
:: <small>(The {{Code|/run/media/MyAccount/}} path is the new, standard Fedora mount point. Other operating systems may use {{Code|/media/MyMountPoint}}.)</small>
 
{{:Sugar on a Stick/Linux/bootable device}}
 
{{:Sugar on a Stick/Linux/bootable device}}
    
* 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.
 
* 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.
:<div style="padding: 1em; border: 1px dashed #2F6FAB; background-color: #FBFBFB; margin: 1em 0px 1em 0em; font-family: Courier;">./livecd-iso-to-disk --reset-mbr --overlay-size-mb '''500''' --home-size-mb '''900''' --delete-home --unencrypted-home '''/path/to/downloaded'''.iso /dev/sd'''?'''1</div>
+
:<div style="padding: 1em; border: 1px dashed #2F6FAB; background-color: #FBFBFB; margin: 1em 0px 1em 0em; font-family: Courier;">./livecd-iso-to-disk --reset-mbr --overlay-size-mb '''500''' --home-size-mb '''800''' --unencrypted-home '''/path/to/downloaded'''.iso /dev/sd'''?'''1</div>
 
: If the command fails telling you that /dev/sd'''?'''1 does not exist, try using the command for /dev/sd'''?''' (the name of the device) and not for /dev/sd'''?'''1 (the name of the partition), like this:
 
: If the command fails telling you that /dev/sd'''?'''1 does not exist, try using the command for /dev/sd'''?''' (the name of the device) and not for /dev/sd'''?'''1 (the name of the partition), like this:
   −
:<div style="padding: 1em; border: 1px dashed #2F6FAB; background-color: #FBFBFB; margin: 1em 0px 1em 0em; font-family: Courier;">./livecd-iso-to-disk --reset-mbr --overlay-size-mb '''500''' --home-size-mb '''900''' --delete-home --unencrypted-home '''/path/to/downloaded'''.iso /dev/sd'''?'''</div>
+
:<div style="padding: 1em; border: 1px dashed #2F6FAB; background-color: #FBFBFB; margin: 1em 0px 1em 0em; font-family: Courier;">./livecd-iso-to-disk --reset-mbr --overlay-size-mb '''500''' --home-size-mb '''800''' --unencrypted-home '''/path/to/downloaded'''.iso /dev/sd'''?'''</div>
    
: If the command fails returning a complaint about the filesystem not being mounted, '''and''' you can afford to '''loose all data on the USB device''', you can try reformatting the USB device filesystem:
 
: If the command fails returning a complaint about the filesystem not being mounted, '''and''' you can afford to '''loose all data on the USB device''', you can try reformatting the USB device filesystem:
Line 90: Line 90:  
{{Note/warning|Warning|The command described here will ask for a confirmation and will '''destroy''' all pre-existing data on your USB device.<br>
 
{{Note/warning|Warning|The command described here will ask for a confirmation and will '''destroy''' all pre-existing data on your USB device.<br>
 
See also [[olpc:How_to_Damage_a_FLASH_Storage_Device|How to Damage a FLASH Storage Device]] for a discussion of why using the factory format is preferred.}}
 
See also [[olpc:How_to_Damage_a_FLASH_Storage_Device|How to Damage a FLASH Storage Device]] for a discussion of why using the factory format is preferred.}}
::<div style="padding: 1em; border: 1px dashed #2F6FAB; background-color: #FBFBFB; margin: 1em 0px 1em 0em; font-family: Courier;">./livecd-iso-to-disk --reset-mbr '''--format --msdos''' --overlay-size-mb '''500''' --home-size-mb '''900''' --unencrypted-home '''/path/to/downloaded'''.iso /dev/sd'''?'''</div>
+
::<div style="padding: 1em; border: 1px dashed #2F6FAB; background-color: #FBFBFB; margin: 1em 0px 1em 0em; font-family: Courier;">./livecd-iso-to-disk --reset-mbr '''--format --msdos''' --overlay-size-mb '''500''' --home-size-mb '''800''' --unencrypted-home '''/path/to/downloaded'''.iso /dev/sd'''?'''</div>
    
: {{Highlight|In the above examples, the {{Code|'''/path/to/downloaded'''.iso}} may be substituted with {{Code|/dev/loop0}}, as this is the loop device that the mount command chose.}}
 
: {{Highlight|In the above examples, the {{Code|'''/path/to/downloaded'''.iso}} may be substituted with {{Code|/dev/loop0}}, as this is the loop device that the mount command chose.}}
    
{{Note/note|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 (but not those installed by other methods) by running this command in the Terminal Activity as a root user:}}
 
{{Note/note|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 (but not those installed by other methods) by running this command in the Terminal Activity as a root user:}}
:<div style="padding: 1em; border: 1px dashed #2F6FAB; background-color: #FBFBFB; margin: 1em 0px 1em 0em; font-family: Courier;">/run/initramfs/live/LiveOS/livecd-iso-to-disk --reset-mbr --overlay-size-mb '''500''' --home-size-mb '''900''' --delete-home --unencrypted-home /run/initramfs/livedev /dev/sd'''?'''1</div>
+
:<div style="padding: 1em; border: 1px dashed #2F6FAB; background-color: #FBFBFB; margin: 1em 0px 1em 0em; font-family: Courier;">/run/initramfs/live/LiveOS/livecd-iso-to-disk --reset-mbr --overlay-size-mb '''500''' --home-size-mb '''800''' --unencrypted-home /run/initramfs/livedev /dev/sd'''?'''1</div>
    
: 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.
+
::* A {{Code|--delete-home}} option is available to avoid an error message while requesting both a new home (with {{Code|--home-size-mb}}) when there is already a persistent home on the device). You wouldn't use the --delete-home option on an upgrade of the operating system only.
:Depending on the size of your USB stick, you may have to decrease {{Code|--overlay-size-mb}} and {{Code|--home-size-mb}} values (for example, for a 2 GB stick, use 500 for the overlay and 900 for the home folder).
+
:Depending on the size of your USB stick, you may have to decrease {{Code|--overlay-size-mb}} and {{Code|--home-size-mb}} values (for example, for a 2 GB stick, use 500 for the overlay and 800 for the home folder).
:: If you have sufficient capacity on your target device, and format it with an ext[234] filesystem to overcome the 2048-MB fat32 file size limit, you may avoid the SquashFS compression by including the {{Code|--skipcompress}} option in the script command line.
+
:: If you have sufficient capacity on your target device, and format it with an ext[234] filesystem to overcome the 4096-MB fat32 file size limit, you may avoid the SquashFS compression by including the {{Code|--skipcompress}} option in the script command line.
<!--:* If you get an error about udevinfo, you have the new version of udev where "udevadm info" is the proper command.
  −
:*:Create an executable file called udevinfo somewhere in your path with the following contents:
  −
:::{{Code|#!/bin/bash}}<br>
  −
:::<code>udevadm info $*</code> -->
   
:* Watch out for errors in the output of the script, the script seems to ignore them! (and say all is fine on the last line).
 
:* Watch out for errors in the output of the script, the script seems to ignore them! (and say all is fine on the last line).
   Line 110: Line 106:     
<pre>
 
<pre>
[LiveOS]$ sudo ./livecd-iso-to-disk --reset-mbr --overlay-size-mb 500 --home-size-mb 900 --delete-home --unencrypted-home /media/SoaS/Fedora-17-x86_64-Live-SoaS.iso /dev/sdc1
+
[LiveOS]$ sudo ./livecd-iso-to-disk --reset-mbr --overlay-size-mb 500 --home-size-mb 800 --unencrypted-home /home/MyAccount/Downloads/Fedora-Live-SoaS-x86_64-20-1.iso /dev/sdc1
 
Verifying image...
 
Verifying image...
/media/SoaS/Fedora-17-x86_64-Live-SoaS.iso:   470134baa7e48085595243e53b55d41e
+
/home/MyAccount/Downloads/Fedora-Live-SoaS-x86_64-20-1.iso:   b0a9414ff7eb79b680d5c86440e19587
Fragment sums: 7de3e14f3d5aa991343fa35bdfe3a1db59d578db95a844a63d22de789de1
+
Fragment sums: 9bfe23577651c88dcfb78c76ac3a28a5c53eead4561e3bdc5921b8b2e748
 
Fragment count: 20
 
Fragment count: 20
 
Press [Esc] to abort check.
 
Press [Esc] to abort check.
Line 123: Line 119:  
Copying live image to target device.
 
Copying live image to target device.
 
squashfs.img
 
squashfs.img
  512344064 100%   43.04MB/s    0:00:11 (xfer#1, to-check=0/1)
+
    630,784,000 100%   1.96MB/s    0:05:06 (xfr#1, to-chk=0/1)
 
  −
sent 512406681 bytes  received 31 bytes  44557105.39 bytes/sec
  −
total size is 512344064  speedup is 1.00
   
osmin.img
 
osmin.img
        8192 100%    0.00kB/s    0:00:00 (xfer#1, to-check=0/1)
+
          8,192 100%    0.00kB/s    0:00:00 (xfr#1, to-chk=0/1)
 
  −
sent 8265 bytes  received 31 bytes  16592.00 bytes/sec
  −
total size is 8192  speedup is 0.99
   
Updating boot config file
 
Updating boot config file
 
Initializing persistent overlay file
 
Initializing persistent overlay file
 
500+0 records in
 
500+0 records in
 
500+0 records out
 
500+0 records out
524288000 bytes (524 MB) copied, 5.1728 s, 101 MB/s
+
524288000 bytes (524 MB) copied, 216.717 s, 2.4 MB/s
 
Initializing persistent /home
 
Initializing persistent /home
900+0 records in
+
800+0 records in
900+0 records out
+
800+0 records out
943718400 bytes (944 MB) copied, 152.195 s, 6.2 MB/s
+
838860800 bytes (839 MB) copied, 344.643 s, 2.4 MB/s
 
Formatting unencrypted /home
 
Formatting unencrypted /home
mke2fs 1.42.3 (14-May-2012)
+
mke2fs 1.42.8 (20-Jun-2013)
 
Filesystem label=
 
Filesystem label=
 
OS type: Linux
 
OS type: Linux
Line 148: Line 138:  
Fragment size=4096 (log=2)
 
Fragment size=4096 (log=2)
 
Stride=0 blocks, Stripe width=0 blocks
 
Stride=0 blocks, Stripe width=0 blocks
57600 inodes, 230400 blocks
+
51296 inodes, 204800 blocks
11520 blocks (5.00%) reserved for the super user
+
10240 blocks (5.00%) reserved for the super user
 
First data block=0
 
First data block=0
Maximum filesystem blocks=239075328
+
Maximum filesystem blocks=209715200
8 block groups
+
7 block groups
 
32768 blocks per group, 32768 fragments per group
 
32768 blocks per group, 32768 fragments per group
7200 inodes per group
+
7328 inodes per group
 
Superblock backups stored on blocks:  
 
Superblock backups stored on blocks:  
32768, 98304, 163840, 229376
+
32768, 98304, 163840
    
Allocating group tables: done                             
 
Allocating group tables: done                             
Line 163: Line 153:  
Writing superblocks and filesystem accounting information: done
 
Writing superblocks and filesystem accounting information: done
   −
tune2fs 1.42.3 (14-May-2012)
+
tune2fs 1.42.8 (20-Jun-2013)
 
Setting maximal mount count to -1
 
Setting maximal mount count to -1
 
Setting interval between checks to 0 seconds
 
Setting interval between checks to 0 seconds