Skip to content

Instantly share code, notes, and snippets.

@zebrajaeger
Last active June 27, 2024 00:01
Show Gist options
  • Save zebrajaeger/168341df88abb6caaea5a029a2117925 to your computer and use it in GitHub Desktop.
Save zebrajaeger/168341df88abb6caaea5a029a2117925 to your computer and use it in GitHub Desktop.
usbmount (also ntfs) for Raspberry PI 4b - Raspberry PI OS lite 32 (headless)

usbmount (also ntfs) for Raspberry PI 4b - Raspberry PI OS lite 32 (headless)

1. Install OS

Download and install "Raspberry Pi Imager" from https://www.raspberrypi.org/software/

Choose "Raspberry PI OS Lite 32" Press Ctrl+Shift+X

  • Maybe switch to save always

  • Change hostname

  • Activate ssh, copy your public key into the text field

  • Activate WiFI, choose SSID and password, choose country

  • Change timezone and keyboard layout

Choose SD-Card and flash

2. Install dependencies

sudo apt install git debhelper build-essential ntfs-3g

3. compile and install usbmount

cd /tmp
git clone https://github.com/rbrito/usbmount.git
cd usbmount
dpkg-buildpackage -us -uc -b
cd ..
sudo apt install ./usbmount_0.0.24_all.deb

4. edit configuration

4.1. usbmount

sudo nano /etc/usbmount/usbmount.conf

and change these keys to:

FILESYSTEMS="vfat ext2 ext3 ext4 hfsplus ntfs fuseblk"
VERBOSE=yes

4.2 udev

Create file:

sudo mkdir /etc/systemd/system/systemd-udevd.service.d
sudo nano -w /etc/systemd/system/systemd-udevd.service.d/00-my-custom-mountflags.conf

and add content:

[Service]
PrivateMounts=no

restart udev (or reboot instead):

sudo systemctl daemon-reexec
sudo service systemd-udevd restart

5. debug

tail -f /var/log/syslog

Appendix

Links to information i used

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment