Mount FreeBSD UFS Volumes in macOS
For exchanging data with our FreeBSD home server, sometimes it would be helpful to mount an UFS formatted volume, for example on an USB stick or an external disk drive, in macOS. For having readonly access, we install the extension macFUSE (file system in user space for Mac) and compile the UFS module from the UNIX filesystems, which can be downloaded from the macFUSE repository.
Download and install the latest macFUSE package.
Download a .zip archive of the filesystems repository to your desktop.
Open the Terminal and enter the following commands in order to build the UFS fuse module:
sed -e "s/osxfuse/fuse/" -i "" Makefile
mkdir -p ~/bin
mv ufs ~/bin/
The .zip archive and the unzipped filesystem directory on the Desktop are no more needed, and may be deleted.
Connect the disk or the USB stick with the FreeBSD UFS volume to your Mac.
In the Terminal find out the device identifier of the FreeBSD UFS volume - here it is disk1s4:
/dev/disk1 (external, physical):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *1.0 TB disk1
1: EFI EFI 209.7 MB disk1s1
2: Apple_HFS Extern 640.0 GB disk1s2
3: Apple_Boot Recovery HD 650.0 MB disk1s3
4: FreeBSD UFS 359.3 GB disk1s4
Adjust the access rights of the respective device, so a normal user may mount it:
sudo chmod go+r /dev/disk1s4
Mount the volume:
mkdir -p /tmp/ufsvol; ~/bin/ufs --dmg /dev/disk1s4 --type ufs2 /tmp/ufsvol
A symbol of the mounted volume appears on the Computer and perhaps on the Desktop, and now we have readonly access to the files on that volume.
Copyright © Dr. Rolf Jansen - 2021-07-22 16:42:30
Discussion on Twitter: 1419652504808267795