Skip to content

feat(pi): mount USB drives in Files without auto data-disk migration#2149

Open
LuckyCoders wants to merge 2 commits into
getumbrel:masterfrom
LuckyCoders:feat/pi-mount-external-storage
Open

feat(pi): mount USB drives in Files without auto data-disk migration#2149
LuckyCoders wants to merge 2 commits into
getumbrel:masterfrom
LuckyCoders:feat/pi-mount-external-storage

Conversation

@LuckyCoders

Copy link
Copy Markdown

Summary

Raspberry Pi currently uses a boot-time script (umbrel-external-storage) that treats any single USB disk as a Umbrel data disk (wipe + mkfs.ext4 -L umbrel). The Files app external storage feature is disabled on Pi in both backend and UI.

This PR separates the two flows:

  • Default (no opt-in): USB drives are left alone at boot and mounted by umbreld under Files → External, like on Umbrel Home / x86.
  • Opt-in only: The legacy data-disk migration script runs only if umbrel-allow-external-format exists on the SD card boot partition (same flag as the format-safety PR).

Fixes the common case where users plug in a drive with existing data (NTFS/exFAT/ext4) expecting removable storage, not a wiped Umbrel data volume.

Depends on: #2148 (fix/pi-refuse-auto-format-external-usb)

Problem

On Pi, connecting a USB drive could trigger:

  1. wipefs + GPT + mkfs.ext4 -L umbrel (if not ext4 / no .umbrel)
  2. UI message: “External storage not supported”
  3. No way to use the drive in Files without erasing it

Changes

Boot script (umbrel-external-storage)

  • Exit immediately (success) when umbrel-allow-external-format is not present
  • Log that USB is handled by umbreld under Files → External
  • Data-disk migration (format + bind mount /home/umbrel) only runs with explicit opt-in

umbreld external storage

  • Enable external storage module on Raspberry Pi (supported()true)
  • Run UAS blacklist check on Pi start (moved from boot script path when data-disk script is skipped)
  • Exclude disks already mounted at /mnt/data (Umbrel data volume) from /External
  • New API: files.isExternalStorageSupported

UI

  • Use files.isExternalStorageSupported instead of hardcoded productName !== 'Raspberry Pi'
  • External storage sidebar / eject works on Pi when OS is updated

OS image

  • Install ntfs-3g on arm64 (was amd64-only)

LuckyCoders and others added 2 commits May 18, 2026 18:37
The Pi external storage mount script silently ran wipefs and mkfs.ext4
when a single USB disk was not recognised as an Umbrel data drive.
Require explicit opt-in before formatting and block foreign filesystems.

Fixes getumbrel#1956

Co-authored-by: Cursor <cursoragent@cursor.com>
Skip the Pi boot data-disk script unless umbrel-allow-external-format is set.
Enable umbreld external storage on Raspberry Pi, install ntfs-3g on arm64, and
exclude disks already used as the Umbrel data volume at /mnt/data.

Depends on fix/pi-refuse-auto-format-external-usb

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant