UFS Want to mount FreebSD UFS partitions in Linux with write permissions

INTRO:
New to FreeBSD.

I have installed FreeBSD using the UFS file system, and with separate ROOT "/" and HOME "/home" partitions.

I triple boot on this PC, with Arch Linux, Linux Mint and FreeBSD.
My PC has 3 (three) NVMe drives.
The first NVMe is used for OS (ROOT) and EFI (Boot) files for Linux, the second used for HOME user files and SWAP for Linux.
The third NVMe drive is used solely for FreeBSD, partitioned as shown in the picture attached to this post.

MY PROBLEM:
I want to be able to mount my FreeBSD UFS type partitions in Linux with read/write permissions.
This will allow me to access, modify and add files from and to either Linux OS onto my FreeBSD partitions.
So far I was only able to mount them as read only, with:

sudo modprobe ufs mkdir ~/ufs_mount sudo mount -r -t ufs -o ufstype=ufs2 /dev/nvme2n1p3 /home/<USER-NAME>/ufs_mount

Inside the mount directory, both a ".snap" directory and a ".sujournal" file are present. See attached picture.
Also, I cannot change the partition permissions the way you usually do in Linux, via chmod command.

Please help. Thanks.
 

Attachments

  • Screenshot at 2023-04-13 20-44-16.png
    Screenshot at 2023-04-13 20-44-16.png
    54.1 KB · Views: 156
  • Screenshot at 2023-04-13 20-47-37.png
    Screenshot at 2023-04-13 20-47-37.png
    124.3 KB · Views: 149
So googl'n "access freebsd filesystem", first hit was:


Your other option of course is r/w access of Linux FS from FreeBSD via fuse - with caveats either way.

Edit: You'll have to see if it works from Arch or Mint.
 
Most likely you can't. Linux' implementation of UFS is not well maintained, and probably outdated. And even if you could get write-access to work, I would strongly recommend NOT to do it. You should never trust 3rd-party implementations of filesystems. Some small error could be enough to destroy all your data.

IMHO, the only safe choice if you want to exchange data on a filesystem access level is good old FAT (as it's simple and well understood).

Recently, the same implementation of ZFS is available on both Linux and FreeBSD, so this might be another option.
 
Last time I looked Linux required you to recompile the UFS filesystem module if you want R/W access.

I strongly recommend using ZFS for sharing files on dual-boot.
 
Your other option of course is r/w access of Linux FS from FreeBSD via fuse - with caveats either way.
I got slack, and 2 other Linux oses, I use 3 ext4 partitions for categorized storage, FreeBSD 13.1 and 13.2 now that I upgraded. I do not have fuse installed, the FreeBSD in xfce4 auto mounts them, when I login to e16 I run this script on login.
Code:
sudo mount -t ext2fs /dev/nvd0p10 /media/data
sudo mount -t ext2fs /dev/nvd0p12 /media/projects
sudo mount -t ext2fs /dev/ada0p1 /media/storage
and I have not had any issues with read and write to any of them via FreeBSD without anything other then whatever FreeBSD did to allow it.

from what I found out lately is that Linux only allows read only for UFS which I've done in Slackware a few times.
 
zirias@
Thanks for your reply.
However, that is not the case for me, so I do not have to worry about any lost data.
All my PC activity is strictly as a home user, more of a hobby.
I protect my Main OS, which in my case is Arch, and basically just play with all the others (I triple boot this machine, as mentioned above - Arch, Linux Mint and FreeBSD)
 
Back
Top