Mounting an OpenBSD partition

Asked by Andy

Howdy,

I recently switched from OpenBSD to ubuntu, and I have a second hard drive in my computer that I used on OpenBSD to store music and stuff. Anyway, I can't even figure out how to mount the darn thing. This is what I've tried: mount -t ufs -r -o ufstype=ufs /dev/sdb4 /mnt

I've tried some variations on that too, but I don't have them all on hand to list for you. Dmesg shows "bad magic number," and honestly I don't really know what that means :-P

The disk is obviously intact because when I boot up with my OpenBSD CD I can still mount it and access the files just fine.

Thanks in advance,

Andy

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Andy (andybeeler) said :
#1

Oh, I also tried ufstype=44bsd

Revision history for this message
Andy (andybeeler) said :
#2

This: mount -t ufs -o ufstype=44bsd /dev/sdb4 /mnt

gives me
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

Dmesg|tail yields: ufs was compiled with read-only support, can't be mounted as read-write

Revision history for this message
nglnx (nglnx) said :
#3

Have you tried to specify the read only option in the mount command, since ufs was compiled with read-only support?

mount -r -t ufs -o ufstype=44bsd /dev/sdb4 /mnt

Revision history for this message
Andy (andybeeler) said :
#4

I have now, and this is what it produces:
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

And in dmesg:
ufs_read_super: bad magic number

Thank you much for the fast response :)

Revision history for this message
nglnx (nglnx) said :
#5

On my system, ubuntu 8.04, ufs is compiled as a module as can be seen by doing

grep UFS /boot/config-`uname -r`

Doing lsmod | grep ufs shows that the ufs module is not loaded by default

If the same happens to you, you would first have to do

sudo modprobe ufs

before issuing the mount command.

Revision history for this message
Marky (markbergan) said :
#6

Try this one:

mount -t ufs -o ro,ufstype=ufs2 /dev/xxx /mnt/xxx

Bingo.

Revision history for this message
cyberdelic beaver (ramrunner0xff) said :
#7

these days i found it to work with ufstype=44bsd. cheers

Can you help with this problem?

Provide an answer of your own, or ask Andy for more information if necessary.

To post a message you must log in.