mount cannot mount ufs / ffs

Bug #268665 reported by Lars Noodén
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Won't Fix
Undecided
Unassigned

Bug Description

Mount does not recognize FFS partitions:

$ dmesg |tail
[ 588.940772] sd 4:0:0:0: [sdb] Mode Sense: 23 00 00 00
[ 588.940774] sd 4:0:0:0: [sdb] Assuming drive cache: write through
[ 588.940777] sdb: sdb4
[ 589.022072] sdb4: <openbsd: >
[ 589.022165] sd 4:0:0:0: [sdb] Attached SCSI removable disk
[ 589.022209] sd 4:0:0:0: Attached scsi generic sg2 type 0
[ 591.326093] ufs was compiled with read-only support, can't be mounted as read-write
[ 619.143630] ufs was compiled with read-only support, can't be mounted as read-write
[ 631.177276] ufs was compiled with read-only support, can't be mounted as read-write
[ 634.095300] ufs was compiled with read-only support, can't be mounted as read-write

$ mount -V
mount (util-linux-ng 2.13.1)

$ lsb_release -rc
Release: 8.04
Codename: hardy

$ uname -a
Linux macbook 2.6.24-19-generic #1 SMP Wed Aug 20 17:53:40 UTC 2008 x86_64 GNU/Linux

Revision history for this message
Lars Noodén (larsnooden) wrote :

Still present in the release version of Karmic Koala:

$ lsb_release -rd
Description: Ubuntu 9.10
Release: 9.10

$ apt-cache policy libufs2
libufs2:
  Installed: 7.2-1
  Candidate: 7.2-1
  Version table:
 *** 7.2-1 0
        500 http://fi.archive.ubuntu.com karmic/universe Packages
        100 /var/lib/dpkg/status

$ apt-cache policy linux-image-2.6.31-16-generic
linux-image-2.6.31-16-generic:
  Installed: 2.6.31-16.52
  Candidate: 2.6.31-16.52
  Version table:
 *** 2.6.31-16.52 0
        500 http://fi.archive.ubuntu.com karmic-updates/main Packages
        500 http://security.ubuntu.com karmic-security/main Packages
        100 /var/lib/dpkg/status

from dmesg:

[42186.821767] sd 10:0:0:0: [sdb] Assuming drive cache: write through
[42186.821774] sd 10:0:0:0: [sdb] Attached SCSI removable disk
[42214.144308] ufs was compiled with read-only support, can't be mounted as read-write
[42227.398989] ufs was compiled with read-only support, can't be mounted as read-write

Revision history for this message
Lars Noodén (larsnooden) wrote :

Still present in Lucid RC2

It does not mount automatically.

Trying mount a FFS file system manually without specifying the filesystem gives this error:

    mount: Stale NFS file handle

Trying to mount a FFS file system manually and specifying UFS:

   mount: wrong fs type, bad option, bad superblock on /dev/sdb4,
          missing codepage or helper program, or other error
          In some cases useful info is found in syslog - try
          dmesg | tail or so

Trying to mount a FFS file system manually and specifying FFS:

   mount: unknown filesystem type 'ffs'

Linux 2.6.32-11-generic #15-Ubuntu SMP Tue Jan 19 20:38:41 UTC 2010 x86_64 GNU/Linux

Description: Ubuntu lucid (development branch)
Release: 10.04

Revision history for this message
Lars Noodén (larsnooden) wrote :

From /var/log/messages it complains about not being able to mount the UFS device as R/W:

Jan 22 10:50:33 mini kernel: [ 1558.209769] USB Mass Storage support registered.
Jan 22 10:50:38 mini kernel: [ 1563.202709] scsi 4:0:0:0: Direct-Access Generic STORAGE DEVICE 9407 PQ: 0 ANSI: 0
Jan 22 10:50:38 mini kernel: [ 1563.203521] sd 4:0:0:0: Attached scsi generic sg2 type 0
Jan 22 10:50:38 mini kernel: [ 1563.350327] sd 4:0:0:0: [sdb] 7959552 512-byte logical blocks: (4.07 GB/3.79 GiB)
Jan 22 10:50:38 mini kernel: [ 1563.351434] sd 4:0:0:0: [sdb] Write Protect is off
Jan 22 10:50:38 mini kernel: [ 1563.354694] sdb: sdb4
Jan 22 10:50:38 mini kernel: [ 1563.357311] sdb4: <openbsd: >
Jan 22 10:50:38 mini kernel: [ 1563.359945] sd 4:0:0:0: [sdb] Attached SCSI removable disk
Jan 22 10:51:19 mini kernel: [ 1604.499096] ufs was compiled with read-only support, can't be mounted as read-write
Jan 22 10:53:11 mini kernel: [ 1716.200282] ufs was compiled with read-only support, can't be mounted as read-write

Mounting it read-only as UFS seems to give small errors in kern.log and syslog:

/var/log/kern.log:Jan 22 11:03:01 mini kernel: [ 2307.101309] UFS-fs error (device sdb4): ufs_readdir: bad page in #2
/var/log/syslog:Jan 22 11:03:01 mini kernel: [ 2307.101309] UFS-fs error (device sdb4): ufs_readdir: bad page in #2

And though it seems to have been mounted read-only, trying to use it gives errors:

ls: reading directory /mnt/: Input/output error

Revision history for this message
Yi Dai (plmday) wrote :

Lars Noodén:

Read this.

http://wiki.netbsd.se/How_to_mount_FFS_partition_under_Linux#Mount

I guess it might not be a bug. I had the same problem in Arch, but I can now mount the !emu image of NetBSD following the instruction in the linked wiki above.

Revision history for this message
Savvas Radevic (medigeek) wrote :

Try this for read & write support:
sudo modprobe -v ufs

Then mount your drive:
mount -t ufs -o ufstype=ufs2 /dev/sdXY /mnt/
(change /dev/sdXY according to your device)

Revision history for this message
Lars Noodén (larsnooden) wrote :

# modprobe -v ufs
insmod /lib/modules/3.0.0-11-generic/kernel/fs/ufs/ufs.ko
# mount -t ufs /dev/sdb4 /mnt
mount: wrong fs type, bad option, bad superblock on /dev/sdb4,
       missing codepage or helper program, or other error
       In some cases useful info is found in syslog - try
       dmesg | tail or so

From /var/log/syslog, :

Oct 5 18:17:36 xubuntu kernel: [ 329.727520] ufs was compiled with read-only support, can't be mounted as read-write

Revision history for this message
Lars Noodén (larsnooden) wrote :

# mount -t ufs -o ufstype=ufs2 /dev/sdb4 /mnt/
mount: wrong fs type, bad option, bad superblock on /dev/sdb4,
       missing codepage or helper program, or other error
       In some cases useful info is found in syslog - try
       dmesg | tail or so

Revision history for this message
Lars Noodén (larsnooden) wrote :

Still present in Quantal.

$ lsb_release -rd;uname -a
Description: Ubuntu quantal (development branch)
Release: 12.10
Linux easynote 3.5.0-13-generic #13-Ubuntu SMP Mon Aug 27 21:32:34 UTC 2012 i686 i686 i686 GNU/Linux

Excerpt from syslog:

Aug 29 18:56:02 easynote kernel: [ 617.874764] sdb: sdb4
Aug 29 18:56:02 easynote kernel: [ 617.874764] sdb4: <openbsd: >
Aug 29 18:56:02 easynote kernel: [ 617.993375] sd 2:0:0:0: [sdb] No Caching mode page present
Aug 29 18:56:02 easynote kernel: [ 617.998831] sd 2:0:0:0: [sdb] Assuming drive cache: write through
Aug 29 18:56:02 easynote kernel: [ 618.004133] sd 2:0:0:0: [sdb] Attached SCSI removable disk
Aug 29 18:57:44 easynote kernel: [ 719.698043] ufs was compiled with read-only support, can't be mounted as read-write
Aug 29 18:57:52 easynote kernel: [ 728.077865] You didn't specify the type of your ufs filesystem
Aug 29 18:57:52 easynote kernel: [ 728.077865]
Aug 29 18:57:52 easynote kernel: [ 728.077865] mount -t ufs -o ufstype=sun|sunx86|44bsd|ufs2|5xbsd|old|hp|nextstep|nextstep-cd|openstep ...
Aug 29 18:57:52 easynote kernel: [ 728.077865]
Aug 29 18:57:52 easynote kernel: [ 728.077865] >>>WARNING<<< Wrong ufstype may corrupt your filesystem, default is ufstype=old
Aug 29 18:57:55 easynote kernel: [ 730.767071] UFS-fs error (device sdb4): ufs_check_page: bad entry in directory #2: rec_len is too small for name_len - offset=0, rec_len=12, name_len=260
Aug 29 18:57:55 easynote kernel: [ 730.777725] UFS-fs error (device sdb4): ufs_readdir: bad page in #2
Aug 29 19:02:28 easynote kernel: [ 1004.365054] UFS-fs error (device sdb4): ufs_readdir: bad page in #2

Revision history for this message
Phillip Susi (psusi) wrote :

If you are still getting the stale file handle error when you don't specify the fs type, please run it under strace and attach the output.

Changed in util-linux (Ubuntu):
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for util-linux (Ubuntu) because there has been no activity for 60 days.]

Changed in util-linux (Ubuntu):
status: Incomplete → Expired
Revision history for this message
Lars Noodén (larsnooden) wrote :

Error mounting /dev/sdb4 at /media/lars/disk: Command-line `mount -t "ufs" -o "uhelper=udisks2,nodev,nosuid" "/dev/sdb4" "/media/lars/disk"' exited with non-zero exit status 32: mount: wrong fs type, bad option, bad superblock on /dev/sdb4,
       missing codepage or helper program, or other error
       In some cases useful info is found in syslog - try
       dmesg | tail or so

Changed in util-linux (Ubuntu):
status: Expired → Incomplete
Revision history for this message
Lars Noodén (larsnooden) wrote :

That was in saucy alpha

$ lsb_release -rd
Description: Ubuntu Saucy Salamander (development branch)
Release: 13.10

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for util-linux (Ubuntu) because there has been no activity for 60 days.]

Changed in util-linux (Ubuntu):
status: Incomplete → Expired
Revision history for this message
Lars Noodén (larsnooden) wrote :

still present in Saucy beta2

Changed in util-linux (Ubuntu):
status: Expired → Confirmed
Revision history for this message
Lars Noodén (larsnooden) wrote :

still present in 13.10beta2

$ uname -a
Linux lubuntu 3.11.0-11-generic #17-Ubuntu SMP Tue Oct 1 19:42:04 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

Phillip Susi (psusi)
affects: util-linux (Ubuntu) → linux (Ubuntu)
Revision history for this message
Yuv (yuv) wrote :

I am experiencing this bug with a CF media. I can mount it manually with
  sudo mount -r -t ufs -o ufstype=ufs2 /dev/sdh m
but Dolphin (and Thunar) give me an error trying to mount /dev/sdh1

Revision history for this message
Ben Alex (ben-alex) wrote :

I notice dmesg is reporting this as an OpenBSD partition ("sdb4: <openbsd: >"). To mount an OpenBSD partition you need to use the ufstype=44bsd. For example:

mount -t ufs -o ro,ufstype=44bsd /dev/sdb4 $HOME/mnt

The above was tested on Linux 4.3.3-2-ARCH. I don't have an Ubuntu machine to test this on.

Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

Closing this bug with Won't fix as this kernel is no longer supported.
Please feel free to open a new bug report if you're still experiencing this on a newer release (Bionic 18.04.3 / Disco 19.04)
Thanks!

Changed in linux (Ubuntu):
status: Confirmed → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.