Mouting Linux Filesystems (ext2/ext3/ext4)

In FreeBSD ext2, ext3 and ext4 are not different filesystems.
So we can mount an ext3 or ext4 filesystem with the ext2 mount command.
In this post I will show you how to mount Linux Filesystems with Read/Write support under FreeBSD.

First edit /etc/devfs.rules and add the following:

[localrules=5]
add path ‘da*’ mode 0660 group operator

Then edit /etc/rc.conf and enable the devfs ruleset
devfs_system_ruleset="localrules"

After that we need to tweak our sysctl settings to allow mounting by unprivileged users.
Add the following to your /etc/sysctl.conf:
vfs.usermount=1

To make the changes take effect immediately run:
sudo sysctl vfs.usermount=1

Next we want to install the fusefs driver
Go to /usr/ports/sysutils/fusefs-ext2
And compile and install the driver using
sudo make
sudo make install

After that we need to load the driver at bootup.
Add the following to your /boot/loader.conf:
fuse_load="YES"

Then create a directory which is accessible by your user:
sudo mkdir /mnt/usbdevice

And own the directory
sudo chown youruser:youruser /mnt/usbdevice

Last to mount your actual EXT Volume, run the following:
fuse-ext2 -o rw+ /dev/DEVICENAME /mnt/usbdevice

Leave a comment