This is a multi-part blog looking at the Firefly AIBOX-3588S Mini PC running Linux. This embedded fanless ARM-based computer sports an 8 core Rockchip RK3588S CPU with a maximum clock speed of 2.4GHz. It has an integrated ARM Mali-G10 MP4 quad-core GPU and a built-in AI accelerator NPU providing 6 TOPS of computing power.
The model I’m reviewing comes with 16GB of LPDDR5 RAM and 32GB onboard eMMC storage. It retails for $299 USD. Other configurations are available with a maximum 32GB of LPDDR5 RAM and 256GB eMMC.
One issue that I came across fairly early on is that CIFS is not supported by the AIBOX-3588S’s Debian image. In other words, CIFS has not been compiled into the kernel, or made available as a module. If I had access to the source code, I could build a CIFS module. Instead, Firefly’s technical support provided me with a way to upgrade the system which enabled CIFS. It’s in the form of a extboot image which I uploaded to the machine and used dd to upgrade the system.
$ dd if=/home/firefly/extboot.img of=/dev/block/by-name/boot conv=fsync
$ reboot
But this doesn’t appear to have been made public. Nor has the Debian image been updated on their website.
But there are other alternatives to accessing remote file systems than CIFS. One useful way is to use SSHFS.
SSHFS is a file system in user space (FUSE) that uses the SSH File Transfer Protocol (SFTP) to mount a remote file system. SSHFS lets you interact with directories and files located on a remote server or workstation over a normal ssh connection.
Two Linux machines are configured to allow SSH access between them. One of these can be a local machine rather than a remote server.
1. Install SSHFS
First, issue the command $ sudo apt update && sudo apt upgrade
to refresh your package sources and update the system. Then issue the command:
$ sudo apt install sshfs
2. Mount the Remote Filesystem
We’ll create directories on the AIBOX machine so that we can mount multiple filesystem. Debian has a directory named /mnt
. So let’s create sub-directories within /mnt
.
$ sudo mkdir /mnt/i3-share2
$ sudo mkdir /mnt/i3-share4
Note that the two directories are owned by root. Let’s make the current user the owner of each directory using chown and chgrp.
$ sudo chown $USER /mnt/i3-share2 ; sudo chgrp $USER /mnt/i3-share2
$ sudo chown $USER /mnt/i3-share4 ; sudo chgrp $USER /mnt/i3-share4
I can now proceed and mount the remote directories with SSHFS. My username on the remote machine (192.168.1.206) is sde.
$ sudo sshfs -o allow_other,default_permissions sde @192.168.1.206:/home/sde /mnt/i3-share2
$ sudo sshfs -o allow_other,default_permissions sde @192.168.1.206:/home/sde /mnt/i3-share4
[Remove the space before the @ sign]
-o default_permissions
enables local permission checking.
The sshfs command only mounts a remote disk for the current session. If the remote machine or local machine is powered off or rebooted, I need to use the same process to mount it again.
I can unmount the remote directories with the commands:
$ sudo umount /mnt/i3-share2
$ sudo umount /mnt/i3-share4
3. Permanently Mounting the Remote Filesystem
It’s a bit more complicated to permanently mount the remote filesystem with SSHFS. I use key-based authentication to connect to my remote system. SSH public key authentication relies on asymmetric cryptographic algorithms that generate a pair of separate keys (a key pair), one “private” and the other “public”. You keep the private key a secret and store it on the computer you use to connect to the remote system. Both my local and remote system has ssh installed.
The sshfs command can also be used in the client system’s /etc/fstab file to automatically mount the remote file system. Use the normal fstab syntax, including any options required, and use sshfs in place of the file system type.
Permanent SSHFS mounts are not often popular. The nature of SSH connections and SSHFS means that it is usually best suited to temporary, one-off solutions.
4. Summary
SSHFS is simple to setup and can be used by non-privileged users on the local machine. Given that your backup data is stored on a remote machine I strongly recommend you use backup software that offers encryption.
Even if you’re not looking for a remote backup solution, SSHFS is an extremely useful way of accessing files and directories stored on a remote server especially if CIFS is not available.
All articles in the series:
Firefly AIBOX-3588S | |
---|---|
Introduction | Introduction to the series and interrogation of the AIBOX-3588S |
Benchmarks | Benchmarking the AIBOX-3588S Embedded Fanless PC |
Power | Comparing the AIBOX-3588S power consumption with other SBCs and Mini PCs |
SSHFS | Access Remote File Systems Over SSH with SSHFS |