Installing Arch Linux ARM (ALARM) on a Pogoplug E02

Preface

I’ve been looking for a while for a nice small appliance to put all my media on it, so I could put the desktop PC to sleep when not being used and still able to watch a movie, or listen to the music via DLNA. There was quite some posts online about a certain Pogoplug E021 device, initially intended to host a simple cloud hosting and being a NAS (Network Attached Storage) with their proprietary software. But some smart people made it possible to install a full Linux distro on it. Regular PCs run on x86 or x64 architecture, but this one is using an ARM SOC (System on Chip). The choice was using between Arch Linux ARM 2 or Debian ARM3, which were both ARM versions of popular Linux distributions.

Pogoplug E02, black edition. (Photo Credit: pogoplug.tistory.com).

Pogoplug E02, black edition. (Photo Credit: pogoplug.tistory.com).

Compared to the Raspberry PI4, which is way more popular and known for it’s low price, the Pogoplug E02 has a certain advantage - it has 4 USB ports, none of them are shared on the same bus with the LAN port, which is a Gigabit ethernet5 one. That means that the speed is way more faster then on the Raspberry PI, since there are no bottlenecks. Other hardware specifications are listed here:

  • ARMv5te CPU (Marvell Kirkwood 1.2GHz)
  • 256MB RAM
  • 128MB NAND
  • 4 USB 2.0 Ports
  • Gbit Ethernet

Being that main use-case for the Pogoplug E02 would be as a NAS storage server, that was the dealbreaker when deciding which device to buy.

There weren’t many of them left anymore, I was lucky to snag one off eBay for about 35€, which is even a cheaper deal then the Raspberry PI considering you have to buy a power adapter and a case for it as well.


Preparation

The internal NAND storage is too small to be able to host a fully fledge Linux distribution, that’s why we have to install it on an external USB drive. Now the option is to install it on a separate USB key, or on the same hard drive used for storing media. I went with the former router and bought a Cruzer Fit6 8GB flash drive, which has a small blueprint and can’t be seen when inserted to the device.

Try connecting to the device via SSH to the IP it received via DHCP from the router, default login/password is root/ceadmin. If connecting to the device via SSH doesn’t work, it’s disabled, so you must activate it first on my.pogoplug.com, but the instructions are simple:

  • Connect an ethernet cable to your router or modem and then to the Pogoplug E02
  • with no drives connected, connect the power cord to the Pogoplug E02 to turn it on
  • go to my.pogoplug.com. Sign up, then sign in
  • click Activate Device at the bottom of the page. Complete all of the necessary steps to activate your device
  • click the gear in the upper right corner > Settings > Security > select the checkbox for Enable SSH > create a password > click ok.

Now you can SSH to the Pogoplug E02 successfully. This can be done by using the ssh command from a *nix system, or by downloading and using Putty7 on Windows. The IP address assigned to the Pogoplug E02 should be checked on the router/modem.

An example here, password is the same as set in the last instruction above.

$ ssh root@192.168.1.19
Pogoplug$

When we see the prompt, we’re all set and ready for the installation.


Installation

At first we need to stop the default service that comes with the Pogoplug E02, otherwise it will interfere with the installation process.

$ killall hbwd

We insert the USB flash drive, which will host the system and start the partition process using fdisk.

$ /sbin/fdisk /dev/sda

At the fdisk prompt, delete old partitions and create a new one:

  1. Type o. This will clear out any partitions on the drive.
  2. Type p to list partitions. There should be no partitions left.
  3. Now type n, then p for primary, 1 for the first partition on the drive, and then press ENTER, accepting default values.
  4. Exit by typing w.

We now create a temporary directory, download the mke2fs binary to create and name the ext3 filesystem and make it executable. Then we create the filesystem named ROOTFS and mount it. Labeling is important since we will address on the label later when mounting the volume at boot.

$ cd /tmp
$ wget http://archlinuxarm.org/os/pogoplug/mke2fs
$ chmod +x mke2fs
$ ./mke2fs -L ROOTFS -j /dev/sda1
$ mkdir alarm
$ mount /dev/sda1 alarm

Then we enter the newly mounted directory, download unpacking tool bsdtar and the Arch Linux ARM on it (this can take a while), make the tool executable then unpack it.

$ cd alarm
$ wget http://archlinuxarm.org/os/pogoplug/bsdtar
$ chmod +x bsdtar
$ wget http://archlinuxarm.org/os/ArchLinuxARM-kirkwood-latest.tar.gz
$ ./bsdtar -xpf ArchLinuxARM-kirkwood-latest.tar.gz
$ cd ..
$ umount alarm

Now the last part is to download the U-Boot installer and run it. The installer downloads the proper U-Boot bootloader which actually enables booting from an external drive and flashes it.

$ wget http://archlinuxarm.org/os/armv5te/boot/pogo_e02/pogo_e02.sh
$ chmod +x pogo_e02.sh
$ ./pogo_e02.sh

Then we update the U-boot environment variables, like mounting the root filesystem as ext3, it’s also safe with the power outages.

/usr/sbin/fw_setenv usb_rootfstype ext3

Then we correct the machid, which makes the device LED green (all OK) vs. orange (error).

$ /sbin/fw_setenv machid dd6

Then we reboot the device.

$ /sbin/reboot

If the IP is changed again, re-recheck on the router/modem for a new one. SSH to the device using root/root credentials. I recommend updating the freshly installed system using the pacman8 package manager.

$ pacman -Syu

After that, change the root password.

$ passwd

Initial configuration

When connecting back to the Pogoplug E02, first change the hostname, mine is named pogo.

$ hostnamectl set-hostname pogo

Now we put our root partition to the /etc/fstab entry, so it can run the the filesystem checks if needed.

$ echo "LABEL=ROOTFS / ext3 rw,noatime 0 1" >> /etc/fstab

We upgrade the kernel and install some needed packages. When prompted with the conflict between linux-kirkwood and linux, we remove the latter.

$ pacman -Sy linux-kirkwood linux-kirkwood-headers ntp base-devel nano vim wget

Then we list and set the timezone, in my case capital of Slovenia.

$ timedatectl list-timezones
$ timedatectl set-timezone Europe/Ljubljana

It’s a good practice to set a static IP address on the server. First create the eth0.network file in /etc/systemd/network.

$ touch /etc/systemd/network/eth0.network

Then edit is as following using nano or vim. I used a 192.168.1.2 IP address, while router being on 192.168.1.1. DNS server can be from your ISP, Google (8.8.8.8) or a 127.0.0.1 localhost IP when using a local DNS caching server, described here.

1 [Match]
2 Name=eth0
3
4 [Network]
5 #DHCP=yes
6 DNS=8.8.8.8
7 Address=192.168.1.2/24
8 Gateway=192.168.1.1

Now at the end, we create an user with a desired /home directory, type of shell and groups he belongs to. Of course I used my name.

$ useradd -m -G users,audio,lp,optical,storage,video,wheel,power -s /bin/bash tadej

Then we set his password.

$ passwd tadej

That’s it, we can reboot.

$ reboot

We can now log in with the new IP and as user, not root.

$ ssh tadej@192.168.1.2

Conclusion

Getting the Pogoplug E02 was an exciting refresh into Linux administration again, after already having experience with it before, when I ran BIND home DNS and Apache http server with an IPv6 connection configured.

It’s remarkable to see how the technology evolved, so we can run a cheap, power efficient, fully fledged server at home now at the size of a pocket book.