-
-
Notifications
You must be signed in to change notification settings - Fork 16
SSH Setup and Disk Expansion for BELABOX
This guide covers enabling SSH access and expanding your filesystem to use the full capacity of large SD cards (tested and confirmed working on Orange Pi 5 B Plus).
Prerequisites: You'll need access to the BELABOX web interface at http://your-belabox-ip/ and a computer with SSH client capabilities.
Important: Never power off or reset the device during the filesystem expansion process.
By default, the SSH server may not be enabled on BELABOX. You'll need to enable it through the web interface first.
- Open your web browser and navigate to
http://your-belabox-ip/ - Log in to the BELABOX web interface
- Navigate to Advanced / developer section
- Look for the SSH Settings area
- Click "Start SSH server" if it shows as stopped
- The SSH server will now be running and accessible
To make SSH start automatically on boot (recommended):
- SSH into your BELABOX using the credentials shown in the web interface
- Run the following command to enable SSH auto-start:
sudo systemctl enable ssh- SSH will now start automatically after every reboot
If this is your first time accessing BELABOX, you'll need to set an initial password:
- Open
http://your-belabox-ip/in a web browser - You'll see an "Initial BELABOX setup" screen
- Enter a secure password for the web interface
- Check "remember me" if desired
- Click "Set password"
- This password will be used for both web interface and SSH access
Before expanding, let's check how much space is currently available:
ssh user@your-belabox-ip
df -hYou'll likely see output similar to:
Filesystem Size Used Avail Use% Mounted on
/dev/root 3.5G 3.1G 209M 94% /
This shows the filesystem is using only a small portion of your SD card capacity, even if you have a 512GB card installed.
Check the actual size of your SD card and partition layout:
lsblkLook for output similar to:
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
mmcblk1 179:0 0 477.5G 0 disk
└─mmcblk1p1 179:1 0 3.6G 0 part /
This shows a 512GB SD card (mmcblk1) with only a 3.6GB partition (mmcblk1p1) being used.
Warning: This process will modify your disk partitions. Ensure you have backups of any important data.
- First, check the current partition table:
sudo parted /dev/mmcblk1 printYou should see something like:
Number Start End Size File system Name Flags
1 16.8MB 3878MB 3861MB ext4
- Expand the partition to use the full disk:
sudo parted /dev/mmcblk1 resizepart 1 100%- Force the kernel to re-read the updated partition table:
sudo partprobe /dev/mmcblk1- Verify the partition was expanded:
lsblkYou should now see the partition shows the full size of your SD card.
Even though the partition is now larger, the filesystem still needs to be expanded to use the new space:
- Expand the ext4 filesystem:
sudo resize2fs /dev/mmcblk1p1- Verify the expansion was successful:
df -hYou should now see output similar to:
Filesystem Size Used Avail Use% Mounted on
/dev/root 470G 3.1G 448G 1% /
The filesystem now uses the full capacity of your SD card!
- Check that the system is stable and all services are running:
sudo systemctl status ssh
systemctl --failed-
Verify you can still access the web interface at
http://your-belabox-ip/ -
Test that software updates now work without storage errors:
sudo apt update
sudo apt list --upgradableSSH Connection Refused: If SSH connection is refused, make sure you've enabled the SSH server through the web interface first.
"Device or resource busy" during partition expansion: This usually indicates the partition is currently mounted and being used. This is normal and the expansion should still work correctly.
No space for software updates: If you still get storage errors after expansion, verify that the filesystem expansion completed successfully with df -h.
Web interface becomes inaccessible: Wait a few minutes for the system to complete the expansion process. The device may briefly disconnect during the partition table update.
- Tested on Orange Pi 5 B Plus with BELABOX custom kernel
5.10.160-belabox - Works with GPT partition tables and ext4 filesystems
- The expansion process is non-destructive if followed correctly
- SSH server auto-start is configured through systemd
- Process confirmed working with SD cards up to 512GB
With SSH enabled and full disk space available, you can now:
- Install additional software packages without storage constraints
- Store recordings and logs locally
- Perform system maintenance via SSH
- Set up automated backups or monitoring
For more BELABOX configuration options, check out the main documentation at belabox.net.