
Maximize Your Firefly AIBOX 3588S: A Guide to Installing Flatpak Apps on an External Drive
The Firefly AIBOX-3588S is a powerhouse in a compact form factor, delivering impressive performance for a wide range of AI and computing tasks. However, like many single-board computers, its internal eMMC storage is often limited. When you start installing modern, feature-rich applications using Flatpak, you can quickly run out of space.
Fortunately, there’s a robust solution: offloading your Flatpak installations to an external SSD or hard drive. This guide will walk you through the entire process, allowing you to preserve your precious internal storage for the operating system while giving your applications the space they need to thrive.
Why Use an External Drive for Flatpak?
Before diving into the “how,” let’s cover the “why.” Moving your Flatpak installation directory offers several key advantages:
- Vastly Increased Storage: An external SSD can provide hundreds of gigabytes or even terabytes of space, effectively eliminating storage concerns.
- Preservation of Internal eMMC: The internal storage on devices like the AIBOX-3588S has a finite number of write cycles. Offloading heavy application installs to an external drive can extend the lifespan of your device’s onboard storage.
- Performance Boost: Using a high-speed external SSD can potentially offer faster application load times compared to the internal eMMC.
- Portability and Flexibility: Your application library becomes portable. You could, in theory, move the drive to a compatible system and access your apps.
Step-by-Step Guide to Setting Up External Flatpak Storage
Follow these steps carefully to configure your system. This process involves formatting a drive and editing system files, so attention to detail is crucial.
Step 1: Prepare Your External Drive
First, you need to connect your external drive and prepare it for use. We will format it with the ext4
filesystem, which is standard for Linux.
Identify the Drive: Connect your external drive and open a terminal. Use the
lsblk
command to list all block devices. You should see your internal storage (e.g.,mmcblk
) and your new external drive, likely namedsda
orsdb
.lsblk
Format the Drive: Once you have correctly identified your external drive’s name, you can format it.
Warning: This step will completely erase all data on the selected drive. Double-check that you are using the correct device name (e.g.,
/dev/sda
) before proceeding.sudo mkfs.ext4 /dev/sda
Replace
/dev/sda
with the actual name of your drive if it is different.
Step 2: Create a Mount Point and Mount the Drive
A mount point is simply a directory where the external drive’s filesystem will be attached. A common practice for this purpose is to use a directory within /opt
.
Create the Directory:
sudo mkdir -p /opt/flatpak
Mount the Drive Manually: Now, mount your newly formatted drive to the directory you just created.
sudo mount /dev/sda /opt/flatpak
Your drive is now accessible at /opt/flatpak
, but this mount will not survive a reboot. The next step makes it permanent.
Step 3: Configure Automatic Mounting at Boot
To ensure your drive is always available after you restart your AIBOX, you must add an entry to /etc/fstab
, the system’s filesystem table. It is highly recommended to use the drive’s unique identifier (UUID) instead of its device name, as names like /dev/sda
can sometimes change.
Find the Drive’s UUID:
sudo blkid /dev/sda
This command will output information about the drive, including a long alphanumeric string labeled
UUID
. Copy this UUID value.Edit the fstab File: Open the
/etc/fstab
file with a text editor likenano
. Be extremely careful when editing this file, as errors can prevent your system from booting correctly.sudo nano /etc/fstab
Add the New Mount Entry: Go to the bottom of the file and add the following line, replacing
<your-drive-uuid>
with the actual UUID you copied earlier.UUID=<your-drive-uuid> /opt/flatpak ext4 defaults 0 2
Save the file and exit the editor (in
nano
, pressCtrl+X
, thenY
, thenEnter
).
Step 4: Configure Flatpak to Use the New Location
This is the final and most important configuration step. We will tell the Flatpak system to use our new external drive location as the default installation path for all system-wide apps.
Create a Flatpak Configuration Directory:
sudo mkdir -p /etc/flatpak/installations.d/
Create a New Configuration File: We will create a file to define our new installation path.
sudo nano /etc/flatpak/installations.d/external-disk.conf
Add the Configuration: Paste the following content into the file. This tells Flatpak about a new installation point named
external
, sets its path, and makes it the default.[Installation "external"] Path=/opt/flatpak/repo DisplayName=External Drive Apps StorageType=harddisk Default=true
Save and exit the file.
Step 5: Verify Your Setup
Your system is now fully configured. Let’s verify that everything is working as expected.
Reboot Your System: A reboot will confirm that the
fstab
entry is working correctly and the drive is auto-mounted.sudo reboot
Check Flatpak Info: After rebooting, open a terminal and check the Flatpak system information.
flatpak --info
You should see your new
/opt/flatpak/repo
path listed as a system-wide installation location.Test an Installation: Install an application from Flathub. For example, let’s install GIMP.
flatpak install flathub org.gimp.GIMP
The application should now be installed on your external drive.
Confirm Disk Usage: Finally, check your disk usage with the
df -h
command. You should see the space usage on your/opt/flatpak
mount point increase, while your internal storage remains unchanged.
You have now successfully expanded your Firefly AIBOX-3588S’s application storage. You can install large, powerful Flatpak applications without ever worrying about filling up your device’s internal eMMC, unlocking its true potential as a versatile desktop and development machine.
Source: https://www.linuxlinks.com/firefly-aibox-3588s-set-up-flatpak-external-disk/