Artix Linux Forum

General Category => Forum => Topic started by: Jyrki on 27 April 2020, 19:07:07

Title: UFS support
Post by: Jyrki on 27 April 2020, 19:07:07
Hello, I am double booting with OpenBSD and I lack UFS support in Artix. Linux should be able to mount read only UFS drives, however seems like Arch got rid of this completely and Artix inherited this.
Any chance we can include it in Artix (again)?
Title: Re: UFS support
Post by: phoenix_king_rus on 27 April 2020, 20:33:14
UFS is not the only thing with *BSD: at first its label should be supported, which is different for OpenBSD and FreeBSD. I doubt any of them is supported in linux
Title: Re: UFS support
Post by: Jyrki on 27 April 2020, 22:08:17
yes, there are differences and that's why support is said to be read-only.
To my knowledge in mount you specify if you are mounting ffs (OpenBSD, NetBSD), or ufs2 (DragonFly, FreeBSD), like mount -r -t ufs -o ufstype=ufs2
Title: Re: UFS support
Post by: ndowens on 27 April 2020, 23:23:44
I would think there would be a fuse plugin for it maybe?
Title: Re: UFS support
Post by: Dudemanguy on 27 April 2020, 23:30:22
Are you sure there's no ufs support? modprobe ufs works just fine for me. Pretty sure the module is still around but it's just not on by default.
Title: Re: UFS support
Post by: Jyrki on 28 April 2020, 09:19:43
hmmm, I tried modprobe and seems like module got initiated and I was also able to mount partition. But it wasn't success. I cannot even view directory structure and when I enter directory I mounted OpenBSD partition to, it says I/O error. Seems like UFS support is broken. Which is pitty. Seems like the only way to get data shared between BSD and Linux is EXT2, FAT32 or NTFS. Or NFS of course - but that's not feasible while dual booting.
Title: Re: UFS support
Post by: phoenix_king_rus on 28 April 2020, 09:37:30
I just looked into kernel config options (via xconfig) and found only FreeBSD disklabel is marked as supported: this option is called CONFIG_BSD_DISKLABEL
Title: Re: UFS support
Post by: alium on 28 April 2020, 20:50:46
we follow archlinux kernel, if they change config we change config too.. therefore, it is unlikely that the archlinux kernel is different from our kernel.
at least for linux-zen I can say that it is 100% the same,
Title: Re: UFS support
Post by: alium on 28 April 2020, 20:53:10
artixlinux kernel config (linux-5.6.6-artix1):
Quote
CONFIG_UFS_FS=m
# CONFIG_UFS_FS_WRITE is not set
# CONFIG_UFS_DEBUG is not set

that same have archlinux too
Title: Re: UFS support
Post by: ####### on 29 April 2020, 15:21:57
Code: [Select]
aur/linux-aufs 5.6.7-1 [2 / 0.061759]
    The Linux AUFS kernel and modules
aur/linux-aufs-docs 5.6.7-1 [2 / 0.061759]
    Documentation for the Linux AUFS kernel
aur/linux-aufs-headers 5.6.7-1 [2 / 0.061759]
    Headers and scripts for building modules for the Linux AUFS kernel
That is in the AUR - Alternative UFS is not UFS but perhaps it has better support for BSD UFS too? Don't know though.
Title: Re: UFS support
Post by: Jyrki on 30 April 2020, 13:53:26
thanks for the idea, it took me some time to test it but result was the same.
I am not going to install FreeBSD just to try if the UFS support works with it. For me OpenBSD is important and obviously I have to use EXT2/EXT3 for drives I plan to share. Potentially use EXT4 for Linux system as OpenBSD can access EXT2/3 read-write and EXT4 read-only
Title: Re: UFS support
Post by: ####### on 30 April 2020, 16:55:36
If I do:
Code: [Select]
$ sudo modprobe -av ufs
$ cat /proc/filesystems
then UFS is shown, while before this, it is not. I get the same result in Devuan with the liqorix kernel, this is also available in the AUR, along with the CK kernel. Without a UFS filesystem to test with I couldn't say whether it actually functions as indicated though. The alternative kernels are different but whether they work for you is another matter. Also (probably it is just me does this, after all, you are dual booting BSD!) use uname -r to check you are running the kernel you think you are as merely installing may not actually boot with that  ;)  Plus if you have just installed a kernel you have to reboot before modprobe will work.
If it says there is UFS support and there isn't any that must mean there is a problem I guess...
Title: Re: UFS support
Post by: alium on 30 April 2020, 18:13:50
liqorix kernel is very very similar to linux-zen kernel, both make same peoples
Title: Re: UFS support
Post by: Jyrki on 30 April 2020, 22:21:16
of course I rebooted using new kernel. Module was loaded, mount claimed partition is mounted but I couldn't even see directory structure. Same as with standard Artix kernel
Title: Re: UFS support
Post by: alium on 30 April 2020, 23:21:44
https://www.kernel.org/doc/html/latest/admin-guide/ufs.html

The problem are differences among implementations. Features of some implementations are undocumented, so its hard to recognize type of ufs automatically. That’s why user must specify type of ufs manually by mount option ufstype.
Title: Re: UFS support
Post by: Jyrki on 01 May 2020, 11:49:42
thanks a lot, this was helpful and it was my bad. ufstype=44bsd is the correct type. However I can mount just it read-only, even though it should be supported read-write. But it is a big way forward.
Title: Re: UFS support
Post by: alium on 01 May 2020, 14:28:25
for write support you need a kernel with UFS write enable. I can enable support via CONFIG_UFS_FS_WRITE=y  in next linux-zen version, but absolutely without warranty.
Title: Re: UFS support
Post by: Jyrki on 01 May 2020, 16:14:01
that would be awesome. I can certainly try and let you know if I have any issues or if it works.
Title: Re: UFS support
Post by: alium on 03 May 2020, 17:27:33
Quote
CONFIG_UFS_FS_WRITE
is enabled in linux-zen-5.6.10, which is now in our [testing/gremlins]. This function is still marked as DANGEROUS. ;-)
Title: Re: UFS support
Post by: aht0 on 06 July 2020, 15:13:40
thanks for the idea, it took me some time to test it but result was the same.
I am not going to install FreeBSD just to try if the UFS support works with it. For me OpenBSD is important and obviously I have to use EXT2/EXT3 for drives I plan to share. Potentially use EXT4 for Linux system as OpenBSD can access EXT2/3 read-write and EXT4 read-only
NTFS might work as well for sharing data between Linux and  OpenBSD. Latter has read-write support on OpenBSD (sysutils/ntfs-3g)