Can Raspbian mount a ufs (freebsd) filesystem?

From time to time I'd like to mount FreeBSD ufs filesystems on a Pi3 running Raspbian Stretch. It appears that FreeBSD's ufs filesystems aren't recognized.

There's a reference on the web to mounting ufs on Ubuntu, but that's not obviously applicable. An apropos search comes up empty.

Thanks for reading, any guidance appreciated!

bob prohaska

Reply to
bob prohaska
Loading thread data ...

On a sunny day (Sat, 30 Jun 2018 18:20:17 +0000 (UTC)) it happened bob prohaska wrote in :

man mount says loo at /proc/filesystems on my older raspi it says: root@raspberrypi:~/compile/pantel/ip_to_country# cat /proc/filesystems nodev sysfs nodev rootfs nodev ramfs nodev bdev nodev proc nodev cgroup nodev tmpfs nodev devtmpfs nodev debugfs nodev sockfs nodev pipefs nodev anon_inodefs nodev rpc_pipefs nodev configfs nodev devpts ext3 ext2 ext4 vfat msdos nodev nfs nodev nfs4 nodev autofs f2fs nodev mqueue

So no ufs listed.

It also says (the man page) that it depends on the kernel, so you would have to recompile the kernel to add it. Maybe that Ubuntu article does just that? Then you may need to get the kernel sources too, may as well upgrade if a later version exists. FWIIW

Reply to
Jan Panteltje

Google says:

Mounting UFS file systems in Linux should be straight forward.

Load the UFS module (or make sure its loaded)

$sudo modprobe ufs

Make a directory where to mount the files on

mkdir ~/ufs_mount

To find out which device holds your UFS file system use the command fdisk -l, note which device you intend to mount.

Mount the file system to the directory your previously created

sudo mount -r -t ufs -o ufstype=ufs2 /dev/sdb1 /home//ufs_mount

(where: sdb1 is the UFS partition you want to mount and is the your current username where the intended mounting point was created previously.

HIH

--

Chris Elvidge, England
Reply to
Chris Elvidge

What I find indicates it's iffy. Using 'synaptic' on my pi3-raspbian and searching for 'ufs', I do find a package listed - 'ufsutils'. That may do what you need.

Reply to
ray carter

There is no ufs kernel modules in the default raspbian packages:

$ sudo modprobe ufs modprobe: FATAL: Module ufs not found.

You'll have to build the ufs kernel module. You need to either build a complete custom kernel, or have to use the DKMS framework to assist you. You can not mount a UFS volume until then.

Neither are in the default packages. The ufsutils provides the following ufs utilities:

mkfs.ufs fsck.ufs fsdb.ufs dumpfs.ufs growfs.ufs tunefs.ufs badsect.ufs ffsinfo

Unless this is something super important, IMO it isn't worth pursuing. Building custom kernels is not for the faint of heart, and is generally. On the other hand, all you really need to do is download the kernel source packages and the build dependencies, modify the set up to include UFS support, and then build your own custom kernel-image-x.y-z.stuff.deb packages.

I think you can probably get away with building the kernel and then copy the ufs.ko module and manually stick in the appropriate /lib/modules/$KERNEL-VERSION/kernel/fs/ufs/ directory and update the modules listing by "sudo depmod". I think that's all you need.

Please note that for the most part, UFS support is read-only. There are ways to get read-write support, but as the saying goes, "here be dragons": writing is not well tested or supported, and may eat your data.

--
Consulting Minister for Consultants, DNRC 
I can please only one person per day. Today is not your day. Tomorrow 
isn't looking good, either. 
I am BOFH. Resistance is futile. Your network will be assimilated.
Reply to
I R A Darth Aggie

Thank you, it's downloading now.

bob prohaska

Reply to
bob prohaska

I've had some limited success with ufs-fuse:

formatting link

However, one thing to understand is that UFS is not a standardised format. Every Unix has their own slightly different version, and the on-disc format is not the same across architectures: I tried and failed to read a UFS partition created by 64-bit big-endian MIPS on a 64-bit little-endian Intel machine.

If the FreeBSD partitions were created on the same architecture as you're reading them, you might have better luck than if they were from elsewhere.

Theo

Reply to
Theo

I saw that. I also saw that it's 5 years old and thought it was abandonware. That it gives you some success is a tribute to the programmer.

Because of course. I try not to remember those not-so-good old days, when endian-ness and what flavor of unix you were running mattered.

Sometimes, a lot.

--
Consulting Minister for Consultants, DNRC 
I can please only one person per day. Today is not your day. Tomorrow 
isn't looking good, either. 
I am BOFH. Resistance is futile. Your network will be assimilated.
Reply to
I R A Darth Aggie

It's not like anything new has happened to the disc format over the last few years.

I think I tried it a couple of years ago when it was a different repo - it doesn't have my issue about the big/little endian thing.

Turns out I had cause to try it today on a Mac - it failed on the ./configure step because of a lack of libfuse, despite having fuse installed and no obvious other package showing in Homebrew (ie entirely Mac problems). At that point I gave up and found another way.

Tho

Reply to
Theo

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.