Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Can Raspbian mount a ufs (freebsd) filesystem?

480 views
Skip to first unread message

bob prohaska

unread,
Jun 30, 2018, 2:20:18 PM6/30/18
to
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

Jan Panteltje

unread,
Jun 30, 2018, 2:47:14 PM6/30/18
to
On a sunny day (Sat, 30 Jun 2018 18:20:17 +0000 (UTC)) it happened bob
prohaska <b...@www.zefox.net> wrote in <ph8hl1$5c1$1...@news.albasani.net>:
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




Chris Elvidge

unread,
Jun 30, 2018, 5:37:15 PM6/30/18
to
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/<your_username>/ufs_mount

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

HIH

--

Chris Elvidge, England

ray carter

unread,
Jun 30, 2018, 6:54:59 PM6/30/18
to
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.

bob prohaska

unread,
Jul 1, 2018, 11:40:58 PM7/1/18
to
Thank you, it's downloading now.

bob prohaska

I R A Darth Aggie

unread,
Jul 2, 2018, 1:40:21 PM7/2/18
to
On Sat, 30 Jun 2018 18:20:17 +0000 (UTC),
bob prohaska <b...@www.zefox.net>, in
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.

Theo

unread,
Jul 2, 2018, 2:30:22 PM7/2/18
to
I R A Darth Aggie <n0b...@invalid.invalid> wrote:
> 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.

I've had some limited success with ufs-fuse:
https://github.com/mkatiyar/fuse-ufs2

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

I R A Darth Aggie

unread,
Jul 3, 2018, 11:38:53 AM7/3/18
to
On 02 Jul 2018 19:30:19 +0100 (BST),
Theo <theom...@chiark.greenend.org.uk>, in
<dZt*oV...@news.chiark.greenend.org.uk> wrote:
> I R A Darth Aggie <n0b...@invalid.invalid> wrote:
> > 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.
>
> I've had some limited success with ufs-fuse:
> https://github.com/mkatiyar/fuse-ufs2

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.

> 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.

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.

Theo

unread,
Jul 3, 2018, 3:26:17 PM7/3/18
to
I R A Darth Aggie <n0b...@invalid.invalid> wrote:
> On 02 Jul 2018 19:30:19 +0100 (BST),
> Theo <theom...@chiark.greenend.org.uk>, in
> <dZt*oV...@news.chiark.greenend.org.uk> wrote:
> > I've had some limited success with ufs-fuse:
> > https://github.com/mkatiyar/fuse-ufs2
>
> 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.

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
0 new messages