I’ve just taken delivery of 5 Odroid-C2 single board computers (SBCs) from Hardkernel. In case you don’t know, ODROID-C2 is a 64-bit quad-core SBC with specifications above and beyond those of Raspberry Pi 3. For example Odroid-C2 runs the quad-core 64-bit A53 processors at 2GHz (vs Raspberry Pi 3’s 1.2 GHz), Gigabit ethernet (vs 10/100 Mbps Ethernet), 2Gbytes of memory (vs 1Gbytes), supports 4K display (vs HD), etc.
I am planning to set up my 5 Odroid-C2 SBCs as a Docker cluster to form an experimental private cloud. But before I can do that, I must choose a stable Operating System (OS) for the SBCs to run on. Here is what I went through in selecting my OS.
I am very impressed by what I read about the Hypriot Cluster Lab on its web site:
“...We designed the to be completely self-configuring, so there is nothing to configure or to set up. Basically you just need to download our Cluster Lab SD card image and flash it onto a number of SD cards. Then ensure that all your Pi’s have network connectivity, insert the SD cards and switch on power. Everything else is taken care of automatically by our Cluster Lab...”
I want to download the image and try it out. I downloaded the hypriotos-odroid-c2-v0.1.0 image, put it on a SD card and proceeded to boot one of my C2s. The blue led was constantly on and the OS did not come up. After doing some research on the web, its turned out that the file system is an ext4 file system and the boot loader requires that the boot.ini file to be in a VFAT partition. I also found some discussions among Linux Gurus on how one can go into U-BOOT to boot that up. I am just a mere mortal and do not want to go there. All I want is a bootable image. I don’t want to meddle with the OS or boot process to make it boot. Thanks, but no thanks. I moved on.
The next OS I investigated was ArchLinux. It went a step further, unfortunately, in the wrong direction. The distribution unzipped to a set of directories and files. To create a SD card, the instructions says that I need to partition the SD card using fdisk, create an ext4 file system on it and copy all the directories and files to it and … Whether it will boot up or suffer the same fate as the Hypriot image, I am not planning to find out. Abort, abort…
While encountering problems with the 2 Linux OSes above, I realised that I need a Linux desktop, at least during the initial setup stage as I would be reaching out to the Internet to find answers to the problems encountered. It is much easier if I can use the Odroid-C2 I am setting up for Docker cluster to browse the Internet. My first candidate was the Ubuntu 16.04 MATE image provided by Hard Kernel, the company that makes Odroid SBCs. It booted up without problem and the desktop is attractive. I started the web browser to point to youtube to see assess its video performance. I observed lots of pauses when playing back video in 1080P. After a while, the desktop disappeared and all that remained on the screen was the browser in an odd place on the screen. No control keys or mouse clicks could bring back the desktop or do any thing else (even to the browser). I had to use CTRL-ALT-F1 to go to a terminal and reboot it. This happened a few times and I decided that this platform is not stable enough for me. I think it may have something to do with the video driver. That’s it for Ubuntu. I have to look elsewhere.
Armbian Jessie Desktop, the Invisible$!#
The next OS I tried was Armbian Jessie Desktop. It booted up without any problem. The UI is even more nice-looking than Ubuntu’s. I was really impressed until I started the browser, or rather failed to start the browser. Nothing happened when I double clicked on the browser. It came with 2 browsers: Firefox and Iceweasle. Neither worked. Used ps command and identified 1 defunct and 1 running Firefox process. I killed them and tried again. Same thing happened. I ran the command:
mv ~/.mozilla/firefox ~/.mozilla/firefox.old
as recommended by some advice on the Internet. And when I clicked on Firefox, this time it came up for a few seconds then died. I downloaded and tried dwb, a tiny webkit-based web browser. It was marginally better. I could visit a number of sites but once in a while it died as well. Video driver problem???
I told myself: since I’ve come so far, I might as well play around with hypriot docker. I added the hypriot repository but it says “Unable to find expected entry ….”. I download the 3 deb packages on my PC and scp’ed them to the Odroid-C2. When I tried to install them using dpkg -i, it complained about “Wrong architecture arm64”. Apparently, the hypriot deb docker packages are all 32-bit armhf architecture. I enabled multi-arch using the commands:
sudo dpkg –add-architecture armhf
sudo apt-get update
sudo dpkg -i docker-hypriot_1.11.1-1_armhf.deb
sudo dpkg -i docker-compose_1.7.1-40_armhf.deb
sudo dpkg -i hypriot-cluster-lab_0.2.14-1_all.deb
sudo apt-get install -f
All packages and dependencies installed OK. But when I ran a docker container, it gave me the following error message:
Searched the Internet and found that others have experienced the same problem but no solution has been reported. This is the last straw. I’ve been spending so much time trying to get the proper Linux and docker running and still not getting any results. I decided that I am not going to use the desktop version as the video driver is likely to be the cause of the instability. My other decision is that I am not going to border with Hypriot 32-bit dockers. The only reason I am interested in Hypriot is the cluster lab. Now that even docker is not working, there is not point talking about clustering. Of course, this is no fault of the OS. I just don’t want to waste any more time. This is why I decided to try the server version described in the next section.
Armbian Xenial Server, Smooth Sailing!
The server version does not have a graphical interface. It booted to the command prompt. One has to interact with the server using command line or remotely using SSH. Just issued the following commands and everything worked:
sudo apt-get update
sudo apt-get install docker.io
sudo apt-get install docker-compose
I downloaded and deployed the Raspberry Pi busybox httpd (web) Server image in the docker container and it worked. Next, I instructed Docker to use my web content instead of the default content:
docker run -d -p 80:80 -v /home/ayuen/www:/www hypriot/rpi-busybox-httpd
Then I pointed a web browser running on my PC to the busybox httpd web server and here is the screen shot:
I did not have time to to throughly test docker out yet but I will. Getting docker working on first try is definitely a good sign. Unlike Hypriot docker, this is 64-bit docker.
My experience in searching for a stable Linux to run my Odroid-C2 cloud tells me that Linux OSes for ARM processors are not as mature as Intel processors. The most likely cause of the instability is the video driver. Another thing I noted is that ARM64 is still relatively new and the Linux OSes and/or packages available have not yet caught up yet. For example, the docker.io package is 1.10 while the latest is 1.12. sIn time, they will. In the meantime, I am going to set up my Docker cluster using the 5 Odroid-C2’s that I’ve got. Stay tuned for upcoming articles on my progress.