How to mount ufs file system under Debian testing?

In order to mount my /dev/sda4 under /mnt/ufs_mount on Debian Testing , i have tried the following commands (it works fine under Debian Jessie):

modprobe ufs
mount -r -t ufs -o ufstype=ufs2 /dev/sda4 /mnt/ufs_mount

and:

mount -t ufs -o ufstype=ufs2 /dev/sda4 /mnt/ufs_mount

But i get this error:

mount: /dev/sda4 is write-protected, mounting read-only
mount: wrong fs type, bad option, bad superblock on /dev/sda4,
   missing codepage or helper program, or other error

   In some cases useful info is found in syslog - try
   dmesg | tail or so.

The output of: dmesg | tail :

[ 1136.965142] ufs: ufs_fill_super(): bad magic number
[ 1255.758946] ufs: ufs_fill_super(): bad magic number
[ 2098.945757] ufs: ufs was compiled with read-only support, can't be mounted as read-write
[ 2098.946045] ufs: You didn't specify the type of your ufs filesystem

      mount -t ufs -o ufstype=sun|sunx86|44bsd|ufs2|5xbsd|old|hp|nextstep|nextstep-cd|openstep ...

      >>>WARNING<<< Wrong ufstype may corrupt your filesystem, default is ufstype=old
[ 2098.967212] ufs: ufs_fill_super(): bad magic number
[ 2927.982112] perf: interrupt took too long (2504 > 2500), lowering kernel.perf_event_max_sample_rate to 79750

Edit
My sources.list:

deb http://httpredir.debian.org/debian/ stretch main
deb-src http://httpredir.debian.org/debian/ stretch main

deb http://security.debian.org/debian-security stretch/updates main
deb-src http://security.debian.org/debian-security stretch/updates main

And uname -a:

Linux debian 4.6.0-1-amd64 #1 SMP Debian 4.6.4-1 (2016-07-18) x86_64 GNU/Linux

How to mount ufs file system under Debian testing?

Answers:

Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.

Method 1

According to mount freebsd slice partition under linux, you may need to specify an offset into the partition.

partx -l should be able to identify the sector offset of the filesystem, which you’d need to multiply by 512. You can pass that as a mount option using -o offset=$((512*sector_offset)) – assuming you’re using bash or a similar shell.


All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x