0

New here(and to Linux), hope someone can help me. I'm trying to mount two HDDs that come from a FreeBSD box (mainboard died) on my freshly installed Ubuntu (16.04). I get the following error...

tv@Media-Centre:~$ sudo mount -r -t ufs -o ufstype=ufs2 /dev/sdb /home/tv/ufs_mount
mount: wrong fs type, bad option, bad superblock on /dev/sdb,
missing codepage or helper program, or other error

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

Any pointers please?

Anwar
  • 75,875
  • 31
  • 191
  • 309
ChrisGreyling
  • 11
  • 1
  • 3
  • or http://askubuntu.com/questions/85189/error-trying-to-mount-freebsd-ufs-partition-from-freenas – Anwar Sep 18 '16 at 13:20
  • Thanks for the comment, but I tried all that yesterday, and still got the error. – ChrisGreyling Sep 18 '16 at 16:39
  • I believe that the issue is different than the one in the linked question because OP tries to mount a raw, unpartitioned disk `/dev/sdb`. See my answer for details. – David Foerster Oct 02 '16 at 10:13

2 Answers2

1

/dev/sdb refers to a whole disk, whereas file systems typically reside inside disk partitions. There should be more device nodes with the same prefix and a numerical suffix: /dev/sdb1, /dev/sdb2, and so on. Consequentially, the device path given to mount command should be like this:

sudo mount [OPTIONS...] /dev/sdb1 /path/to/mountpoint

You can explore the partition geometry and file system types with blkid or lsblk -f:

sudo blkid /dev/sdb*
sudo lsblk -f /dev/sdb
David Foerster
  • 35,754
  • 55
  • 92
  • 145
  • Hi guys, I've managed to mount the HDD using the following command. sudo mount -t ufs -o ufstype=ufs2 /dev/sdb1 /home/tv/ufs_mount . It mounts the drive but can't access the data, fisrt of all, it's read only, and when you click on the drive it doesn't display any of the items on the drive? It tells me that there are x amount of files and folders, but I cannot see them? How do I get this working properly? Any advice please? – ChrisGreyling Oct 02 '16 at 06:25
  • Could you please open a [new question](/questions/ask) if you have a new or follow-up question? The comment section is not suitable or meant for new questions or extended discussion. Thanks. – David Foerster Oct 02 '16 at 07:30
  • Sorry, but it's not a new question, I'm still having a problem mounting the ufs drives. I don't understand why it's not displaying the data on the disk, I'm not sure what I'm doing wrong, or have clearly forgotten to do something. – ChrisGreyling Oct 02 '16 at 09:10
  • Then at least edit your question to include the follow-up question with a description of what you tried and observed – this will trigger a vote over reopening the question and the voters may decide differently than I. I still maintain that it's a different issue related to a different layer (mounting UFS vs. finding the right device to mount) of your overall aim. – David Foerster Oct 02 '16 at 10:05
  • Thank you David, your insight into the original question helped me, I have now mounted the drives. I'll start another question regarding the issue I have now. Sorry for taking so much of your time, but Linux is new to me, and I want to learn. Cheers – ChrisGreyling Oct 02 '16 at 10:09
  • No problem. We all had to start somewhere and I understand that the question-and-answer model of AskUbuntu/StackExchange is not entirely obvious to people who are used to forum-style discussions. – David Foerster Oct 02 '16 at 10:11
0

Load the UFS module if you haven't already.

sudo modprobe ufs

Taken from Mount UFS filesystem

Stephen
  • 39
  • 5
  • Thanks for the reply, I did that, but still get the same error. – ChrisGreyling Sep 18 '16 at 12:22
  • Ahh might be modprobe ufs2 actually. Sorry I haven't got anything to test with right now. – Stephen Sep 18 '16 at 12:26
  • I think you might be on to something here. ufs2, but yes, not sure how to go by implementing this... – ChrisGreyling Sep 18 '16 at 16:39
  • If the `ufs` module wasn't loaded, `mount -t ufs` would fail with "unknown file system type 'ufs'" or something like that before it would even get around to start to look for the (apparently missing) file system header. I just tried that with an empty dummy device and an unloaded `ufs` module. -1 – David Foerster Oct 02 '16 at 10:16