Difference between revisions of "Sugar on a Stick/Linux/Installation"

From Sugar Labs
Jump to navigation Jump to search
(starting with Fedora 24...)
(update to SoaS 29 details)
Line 5: Line 5:
 
<ol start="0">
 
<ol start="0">
 
<li> '''Download''' the latest [[Sugar on a Stick/Downloads | Sugar on a Stick]] .iso file.<br></li>
 
<li> '''Download''' the latest [[Sugar on a Stick/Downloads | Sugar on a Stick]] .iso file.<br></li>
{{Note/important|Important change since Fedora 24 SoaS|The ''livecd-iso-to-disk'' installation script is no longer packaged in the SoaS .iso file.  Starting with Fedora 24, if you want a Live USB with persistent storage, you must install the ''livecd-tools'' package to obtain the installation script and the SYSLINUX boot loader. Use this command to obtain the installer: {{Code|sudo dnf install livecd-tools}}}}
+
<li> Install the ''livecd-tools'' package to obtain the installation script and the SYSLINUX boot loader. Use this command to obtain the installer: {{Code|sudo dnf install livecd-tools}}
 
<li> Insert a USB stick of 2 GB or greater capacity into your computer.</li>
 
<li> Insert a USB stick of 2 GB or greater capacity into your computer.</li>
<li> With [[olpc:Root|'''root''' user]] permissions at a terminal or [[Wikipedia:System_console|console]] command line, use the command {{Code|df -Th}} or {{Code|blkid}} to get the USB device node name.</li>
+
<li> With [[olpc:Root|'''root''' user]] permissions at a terminal or [[Wikipedia:System_console|console]] command line, use the command {{Code|sudo df -Th}} or {{Code|sudo blkid}} to get the USB device node name.</li>
 +
:<small>(Items in angle brackets, such as <MyAccount> are descriptive placeholders.)</small>
 
{{Show|&nbsp;You should see something like the following:
 
{{Show|&nbsp;You should see something like the following:
 
|<pre>
 
|<pre>
[root@MyComputer ~]# df -Th
+
[<user>@<system> <working directory>]$ sudo df -Th
 
Filesystem    Type      Size  Used Avail Use% Mounted on
 
Filesystem    Type      Size  Used Avail Use% Mounted on
 
rootfs        rootfs    20G  5.5G  14G  29% /
 
rootfs        rootfs    20G  5.5G  14G  29% /
Line 18: Line 19:
 
tmpfs          tmpfs    1.6G    0  1.6G  0% /sys/fs/cgroup
 
tmpfs          tmpfs    1.6G    0  1.6G  0% /sys/fs/cgroup
 
tmpfs          tmpfs    1.6G    0  1.6G  0% /media
 
tmpfs          tmpfs    1.6G    0  1.6G  0% /media
/dev/loop0    iso9660  668M 668M     0 100% /run/soas
+
/dev/loop0    iso9660  959M 959M     0 100% /run/soas
/dev/sdc1      vfat      2.0G  2.0G  53M  98% /run/media/MyAccount/LG
+
/dev/sdc1      vfat      2.0G  2.0G  53M  98% /run/media/<MyAccount>/<filesystem label>/
/</pre>
+
</pre>
: <small>(The {{Code|/run/media/MyAccount/}} path is the new, Fedora 17 standard mount point for removable media.<br>{{Code|/media/MyMountPoint}} is common on other operating systems.)</small>
+
: <small>(The {{Code|/run/media/<MyAccount>/}} path is the standard mount point for removable media.<br>{{Code|/media/<MyMountPoint>}} is common on other operating systems.)</small>
 
 
 
<pre>
 
<pre>
[root@MyComputer ~]# blkid
+
[<user>@<system> <working directory>]$ sudo blkid
/dev/sda1: LABEL="Fedora-20" UUID="8962913a-c335-4c3b-b3ed-90fbb9c97580" TYPE="ext4" PARTUUID="1549f232-01"  
+
/dev/sda1: LABEL="Fedora29" UUID="45e12f4a-51f2-463e-a33b-a6c0f157ab77" TYPE="ext4" PARTUUID="000b2340-04"  
 
/dev/sdc1: LABEL="LIVE" UUID="D2AC-5056" TYPE="vfat"  PARTUUID="000056b3-01"  
 
/dev/sdc1: LABEL="LIVE" UUID="D2AC-5056" TYPE="vfat"  PARTUUID="000056b3-01"  
/dev/loop0: UUID="2013-12-12-01-40-45-00" LABEL="Fedora-Live-SoaS-x86_64-20-1" TYPE="iso9660" PTUUID="461863db" PTTYPE="dos"  
+
/dev/loop0: UUID="2018-10-25-00-02-47-00" LABEL="Fedora-SoaS-Live-29-1-2" TYPE="iso9660" PTUUID="3299e5ae" PTTYPE="dos"  
 
</pre>
 
</pre>
 
:: <small>(Additional disk drive partitions may be listed on your computer.)</small>
 
:: <small>(Additional disk drive partitions may be listed on your computer.)</small>
 
: The mount point (Mounted on), Filesystem, Size, and LABEL should help you identify what you want.}}
 
: The mount point (Mounted on), Filesystem, Size, and LABEL should help you identify what you want.}}
<li> Unmount the USB device filesystem:<br>{{Code|umount /run/media/MyAccount/MyUSBdiscMountPoint}}
+
<li> Unmount the USB device filesystem:<br>{{Code|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></li>
+
: <small>(The {{Code|/run/media/<MyAccount>/}} path is the standard mount point. Other operating systems may use {{Code|/media/<MyMountPoint>}}.)</small></li>
 
<li> (You should have the isomd5sum package installed so that the following installation script can verify the download.)<br><br></li>
 
<li> (You should have the isomd5sum package installed so that the following installation script can verify the download.)<br><br></li>
<li> '''Load''': Execute the following installation command, as the [[olpc:Root|'''root''' user]], in <u>one</u> command line with many options:<br><div style="margin: 1em 0px 1em 1.6em; border: 1px dashed #2F6FAB; padding: 1em; background-color: #FBFBFB; 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>
+
<li> '''Load''': Execute the following installation command, as the [[olpc:Root|'''root''' user]], in <u>one</u> command line with many options:<br><div style="margin: 1em 0px 1em 1.6em; border: 1px dashed #2F6FAB; padding: 1em; background-color: #FBFBFB; font-family: Courier;">livecd-iso-to-disk --reset-mbr --overlay-size-mb '''500''' --home-size-mb '''500''' --unencrypted-home '''/path/to/downloaded'''.iso /dev/sd'''?'''1</div>
 
: The '{{Code|'''?'''}}' in the final parameter represents the target USB device '''''s'''csi '''d'''rive'' node, such as {{Code|sd'''b'''1}} or {{Code|sd'''c'''1}}, etc., and {{Code|'''/path/to/downloaded'''.iso}} is the location and name of the .iso file.
 
: The '{{Code|'''?'''}}' in the final parameter represents the target USB device '''''s'''csi '''d'''rive'' node, such as {{Code|sd'''b'''1}} or {{Code|sd'''c'''1}}, etc., and {{Code|'''/path/to/downloaded'''.iso}} is the location and name of the .iso file.
: The operating system will occupy ~670 MB, and the overlay and home size arguments, '''500''' and '''800''', were selected to fit in a 2 GB device. These may be adjusted depending on your preferences and device capacity (see [[LiveOS image]]). SoaS 10 can be squeezed into a 1 GB device with '''160''' and '''170'''. On a 4 GB device, one might use '''1000''' and '''1600''' for the size arguments.
+
: The operating system will occupy ~960 MB, and the overlay and home size arguments, '''500''' and '''500''', were selected to fit in a 2 GB device. These may be adjusted depending on your preferences and device capacity (see [[LiveOS image]]). On a 4 GB device, one might use '''1000''' and '''1600''' for the size arguments.
 
{{Show|&nbsp;The installation transcript should look something like the following:  
 
{{Show|&nbsp;The installation transcript should look something like the following:  
 
|<pre>
 
|<pre>
[root@MyComputer ~]# /run/soas/LiveOS/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
+
[<user>@<system> <working directory>]$ sudo livecd-iso-to-disk --reset-mbr --overlay-size-mb 500 --home-size-mb 500 --unencrypted-home /<path to>/Fedora-SoaS-Live-x86_64-29-1.2.iso /dev/sdc1
 
Verifying image...
 
Verifying image...
/home/MyAccount/Downloads/Fedora-Live-SoaS-x86_64-20-1.iso:  b0a9414ff7eb79b680d5c86440e19587
+
/<path to>/Fedora-SoaS-Live-x86_64-29-1.2.iso:  7641738bb0493f4a521af3a694e4f4ae
Fragment sums: 9bfe23577651c88dcfb78c76ac3a28a5c53eead4561e3bdc5921b8b2e748
+
Fragment sums: 7c5f6e26254ca7438da4d5b28a72a9f38711e3bb34b2748e177533ef5c25
 
Fragment count: 20
 
Fragment count: 20
 +
Supported ISO: no
 
Press [Esc] to abort check.
 
Press [Esc] to abort check.
 
Checking: 100.0%
 
Checking: 100.0%
Line 50: Line 51:
  
 
It is OK to use this media.
 
It is OK to use this media.
Copying live image to target device.
+
 
 +
Copying LiveOS image to target device...
 
squashfs.img
 
squashfs.img
     630,784,000 100%   1.96MB/s    0:05:06 (xfr#1, to-chk=0/1)
+
     905,187,328 100% 374.66MB/s    0:00:02 (xfr#1, to-chk=0/1)
osmin.img
+
 
          8,192 100%    0.00kB/s    0:00:00 (xfr#1, to-chk=0/1)
+
Syncing filesystem writes to disc.
Updating boot config file
+
    Please wait, this may take a while...
Initializing persistent overlay file
+
Setting up /EFI/BOOT
 +
Updating boot config files.
 +
Initializing persistent overlay...
 
500+0 records in
 
500+0 records in
 
500+0 records out
 
500+0 records out
524288000 bytes (524 MB) copied, 216.717 s, 2.4 MB/s
+
524288000 bytes (524 MB, 500 MiB) copied, 0.448825 s, 1.2 GB/s
 
Initializing persistent /home
 
Initializing persistent /home
800+0 records in
+
500+0 records in
800+0 records out
+
500+0 records out
838860800 bytes (839 MB) copied, 344.643 s, 2.4 MB/s
+
524288000 bytes (524 MB, 500 MiB) copied, 0.415686 s, 1.3 GB/s
Formatting unencrypted /home
+
Formatting unencrypted home.img
mke2fs 1.42.8 (20-Jun-2013)
+
mke2fs 1.44.3 (10-July-2018)
Filesystem label=
+
Creating filesystem with 512000 1k blocks and 128016 inodes
OS type: Linux
+
Filesystem UUID: 8fc0d8be-5c67-46a8-b621-6bd62bad3267
Block size=4096 (log=2)
 
Fragment size=4096 (log=2)
 
Stride=0 blocks, Stripe width=0 blocks
 
51296 inodes, 204800 blocks
 
10240 blocks (5.00%) reserved for the super user
 
First data block=0
 
Maximum filesystem blocks=209715200
 
7 block groups
 
32768 blocks per group, 32768 fragments per group
 
7328 inodes per group
 
 
Superblock backups stored on blocks:  
 
Superblock backups stored on blocks:  
32768, 98304, 163840
+
8193, 24577, 40961, 57345, 73729, 204801, 221185, 401409
  
 
Allocating group tables: done                             
 
Allocating group tables: done                             
 
Writing inode tables: done                             
 
Writing inode tables: done                             
Creating journal (4096 blocks): done
+
Creating journal (8192 blocks): done
Writing superblocks and filesystem accounting information: done
+
Writing superblocks and filesystem accounting information: done  
  
tune2fs 1.42.8 (20-Jun-2013)
+
tune2fs 1.44.3 (10-July-2018)
 
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
Installing boot loader
+
Installing boot loader...
 
Target device is now set up with a Live image!
 
Target device is now set up with a Live image!
 
</pre>}}<br></li>
 
</pre>}}<br></li>
 
<li> '''[[Sugar on a Stick/Boot|Boot]]''': Insert the USB stick into a bootable USB port on your computer. Set the option to "boot from USB" in your computer's <abbr title="Basic Input/Output System">BIOS</abbr> setup, and then start up the computer.<br><br></li></ol>
 
<li> '''[[Sugar on a Stick/Boot|Boot]]''': Insert the USB stick into a bootable USB port on your computer. Set the option to "boot from USB" in your computer's <abbr title="Basic Input/Output System">BIOS</abbr> setup, and then start up the computer.<br><br></li></ol>
  
::* To create more Sugar Sticks on other 1 GB or greater USB or SD devices, while running ''Sugar on a Stick'', one must first obtain the ''livecd-tools'' installer as above, then in the [[Activities/Terminal|Terminal Activity]], execute this command as the root user:<br><div style="margin: 1em 0px 1em 0em; border: 1px dashed #2F6FAB; padding: 1em; background-color: #FBFBFB; font-family: Courier;">livecd-iso-to-disk --reset-mbr --overlay-size-mb '''160''' --home-size-mb '''170''' --delete-home --unencrypted-home /run/initramfs/livedev /dev/sd'''?'''1</div>
+
::* To create more Sugar Sticks on other 2 GB or greater USB or SD devices, while running ''Sugar on a Stick'', one may run the [[Activities/Terminal|Terminal Activity]], and execute this command as the root user:<br><div style="margin: 1em 0px 1em 0em; border: 1px dashed #2F6FAB; padding: 1em; background-color: #FBFBFB; font-family: Courier;">livecd-iso-to-disk --reset-mbr --overlay-size-mb '''500''' --home-size-mb '''500''' --delete-home --unencrypted-home /run/initramfs/livedev /dev/sd'''?'''1</div>
 
::: <small>Replace {{Code|/dev/sd'''?'''1}} with a new device node for the second USB/SD device that you want to load with ''Sugar on a Stick''.</small>
 
::: <small>Replace {{Code|/dev/sd'''?'''1}} with a new device node for the second USB/SD device that you want to load with ''Sugar on a Stick''.</small>

Revision as of 02:16, 19 December 2018

These are the steps for installing Sugar on a Stick on a USB/SD device.

This page is transcluded to various installation instruction pages.

  1. Download the latest Sugar on a Stick .iso file.
  2. Install the livecd-tools package to obtain the installation script and the SYSLINUX boot loader. Use this command to obtain the installer: sudo dnf install livecd-tools
  3. Insert a USB stick of 2 GB or greater capacity into your computer.
  4. With root user permissions at a terminal or console command line, use the command sudo df -Th or sudo blkid to get the USB device node name.
  5. (Items in angle brackets, such as <MyAccount> are descriptive placeholders.)
     You should see something like the following:
    [<user>@<system> <working directory>]$ sudo df -Th
    Filesystem     Type      Size  Used Avail Use% Mounted on
    rootfs         rootfs     20G  5.5G   14G  29% /
    devtmpfs       devtmpfs  1.6G     0  1.6G   0% /dev
    tmpfs          tmpfs     1.6G  788K  1.6G   1% /dev/shm
    tmpfs          tmpfs     1.6G  1.3M  1.6G   1% /run
    tmpfs          tmpfs     1.6G     0  1.6G   0% /sys/fs/cgroup
    tmpfs          tmpfs     1.6G     0  1.6G   0% /media
    /dev/loop0     iso9660   959M  959M     0 100% /run/soas
    /dev/sdc1      vfat      2.0G  2.0G   53M  98% /run/media/<MyAccount>/<filesystem label>/
    
    (The /run/media/<MyAccount>/ path is the standard mount point for removable media.
    /media/<MyMountPoint> is common on other operating systems.)
    [<user>@<system> <working directory>]$ sudo blkid
    /dev/sda1: LABEL="Fedora29" UUID="45e12f4a-51f2-463e-a33b-a6c0f157ab77" TYPE="ext4" PARTUUID="000b2340-04" 
    /dev/sdc1: LABEL="LIVE" UUID="D2AC-5056" TYPE="vfat"  PARTUUID="000056b3-01" 
    /dev/loop0: UUID="2018-10-25-00-02-47-00" LABEL="Fedora-SoaS-Live-29-1-2" TYPE="iso9660" PTUUID="3299e5ae" PTTYPE="dos" 
    
    (Additional disk drive partitions may be listed on your computer.)
    The mount point (Mounted on), Filesystem, Size, and LABEL should help you identify what you want.
  6. Unmount the USB device filesystem:
    umount /run/media/<MyAccount>/<MyUSBdiscMountPoint>
    (The /run/media/<MyAccount>/ path is the standard mount point. Other operating systems may use /media/<MyMountPoint>.)
  7. (You should have the isomd5sum package installed so that the following installation script can verify the download.)

  8. Load: Execute the following installation command, as the root user, in one command line with many options:
    livecd-iso-to-disk --reset-mbr --overlay-size-mb 500 --home-size-mb 500 --unencrypted-home /path/to/downloaded.iso /dev/sd?1
    The '?' in the final parameter represents the target USB device scsi drive node, such as sdb1 or sdc1, etc., and /path/to/downloaded.iso is the location and name of the .iso file.
    The operating system will occupy ~960 MB, and the overlay and home size arguments, 500 and 500, were selected to fit in a 2 GB device. These may be adjusted depending on your preferences and device capacity (see LiveOS image). On a 4 GB device, one might use 1000 and 1600 for the size arguments.
     The installation transcript should look something like the following:
    [<user>@<system> <working directory>]$ sudo livecd-iso-to-disk --reset-mbr --overlay-size-mb 500 --home-size-mb 500 --unencrypted-home /<path to>/Fedora-SoaS-Live-x86_64-29-1.2.iso /dev/sdc1
    Verifying image...
    /<path to>/Fedora-SoaS-Live-x86_64-29-1.2.iso:   7641738bb0493f4a521af3a694e4f4ae
    Fragment sums: 7c5f6e26254ca7438da4d5b28a72a9f38711e3bb34b2748e177533ef5c25
    Fragment count: 20
    Supported ISO: no
    Press [Esc] to abort check.
    Checking: 100.0%
    
    The media check is complete, the result is: PASS.
    
    It is OK to use this media.
    
    Copying LiveOS image to target device...
    squashfs.img
        905,187,328 100%  374.66MB/s    0:00:02 (xfr#1, to-chk=0/1)
    
    Syncing filesystem writes to disc.
        Please wait, this may take a while...
    Setting up /EFI/BOOT
    Updating boot config files.
    Initializing persistent overlay...
    500+0 records in
    500+0 records out
    524288000 bytes (524 MB, 500 MiB) copied, 0.448825 s, 1.2 GB/s
    Initializing persistent /home
    500+0 records in
    500+0 records out
    524288000 bytes (524 MB, 500 MiB) copied, 0.415686 s, 1.3 GB/s
    Formatting unencrypted home.img
    mke2fs 1.44.3 (10-July-2018)
    Creating filesystem with 512000 1k blocks and 128016 inodes
    Filesystem UUID: 8fc0d8be-5c67-46a8-b621-6bd62bad3267
    Superblock backups stored on blocks: 
    	8193, 24577, 40961, 57345, 73729, 204801, 221185, 401409
    
    Allocating group tables: done                            
    Writing inode tables: done                            
    Creating journal (8192 blocks): done
    Writing superblocks and filesystem accounting information: done 
    
    tune2fs 1.44.3 (10-July-2018)
    Setting maximal mount count to -1
    Setting interval between checks to 0 seconds
    Installing boot loader...
    Target device is now set up with a Live image!
    

  9. Boot: Insert the USB stick into a bootable USB port on your computer. Set the option to "boot from USB" in your computer's BIOS setup, and then start up the computer.

  • To create more Sugar Sticks on other 2 GB or greater USB or SD devices, while running Sugar on a Stick, one may run the Terminal Activity, and execute this command as the root user:
    livecd-iso-to-disk --reset-mbr --overlay-size-mb 500 --home-size-mb 500 --delete-home --unencrypted-home /run/initramfs/livedev /dev/sd?1
Replace /dev/sd?1 with a new device node for the second USB/SD device that you want to load with Sugar on a Stick.