Wednesday, December 11, 2013

CubieTruck - first attempt at installing a Linux distro to a 16 GB micro SD card

First thing I learned was that CubieTruck is shipped with Android 4.2 already flashed to the 8 GB NAND flash and will boot without any changes necessary. Second thing I learned was that Android wouldn't work with my Logitech wireless keyboard. Anyway, I don't want Android as the OS, began trying to put Arch on the SD card.

Currently, archlinuxARM doesn't have a dedicated page for CubieTruck, but it does have an archlinuxARM page for CubieBoard2 and this thread suggests people are having some luck with it. So I gave it a try!

The instructions are very short and easy to follow, which I did. My power supply outputs 5.1V and 2.1A, which may not be enough to power the whole board with a 2.5" HDD at the same time (although it seemed to when booting Android from the NAND flash). I did not have an ethernet cable connected, as this seemed to be one of the initial problems with CubieTruck and Arch.

I plugged in the power supply and connected the CubieTruck to my plasma screen via the HDMI port. I was very pleasantly surprised to see the LED lights come on and TUX appear in the top left of the screen! Then a boot script displayed on the screen after a short period.

I've never used the ARM architecture before, and don't know what the boot output should display, but as it flashed before my eyes it looked a little different to my other Arch installs. But, I eventually got a login prompt! Default login is root/root which worked, and I was able to type a few commands to convince myself that I really had Arch up and running on my CubieTruck. One of the first I tried was
# dmesg | less

which worked initially, but...

It crashed with a whole bunch of hex codes outputing to the terminal. Funny thing was that I couldn't get archlinuxARM to boot a second time. I thought initially the problem was that CubieTruck was not supported by this version of archlinuxARM, but that may not be the case.

Turns out the micro SD card I bought from eBay is junk, and most likely the issue. But it took me a while to come to that realisation.

I first went through the process of trying to install lubuntu following this tutorial. That's when I noticed the trouble with the card. I tried to wipe zeros to it with a simple command:

# dd if=/dev/zero of=${card} bs=4096

where ${card} was defined earlier as card=/dev/sde on my system. This failed pretty quickly with an error "read-only filesystem". So I tried to format it with gparted, and this worked. Mounting one of the new partitions and trying write zeros to it again failed. The card would umount itself after only about 100MB were copied to it.

I eventually managed to get zeros written to it all, and then installed lubuntu and checked the integrity with the provided sha256sums file. All good, but putting the SD card in CubieTruck and booting failed pretty quickly.

Very disappointing. I now have to decide if I will flash lubuntu to the NAND flash, or get myself a valid micro SD and install to that. Delays delays!

Monday, December 9, 2013

CubieTruck - Assembled

I assembled my CubieTruck in its case last night. My first experience was 99% fine, but one of the screws supplied is dodgy and won't work with the board. Lucky for me, I'm a hoarder of such things and have spares lying around.
CubieTruck assembled in its clear case in front of the box it arrived in.
CubieTruck assembled.
I like the way the 2.5" HDD sits inside the case, was not expecting it to be so neat.
CubieTruck with 2.5" HDD under the board
CubieTruck with 2.5" HDD sitting under the board.