This article only applies to the Firewalla Purple and Firewalla Gold SE. Purple and Gold SE have an empty SD card slot, which can be used to expand onboard storage (in addition to loading new firmware)
STEP 1. Prepare partition and file system on a new SD card
NOTES:
- If you have an SD card with existing data on it, you can bypass this preparation part and go to the Mount SD card partition part directly.
- Insert SD Card with the gold tips facing up.
- Only support micro size SD card, class 10 or above recommended
STEP 1.1. Identify SD card
After plugging the SD card into the SD slot on Firewalla, check to see if it is detected by the system. It can be recognized as "/dev/mmcblk1" (or "/dev/mmcblk0").
For example,
$ sudo fdisk -l /dev/mmcblk1 Disk /dev/mmcblk1: 7.51 GiB, 8053063680 bytes, 15728640 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: dos Disk identifier: 0xf50c8845
STEP 1.2. Create partition and file system
There are different needs to use an SD card as external storage in Firewalla.
NOTE: When following these commands, ensure that you use the correct "/dev/mmcblk?" depending on how your SD card was detected in Step 1.1.
- To increase available external storage space in Firewalla, we can use a Linux file system like "ext4".
# copy and paste following 4 commands sudo parted -s /dev/mmcblk1 mklabel gpt sudo parted -s /dev/mmcblk1 mkpart primary ext4 2 100% sudo parted -s /dev/mmcblk1 align-check optimal 1 sudo mkfs.ext4 /dev/mmcblk1p1
- To share files between Firewalla and other systems(like Windows, Mac, Mobile device), we need to use a more compatible file system like "FAT32".
# copy and paste following 5 commands sudo parted -s /dev/mmcblk1 mklabel gpt sudo parted -s /dev/mmcblk1 mkpart primary fat32 2 100% sudo parted -s /dev/mmcblk1 align-check optimal 1 sudo apt install -y dosfstools sudo mkfs.vfat -F 32 /dev/mmcblk1p1
STEP 2. Mount SD card partition
For the SD card prepared from the above steps, just mount "/dev/mmcblk1p1."
sudo mount /dev/mmcblk1p1 /mnt/To do a quick check,
mount | grep /mnt
df -h /mnt
NOTE 1:
If your SD card has existing data with multiple partitions, you would need to have some idea about the existing partition structure and pick the right partition (/dev/mmcblk1p?) to mount.
sudo fdisk -l /dev/mmcblk1
NOTE 2:
With default mount options, "/mnt" is owned and only writable by root, to enable user `pi` to write to it, please mount "/mnt" with the uid/gid of user `pi`(1000).
For example, if you used FAT32,
sudo mount /dev/mmcblk1p1 /mnt -o rw,uid=1000,gid=1000If you used ext4,
sudo mount /dev/mmcblk1p1 /mnt
sudo chown 1000:1000 /mnt
NOTE 3:
This mount is just temporary. To make it permanent upon reboot, you can add the mount command to the shell startup file as needed
echo "sudo mount /dev/mmcblk1p1 /mnt" >> ~/.bashrc
# - OR -
echo "sudo mount /dev/mmcblk1p1 /mnt -o rw,uid=1000,gid=1000" >> ~/.bashrc
WARNING:
Always unmount before unplugging the SD card to avoid potential data corruption.
sudo umount -R /mnt
Comments
6 comments
Will the FW Purple automatically start using this SD card or do we need to steps to make it?
Purple boot from internal EMMC. The SD Card can be used to flash the EMMC ... and also as external storage
What size SD cards are supported?
I have an extra SD card sitting around, so put it into the Purple, but I currently don't have any use for it. Aside from possibly running docker containers or having a Purple image there ready to install if I ever need it, is there anything useful it can do?
on a firewalla purple, the last bit doesn't make the ssd to mount on reboot. You'd have to either change your /etc/fstab or follow https://help.firewalla.com/hc/en-us/articles/360054056754-Customized-Scripting
Does this still work on purple se? i'm getting $ sudo fdisk command not found.
Please sign in to leave a comment.