LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   fails: mount -t ufs -o ro,ufstype ufs2 /dev/sdc2 /mnt (https://www.linuxquestions.org/questions/slackware-14/fails-mount-t-ufs-o-ro-ufstype-ufs2-dev-sdc2-mnt-4175735542/)

mw.decavia 03-31-2024 05:38 PM

fails: mount -t ufs -o ro,ufstype ufs2 /dev/sdc2 /mnt
 
I need to resave some old files originally created under freebsd on a byegone pc, into some fs that is more generic. Right now adding a freebsd install to the laptop I have available would not be practical.

Back in the day when I was using slackware 14.x, this worked.

Code:

mount -t ufs -o ro,ufstype=ufs2 /dev/sdc2 /mnt
but now using slackware 64 15.0 , this error happens instead.

Code:

mount: /mnt: wrong fs type, bad option, bad superblock on /dev/sdc2,
missing codepage or helper program, or other error.

This is the (partial) output of "lsmod"

Code:

Module                  Size  Used by
fuse                  159744  1
ufs                    94208  0

This is happening on every drive and partition I have tried.

If I am trying to mount ufs partitions in an outdated way, please tell me the correct current way.

teckk 04-01-2024 01:55 PM

I haven't had to do that for a while.

https://www.kernel.org/doc/html/late...guide/ufs.html

You might run lsblk -f on them.

You may also look and see what you have on your machine
Code:

ls /usr/lib/modules/6.7.9-arch1-1/kernel/fs
9p          coda      fat      jffs2          nfsd      pstore    ufs
affs        cramfs    fscache  jfs            nilfs2    quota    vboxsf
afs        dlm      fuse    lockd          nls        reiserfs  xfs
bcachefs    ecryptfs  gfs2    mbcache.ko.zst  ntfs3      romfs    zonefs
befs        erofs    hfs      minix          ocfs2      smb
btrfs      exfat    hfsplus  netfs          omfs      squashfs
cachefiles  ext4      isofs    nfs            orangefs  ubifs
ceph        f2fs      jbd2    nfs_common      overlayfs  udf

I don't know where slack has that.

marav 04-01-2024 02:18 PM

Quote:

Originally Posted by teckk (Post 6493445)
I haven't had to do that for a while.

https://www.kernel.org/doc/html/late...guide/ufs.html

You might run lsblk -f on them.

You may also look and see what you have on your machine
Code:

ls /usr/lib/modules/6.7.9-arch1-1/kernel/fs
9p          coda      fat      jffs2          nfsd      pstore    ufs
affs        cramfs    fscache  jfs            nilfs2    quota    vboxsf
afs        dlm      fuse    lockd          nls        reiserfs  xfs
bcachefs    ecryptfs  gfs2    mbcache.ko.zst  ntfs3      romfs    zonefs
befs        erofs    hfs      minix          ocfs2      smb
btrfs      exfat    hfsplus  netfs          omfs      squashfs
cachefiles  ext4      isofs    nfs            orangefs  ubifs
ceph        f2fs      jbd2    nfs_common      overlayfs  udf

I don't know where slack has that.

Code:

# ls /lib/modules/6.6.23/kernel/fs
adfs    bfs        dlm      gfs2    minix  orangefs  quota  zonefs
affs    cachefiles  ecryptfs  hfs      nilfs2  overlayfs  sysv    binfmt_misc.ko
afs    ceph        efs      hfsplus  nls    pstore    ubifs
autofs  coda        freevxfs  hpfs    ocfs2  qnx4      ufs
befs    cramfs      fuse      jffs2    omfs    qnx6      vboxsf


marav 04-01-2024 02:23 PM

@mw.decavia
Can you post the output of? :
Code:

# file -s /dev/sdc2

mw.decavia 04-01-2024 04:44 PM

Quote:

Originally Posted by marav (Post 6493453)
@mw.decavia
Can you post the output of? :
Code:

# file -s /dev/sdc2

of course

Code:

# file -s /dev/sdc2
/dev/sdc2: DOS/MBR boot sector, BSD disklabel

And file ufs.ko was found here -

Code:

/lib/modules/5.15.19/kernel/fs/ufs/ufs.ko
But more importantly, I found the solution after user teckk replied -
It appears the 15.0 version of ufs.ko on my pc, thinks every ufs file needs to be "ufstype=44bsd" regardless of the ufs types I know the partitions are (because I created them myself years ago). When trying to mount a partition I know is ufs2, it still wants me to mount it as "44bsd". And then there is no error.

marav 04-01-2024 05:09 PM

Nice, so solved?

mw.decavia 04-01-2024 07:03 PM

Quote:

Originally Posted by marav (Post 6493483)
Nice, so solved?

Yes, though back in Slackware 14.x it was not like this. Perhaps some developer might have a look at the ufs fs module when the next release is being prepared ?

marav 04-01-2024 07:30 PM

According to man mount
Code:

Mount options for ufs
      ufstype=value
          UFS is a filesystem widely used in different operating systems. The problem are differences among implementations. Features of some implementations are undocumented, so its
          hard to recognize the type of ufs automatically. That’s why the user must specify the type of ufs by mount option. Possible values are:

          44bsd
              For filesystems created by a BSD-like system (NetBSD, FreeBSD, OpenBSD).

          ufs2
              Used in FreeBSD 5.x supported as read-write.


babydr 04-01-2024 11:50 PM

@marav , There used to be a third & maybe fourth selection .

ultrix

JimL ;-)

henca 04-02-2024 12:54 AM

Quote:

Originally Posted by mw.decavia (Post 6493491)
Perhaps some developer might have a look at the ufs fs module when the next release is being prepared ?

The ufs kernel module is part of the Linux kernel sources. Slackware usually uses upstream Linux kernels without any patches, so "some developer" should if so probably be some upstream Linux kernel developer.

regards Henrik


All times are GMT -5. The time now is 10:02 AM.