Changes

no edit summary
Line 54: Line 54:  
     sudo fdisk -l
 
     sudo fdisk -l
   −
and looking in the output for the disk that corresponds to the USB key, e.g. a disk described with a stanza like
+
and looking in the output for the disk that corresponds to the USB device, e.g., a disk described with a stanza like
    
     Disk /dev/sd'''?''': 1939 MB, 1939865600 bytes
 
     Disk /dev/sd'''?''': 1939 MB, 1939865600 bytes
Line 68: Line 68:  
where '''?''' in /dev/sd'''?''' is (usually) a letter of the alphabet.
 
where '''?''' in /dev/sd'''?''' is (usually) a letter of the alphabet.
   −
If you have only '''one''' storage device with 2 Gb of nominal capacity, it will be easy to recognize the USB key in the fdisk output by looking at which device has (about) 2 Gb of capacity. In the example above, "Disk /dev/sd'''?'''" reports to be as large as ''1939 MB'', that is, almost 2 Gb.
+
If you have only '''one''' storage device with 2 GB of nominal capacity, it will be easy to recognize the USB device in the fdisk output by looking at which device has (about) 2 GB of capacity. In the example above, "Disk /dev/sd'''?'''" reports to be as large as ''1939 MB'', that is almost 2 GB.
   −
Indeed, if you have '''more than one''' disks with about 2 Gb of capacity, consider moving to a situation where you'll have only '''one''' device with 2 Gb of capacity, because this will help out a lot in recognizing the drive correctly.
+
If you have '''more than one''' disk with about 2 GB of capacity, consider moving to a situation where you'll have only '''one''' device with 2 GB of capacity, because this will help out a lot in recognizing the drive correctly.
    
* Unmount the drive,<br>
 
* Unmount the drive,<br>
Line 79: Line 79:  
* 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 '''900''' --delete-home --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;">/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'''?'''</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 '''900''' --delete-home --unencrypted-home '''/path/to/downloaded'''.iso /dev/sd'''?'''</div>
   −
:If the command fails returning a complaint about the filesystem not mounted, '''and''' you can afford to '''loose all data on the USB key''', you can:
+
: 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:
   −
:* mount the USB key (e.g. by unplugging and re-inserting it),
+
:* mount the USB device (e.g., by unplugging and re-inserting it),
:* repeat the steps for knowing its device name (there can be situations when the device name has changed!!!)
+
:* repeat the steps for learning its device name (there can be situations when the device name has changed!)
:* issue the command with the '''"--format option"''', like this ('''(WARNING!!!!!!!!!!!!! THE COMMAND DESCRIBED HERE WILL NOT ASK FOR CONFIRMATION AND WILL DESTROY ALL PRE-EXISTING DATA ON YOUR USB KEY!!!''')
+
:* issue the command with the '''{{Code|--format --msdos}}''' options, like this:
::<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 '''--format''' --overlay-size-mb '''500''' --home-size-mb '''900''' --delete-home --unencrypted-home /run/initramfs/livedev /dev/sd'''???'''</div>
+
{{Note/warning|Warning|The command described here will not ask for 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.}}
 +
::<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''' --delete-home --unencrypted-home '''/path/to/downloaded'''.iso /dev/sd'''?'''</div>
   −
: {{Highlight|'''Note''':In the above example, 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.}}
   −
: {{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 (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 '''900''' --delete-home --unencrypted-home /run/initramfs/livedev /dev/sd'''?'''1</div>