Software Setting Guide for CloudShell-2

This is step-by-step guide based on Ubuntu 16.04.2 minimal image for cloudshell-2 software environment.

0. Download Ubuntu image [On HOST PC]

$ wget https://odroid.in/ubuntu_16.04lts/ubuntu-16.04.2-minimal-odroid-xu4-20170516.img.xz
$ wget https://odroid.in/ubuntu_16.04lts/ubuntu-16.04.2-minimal-odroid-xu4-20170516.img.xz.md5sum
$ md5sum -c ubuntu-16.04.2-minimal-odroid-xu4-20170516.img.xz.md5sum
ubuntu-16.04.2-minimal-odroid-xu4-20170516.img.xz: OK
$ unxz ubuntu-16.04.2-minimal-odroid-xu4-20170516.img.xz

1. Insert micro SD card to micro SD card slot in your PC. (* If your HOST PC does not have micro SD card slot, then you need micro SD card reader.) [On HOST PC]

2. Flash Ubuntu image to micro SD card. [On HOST PC]

  • We recommand unmount your micro SD card before execute dd command, if the micro SD card mounted.
  • $ sudo umount /dev/path/of/card
$ sudo dd if=ubuntu-16.04.2-minimal-odroid-xu4-20170516.img of=</dev/path/of/card> bs=1M conv=fsync
$ sudo sync

3. Insert micro SD card to micro SD card slot in ODROID-XU4. [On ODROID-XU4]

4. Power on the cloudshell-2.

4.2 Power off and on again the cloudshell-2 when the booting process is finished.

5. Login 'root' (password: 'odroid')

You need USB-UART Module Kit or HDMI cable + USB keyboard to access ODROID-XU4 Ubuntu console.

6. Update the Ubuntu to latest. [On ODROID-XU4]

$ apt-get update && apt-get upgrade && apt-get dist-upgrade 
  • If your meta kernel package is kept back, manually update it with the blow.
  •  # apt-get install linux-image-xu3 
     $ reboot 
    (Login 'root' again after boot sequences are done.)

This step includes the hard disk formatting. If your hard disk contains important data, please backup the data before trying follow's steps.

If you want to avoid the hard disk formatting. Please use the JBOD/PM mode and skip the step 6.
On other mode (RAID 0/RAID 1/SPAN), the two hard disks are detected one logical storage. So, it is necessary to format the logical storage(/dev/sda) before using it.

7. Format the hard disks. In this example, we use the just one partition. [On ODROID-XU4]
* RAID 0/RAID 1/SPAN mode

$ dd if=/dev/zero of=/dev/sda bs=512 count=1
$ mkfs.ext4 /dev/sda

* PM mode

$ dd if=/dev/zero of=/dev/sda bs=512 count=1
$ mkfs.ext4 /dev/sda
$ dd if=/dev/zero of=/dev/sdb bs=512 count=1
$ mkfs.ext4 /dev/sdb

8. Create the mount points and edit /etc/fstab file for auto-mount on system start-up. [On ODROID-XU4]
* RAID 0/RAID 1/SPAN mode

$ mkdir -p /media/hdd
$ nano /etc/fstab
UUID=e139ce78-9841-40fe-8823-96a304a09859 / ext4 errors=remount-ro,noatime 0 1
LABEL=boot /media/boot vfat defaults 0 1
/dev/sda       /media/hdd ext4 defaults    0 1

* PM mode

$ mkdir -p /media/hdd1
$ mkdir -p /media/hdd2
$ nano /etc/fstab
UUID=e139ce78-9841-40fe-8823-96a304a09859 / ext4 errors=remount-ro,noatime 0 1
LABEL=boot /media/boot vfat defaults 0 1
/dev/sda       /media/hdd1 ext4 defaults    0 1
/dev/sdb       /media/hdd2 ext4 defaults    0 1

9. Create a new account called “cloudshell”. This account is to access samba server. [On ODROID-XU4]
* RAID 0/RAID 1/SPAN mode

$ echo "/bin/false" >> /etc/shells
$ useradd cloudshell -d /media/hdd -s /bin/false
$ passwd cloudshell
(Set the password of cloudshell)
$ chown cloudshell.cloudshell –R /media/hdd/
$ chmod 755 -R /media/hdd/

* PM mode

$ echo "/bin/false" >> /etc/shells
$ useradd cloudshell -d /media/hdd1 -s /bin/false
$ passwd cloudshell
(Set the password of cloudshell)
$ chown cloudshell.cloudshell –R /media/hdd1/
$ chown cloudshell.cloudshell –R /media/hdd2/
$ chmod 755 -R /media/hdd1/
$ chmod 755 -R /media/hdd2/

10. Install samba server. [On ODROID-XU4]

$ apt install -y samba

11. Edit /etc/samba/smb.conf file. Add the following configuration options to the end of the /etc/samba/smb.conf file. [On ODROID-XU4]
* RAID 0/RAID 1/SPAN mode

[Shared]
comment = CloudShell-2 File Server
path = /media/hdd
guest ok = yes
browseable = yes
create mask = 0644
directory mask = 0755
read only = no
writable = yes
force user = cloudshell

* PM mode

[Shared1]
comment = CloudShell-2 File Server 1
path = /media/hdd1
guest ok = yes
browseable = yes
create mask = 0644
directory mask = 0755
read only = no
writable = yes
force user = cloudshell

[Shared2]
comment = CloudShell-2 File Server 2
path = /media/hdd2
guest ok = yes
browseable = yes
create mask = 0644
directory mask = 0755
read only = no
writable = yes
force user = cloudshell

12. Add the configurations below to the [global] section of the /etc/samba/smb.conf file. [On ODROID-XU4]

write cache size = 524288
getwd cache = yes
use sendfile = yes
min receivefile size = 16384
socket options = TCP_NODELAY IPTOS_LOWDELAY

13. Install cloudshell-2 specific packages: enable LCD, FAN and IR. → Refer to Cloudshell-2 wiki page

14. Reboot and done!

$ reboot