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

From Sugar Labs
Jump to navigation Jump to search
(update installation transcript)
 
(10 intermediate revisions by 2 users not shown)
Line 6: Line 6:
 
<li> '''Download''' the latest [[Sugar on a Stick/Downloads | Sugar on a Stick]] .iso file.<br><br></li>
 
<li> '''Download''' the latest [[Sugar on a Stick/Downloads | Sugar on a Stick]] .iso file.<br><br></li>
 
<li> '''Prepare''': (with [[olpc:Root|'''root''' user]] permissions at a terminal or [[Wikipedia:System_console|console]] command line)
 
<li> '''Prepare''': (with [[olpc:Root|'''root''' user]] permissions at a terminal or [[Wikipedia:System_console|console]] command line)
<ul><li> Create a mount point directory: {{Code|mkdir /media/soas}}</li>
+
<ul><li> Create a mount point directory: {{Code|mkdir /run/soas}}</li>
<li> Mount the .iso file to make it accessible as a disk: {{Code|mount '''/path/to/downloaded'''.iso /media/soas/}}
+
<li> Mount the .iso file to make it accessible as a disk: {{Code|mount '''/path/to/downloaded'''.iso /run/soas/}}
 
: <small>(Where '''/path/to/downloaded'''.iso is the [[Wikipedia:File system|filesystem]] [[Wikipedia:Path_(computing)|path, or fully specified name,]] of the downloaded .iso file.)
 
: <small>(Where '''/path/to/downloaded'''.iso is the [[Wikipedia:File system|filesystem]] [[Wikipedia:Path_(computing)|path, or fully specified name,]] of the downloaded .iso file.)
 
: This is the source for the installation, and must remain [[Wikipedia:Mount_(computing)|mounted]] until the installation is complete.</small>
 
: This is the source for the installation, and must remain [[Wikipedia:Mount_(computing)|mounted]] until the installation is complete.</small>
 
</li>
 
</li>
 
<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> 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>
{{Show|&nbsp;&nbsp;&nbsp;&nbsp;You should see something like the following:
+
:<small>(Items in angle brackets, such as <MyAccount> are descriptive placeholders.)</small>
|<pre>
+
{{Show|&nbsp;You should see something like the following:
[root@MyComputer ~]# df -Th
+
|<pre style="white-space: pre;">
 +
[<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% /
+
devtmpfs      devtmpfs   16G     0   16G   0% /dev
devtmpfs      devtmpfs 1.6G     0 1.6G   0% /dev
+
tmpfs          tmpfs     16G  33M  16G   1% /dev/shm
tmpfs          tmpfs     1.6G  788K  1.6G   1% /dev/shm
+
tmpfs          tmpfs     16G 1.8M  16G   1% /run
tmpfs          tmpfs     1.6G 1.3M  1.6G   1% /run
+
tmpfs          tmpfs     16G     0   16G   0% /sys/fs/cgroup
tmpfs          tmpfs     1.6G     0 1.6G   0% /sys/fs/cgroup
+
/dev/sda1      ext4      123G  17G  100G  15% /
tmpfs          tmpfs    1.6G    0 1.6G   0% /media
+
tmpfs          tmpfs      16G  80K  16G  1% /tmp
/dev/loop0    iso9660   509M 509M    0 100% /media/soas
+
tmpfs          tmpfs    3.2G  10M 3.2G   1% /run/user/1000
/dev/sdc1      vfat      995M  983M   13M 99% /run/media/MyAccount/LG
+
/dev/sdb1      vfat      233G   90G  143G 39% /run/media/<MyAccount>/<filesystem label>
 +
/dev/loop0    iso9660   942M 942M    0 100% /run/soas
 
</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 style="white-space: pre;">
<pre>
+
[<user>@<system> <working directory>]$ sudo blkid
[root@MyComputer ~]# blkid
+
/dev/sda1: LABEL="Fedora30" UUID="dddf4ae0-e1fd-43c3-bacc-91acbafb3a34" TYPE="ext4" PARTUUID="000b2340-03"
/dev/sda1: LABEL="Fedora-17" UUID="8962913a-c335-4c3b-b3ed-90fbb9c97580" TYPE="ext4"  
+
/dev/sdb1: LABEL_FATBOOT="Fat" LABEL="Fat" UUID="D082-05E1" TYPE="vfat" PARTLABEL="Fat" PARTUUID="53132329-808c-4a44-adf6-e98ad17546ff"
/dev/sdc1: LABEL="LIVE" UUID="A7B2-6C07" TYPE="vfat"  
+
/dev/loop0: UUID="2019-04-26-02-18-05-00" LABEL="Fedora-SoaS-Live-30-1-2" TYPE="iso9660" PTUUID="37f2045d" PTTYPE="dos"
/dev/loop0: LABEL="Fedora-17-x86_64-Live-SoaS.iso" TYPE="iso9660"  
 
 
</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> (You should have the isomd5sum package installed so that the following installation script can verify the download.)<br><br></li></ul>
</li></ul>
+
<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;">/run/soas/LiveOS/livecd-iso-to-disk --reset-mbr --overlay-size-mb '''500''' --home-size-mb '''500''' --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;">/media/soas/LiveOS/livecd-iso-to-disk --reset-mbr --overlay-size-mb '''500''' --home-size-mb '''750''' --delete-home --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 ~600 MB, and the overlay and home size arguments, '''500''' and '''750''', were selected to fit in a 2 GB device. These may be adjusted depending on your preferences and device capacity (see [[LiveOS image]]).
+
: 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;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The installation transcript should look something like the following:  
+
{{Show|&nbsp;The installation transcript should look something like the following:  
|<pre>
+
|<pre style="white-space: pre;">
[root@MyComputer ~]# /media/soas/LiveOS/livecd-iso-to-disk --reset-mbr --overlay-size-mb 500 --home-size-mb 900 --delete-home --unencrypted-home /home/MyAccount/Downloads/Fedora-17-x86_64-Live-SoaS.iso /dev/sdc1
+
[<user>@<system> <working directory>]$ sudo /run/soas/LiveOS/livecd-iso-to-disk --reset-mbr --overlay-size-mb 500 --home-size-mb 500 --unencrypted-home /<path to>/Fedora-SoaS-Live-x86_64-30-1.2.iso /dev/sdc1
 
Verifying image...
 
Verifying image...
/home/MyAccount/Downloads/Fedora-17-x86_64-Live-SoaS.iso:  470134baa7e48085595243e53b55d41e
+
/<path to>/Fedora-SoaS-Live-x86_64-30-1.2.iso:  bac65eaf45ad370f6e9ddf793f436e33
Fragment sums: 7de3e14f3d5aa991343fa35bdfe3a1db59d578db95a844a63d22de789de1
+
Fragment sums: 82358a8de12fab19be3e83c22431837827fbe4b8be6d9be46695f853676f
 
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 56: Line 57:
  
 
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
  512344064 100%   43.04MB/s    0:00:11 (xfer#1, to-check=0/1)
+
    887,312,384 100% 379.28MB/s    0:00:02 (xfr#1, to-chk=0/1)
  
sent 512406681 bytes  received 31 bytes  44557105.39 bytes/sec
+
Syncing filesystem writes to disc.
total size is 512344064  speedup is 1.00
+
    Please wait, this may take a while...
osmin.img
+
Setting up /EFI/BOOT
        8192 100%    0.00kB/s    0:00:00 (xfer#1, to-check=0/1)
+
Updating boot config files.
 
+
Initializing persistent overlay...
sent 8265 bytes  received 31 bytes  16592.00 bytes/sec
 
total size is 8192  speedup is 0.99
 
Updating boot config 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, 500 MiB) copied, 0.354372 s, 1.5 GB/s
 
Initializing persistent /home
 
Initializing persistent /home
900+0 records in
+
500+0 records in
900+0 records out
+
500+0 records out
943718400 bytes (944 MB) copied, 152.195 s, 6.2 MB/s
+
524288000 bytes (524 MB, 500 MiB) copied, 0.346354 s, 1.5 GB/s
Formatting unencrypted /home
+
Formatting unencrypted home.img
mke2fs 1.42.3 (14-May-2012)
+
mke2fs 1.44.6 (5-Mar-2019)
Filesystem label=
+
Creating filesystem with 512000 1k blocks and 128016 inodes
OS type: Linux
+
Filesystem UUID: b32a4987-627e-4131-a863-7f6c9bcc2178
Block size=4096 (log=2)
 
Fragment size=4096 (log=2)
 
Stride=0 blocks, Stripe width=0 blocks
 
57600 inodes, 230400 blocks
 
11520 blocks (5.00%) reserved for the super user
 
First data block=0
 
Maximum filesystem blocks=239075328
 
8 block groups
 
32768 blocks per group, 32768 fragments per group
 
7200 inodes per group
 
 
Superblock backups stored on blocks:  
 
Superblock backups stored on blocks:  
32768, 98304, 163840, 229376
+
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.3 (14-May-2012)
+
tune2fs 1.44.6 (5-Mar-2019)
 
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>
+
</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'', 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;">/run/initramfs/live/LiveOS/livecd-iso-to-disk --reset-mbr --overlay-size-mb '''240''' --home-size-mb '''120''' --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>

Latest revision as of 19:00, 4 May 2019

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. Prepare: (with root user permissions at a terminal or console command line)
    • Create a mount point directory: mkdir /run/soas
    • Mount the .iso file to make it accessible as a disk: mount /path/to/downloaded.iso /run/soas/
      (Where /path/to/downloaded.iso is the filesystem path, or fully specified name, of the downloaded .iso file.)
      This is the source for the installation, and must remain mounted until the installation is complete.
    • Insert a USB stick of 2 GB or greater capacity into your computer.
    • 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.
    • (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
      devtmpfs       devtmpfs   16G     0   16G   0% /dev
      tmpfs          tmpfs      16G   33M   16G   1% /dev/shm
      tmpfs          tmpfs      16G  1.8M   16G   1% /run
      tmpfs          tmpfs      16G     0   16G   0% /sys/fs/cgroup
      /dev/sda1      ext4      123G   17G  100G  15% /
      tmpfs          tmpfs      16G   80K   16G   1% /tmp
      tmpfs          tmpfs     3.2G   10M  3.2G   1% /run/user/1000
      /dev/sdb1      vfat      233G   90G  143G  39% /run/media/<MyAccount>/<filesystem label>
      /dev/loop0     iso9660   942M  942M     0 100% /run/soas
      
      (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="Fedora30" UUID="dddf4ae0-e1fd-43c3-bacc-91acbafb3a34" TYPE="ext4" PARTUUID="000b2340-03"
      /dev/sdb1: LABEL_FATBOOT="Fat" LABEL="Fat" UUID="D082-05E1" TYPE="vfat" PARTLABEL="Fat" PARTUUID="53132329-808c-4a44-adf6-e98ad17546ff"
      /dev/loop0: UUID="2019-04-26-02-18-05-00" LABEL="Fedora-SoaS-Live-30-1-2" TYPE="iso9660" PTUUID="37f2045d" 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.
    • 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>.)
    • (You should have the isomd5sum package installed so that the following installation script can verify the download.)

  3. Load: Execute the following installation command, as the root user, in one command line with many options:
    /run/soas/LiveOS/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 /run/soas/LiveOS/livecd-iso-to-disk --reset-mbr --overlay-size-mb 500 --home-size-mb 500 --unencrypted-home /<path to>/Fedora-SoaS-Live-x86_64-30-1.2.iso /dev/sdc1
    Verifying image...
    /<path to>/Fedora-SoaS-Live-x86_64-30-1.2.iso:   bac65eaf45ad370f6e9ddf793f436e33
    Fragment sums: 82358a8de12fab19be3e83c22431837827fbe4b8be6d9be46695f853676f
    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
        887,312,384 100%  379.28MB/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.354372 s, 1.5 GB/s
    Initializing persistent /home
    500+0 records in
    500+0 records out
    524288000 bytes (524 MB, 500 MiB) copied, 0.346354 s, 1.5 GB/s
    Formatting unencrypted home.img
    mke2fs 1.44.6 (5-Mar-2019)
    Creating filesystem with 512000 1k blocks and 128016 inodes
    Filesystem UUID: b32a4987-627e-4131-a863-7f6c9bcc2178
    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.6 (5-Mar-2019)
    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!
    

  4. 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.