Solved

How to mount a FreeBSD drive to a folder on a OpenSuse Linux Box

Posted on 2007-11-14
17
1,523 Views
Last Modified: 2013-12-16
I have a FreeBSD drive that I want to get its data. I have piggybacked it as a slave to my OpenSuSE box I can see it as /dev/sdb. The partition I want is /dev/sdb1. I am trying to mount it to /home/eric/data.

I have run a series of mount commands with different switches, but obviously, I am missing something. This was one of them:

mount -t ufs /dev/sdb1 /home/eric/data

This was its output:

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


HELP!
0
Comment
Question by:emherman
  • 5
  • 5
  • 2
  • +3
17 Comments
 
LVL 12

Expert Comment

by:ibu1
ID: 20287079
) Install hard disk to your computer
2) boot your computer
3) dmesg | less
                                         From the output, look for an indication that the new hard disk was found. For example, if it is a secound IDE, you should see "hdb" in the output.Be sure you idenify the right disk.I mean to say u should find hdb1 or hdb2,etc
from the dmesg| less output.
Make one directory where u want to mount the partition
example /home/eric/data
14) Edit the fstab file
/dev/sdb1               /home/eric/data             ext3         defaults         1 1
0
 
LVL 88

Expert Comment

by:rindi
ID: 20287708
You could also try ext2 or auto. It depends on the filesystem the partition was formatted with. As far as I know freebsd uses ext2 and ext3 by default. If you don't have luck this way, try booting with a LiveCD like knoppix, it tries to guess the filesystems used, and then you could mount the drives there and directly copy the data you need, or you could look at what fstab shows you and then use those settings when you boot to opensuse again.

http://knoppix.net
0
 
LVL 29

Expert Comment

by:TeRReF
ID: 20288085
I mount it like this in fstab:

/dev/sdb1  /home/eric/data  ufs  auto,rw,ufstype=ufs2, nodev,nosuid  0  0
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 88

Expert Comment

by:rindi
ID: 20288821
Then you probably don't have the ufs filesystem module on your system, as that isn't used very commonly. You'd either have to download the kernel sources and include the ufs module, or try knoppix which may have that module included.
0
 
LVL 1

Author Comment

by:emherman
ID: 20291611
I did a /cat/proc/filesystems and "ufs" was listed (and ext3). It was missing the "nodev" entry if that makes a diff.

BTW - I don't need to permanently mount the drive. I just need to get temporary access to it to pull off data and get it on the Linux box. Will I need to set up the fstab entries or can I get away with juts using the mount command?

If I load Knoppix will I still have access to the hard drive to put the data or will it run entirely off the CD?
0
 
LVL 1

Author Comment

by:emherman
ID: 20291752
... did not see ufs2 listed
0
 
LVL 88

Expert Comment

by:rindi
ID: 20291758
With knoppix you should have access to all disks that the OS sees. It loads KDE and the disks normally are shown on the desktop. Click on it and it opens. If you then right click that icon again, you should have an option to change the read/write mode of the partition (knoppix loads everything in read only mode by default). You can also mount network folders and copy the data to those if you want.
0
 
LVL 1

Author Comment

by:emherman
ID: 20291774
... btw - I would just need read-only access, since I do not plan to use the drive after I get the data off.
0
 
LVL 1

Author Comment

by:emherman
ID: 20291793
The drive was running FreeBSD 4.11
0
 
LVL 88

Expert Comment

by:rindi
ID: 20291846
You will need writing access to the disk you want to copy the data to.
0
 
LVL 1

Author Comment

by:emherman
ID: 20293970
OK. I tried Knoppix, and got to the desktop. I see "hdb1" on the desktop and clicked on it. I get:

------------------------------------------

Could not mount the device.

The reported error was:

mount: I could not determine the filesystem type, and none was specified

-----------------------

What now?
0
 
LVL 88

Accepted Solution

by:
rindi earned 84 total points
ID: 20296693
Try installing a small freebsd pc with just the essentials, and then try mounting the Disk there.
0
 
LVL 29

Expert Comment

by:TeRReF
ID: 20297272
Was the drive dismounted properly? Are there any errors that might prevent proper mounting of the drive?
0
 
LVL 62

Assisted Solution

by:gheist
gheist earned 84 total points
ID: 20300690
Boot off latest FreeBSD CD Get into recovery mode
chroot /dist
mount_devfs /dev
fsck /dev/ad0s1[a-i]
0
 
LVL 17

Assisted Solution

by:CSecurity
CSecurity earned 84 total points
ID: 20311212
I had a similar problem trying to mount by FreeBSD partition from OpenSUSE

add "-r -t ufs -o ufstype=44bsd" to your mount command like this:

mount -r -t ufs -o ufstype=44bsd /dev/sdb1 /home/eric/data
0
 
LVL 62

Expert Comment

by:gheist
ID: 20311235
One should fsck from FreeBSD anyway.  UFS2 not supported in Linux kernel.
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article we have discussed the manual scenarios to recover data from Windows 10 through some backup and recovery tools which are offered by it.
The purpose of this article is to demonstrate how we can use conditional statements using Python.
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question