Accessing an unknown disk

Over the years I've accumulated a few hard disks and can't remeber what is on them. What I would like to do is connect them to my FreeBSD system via USB caddy and mount them. It sounds simple enough to do, but am not sure of the easiest way of doing it, but I invariably I end up with something like

mount: /dev/da0s1: Invalid argument

Any suggestions as how I should go about accessing an unkown disk?

BTW I expect they all have some Windows variant and are probably formatted as NTFS.
 
gpart show /dev/da0 would be a good place to start to see how the disk is partitioned (see the gpart(8) man page). mount(8) takes the -t msdosfs option for FAT partitions. To mount NTFS partitions I believe you need the sysutils/fuse-ntfs port. It might be useful to mount your mystery partitions using the -o ro option to mount them read-only.
 
balanga said:
Over the years I've accumulated a few hard disks and can't remeber what is on them. What I would like to do is connect them to my FreeBSD system via USB caddy and mount them. It sounds simple enough to do, but am not sure of the easiest way of doing it, but I invariably I end up with something like

mount: /dev/da0s1: Invalid argument

Any suggestions as how I should go about accessing an unkown disk?
How about file /dev/da0 or file /dev/da0s1? It knows about all sorts of obscure file formats:

Code:
(0:1) host:~# file /dev/da0
/dev/da0: Files-11 On-Disk Structure Level 5 (ODS-5 OpenVMS file system), volume label is 'ALPHASYS    '
Once you know what sort of filesystem is on the disk / partition, you can then invoke mount(8) with the appropriate -t flag (assuming it is a natively supported filesystem type) or the appropriate user-level program (for example, sysutils/ods2).
 
asteriskRoss said:
gpart show /dev/da0 would be a good place to start to see how the disk is partitioned (see the gpart(8) man page). mount(8) takes the -t msdosfs option for FAT partitions. To mount NTFS partitions I believe you need the sysutils/fuse-ntfs port. It might be useful to mount your mystery partitions using the -o ro option to mount them read-only.

This is how it is partitioned:-

Code:
# gpart show /dev/da0
=>      63  39070017  da0  MBR  (19G)
        63  39070017    1  ntfs  [active]  (19G)

I just can't figure out how to mount it.

On Windows I simply connect it to a USB port and it shows up as a new drive when I click on Computer
 
The error you are seeing is due to mount(8) expecting to find a UFS device unless you tell it otherwise using the -t <file system type> option. Expanding on @SirDice's answer: If you're using FreeBSD 8.4 or 9.x you can mount your NTFS partition (read-only) without installing anything else with mount -t ntfs -o ro /dev/da0s1 /mnt. In FreeBSD 10.0 and later you will need to install the sysutils/fuse-ntfs port and then mount it with mount -t ntfs-3g -o ro /dev/da0s1 /mnt.

The FreeBSD handbook has an introduction on mounting file systems. Some desktop managers and file managers are able to mount partitions through their graphical interface. You haven't yet mentioned which you are using, if any. For mounting just a few different partitions, it might be faster to stick to the command line.
 
Last edited by a moderator:
I've read The Handbook and it doesn't distinguish between FreeBSD 10.0 and previous versions.

sysutils/fusefs-ntfs has been installed

Code:
 # mount -t ntfs-3g -o ro /dev/da0s1 /mnt/a
mount: /dev/da0s1: Operation not supported by device

I just connected the disk to my Windows system and is immediately accessible.

What am I doing wrong?
 
balanga said:
I just connected the disk to my Windows system and is immediately accessible.
The easy option, of course, would just be to use your Windows system, which has native NTFS support! In terms of selecting the right tool for the job, I wouldn't spend time trying to mount my FreeBSD UFS disks using a Windows system :)

If you want to persevere with FreeBSD, I believe sysutils/fuse-ntfs contains a utility called ntfs-3g.probe that you can use to obtain more information about why it's not mounting. I couldn't find the man page for it on the utility's official website but there is a page relating to the port for FreeBSD 9.2 and I imagine there will be a current man page installed on your system. Try running:
Code:
# ntfs-3g.probe --readonly /dev/da0s1
# echo $?
The output of the echo command will show the return code, which you can compare to those listed in the man page. It may or may not be helpful.
 
I am persevering with FreeBSD but it's stiff learning cliff and the worst thing is that many of the handy hints and tips on the Internet are out of date, make too many assumptions or just simply don't work for some reason. On the plus side this forum provides a wealth of knowledge and everyone is highly knowledge and eager to help :)
 
balanga said:
I am persevering with FreeBSD
I'm glad you're not giving up on FreeBSD, @balanga! :) I just meant that for this particular task (looking at files on NTFS partitions), it might be easier to connect the disks to your Windows system. A hammer and a screwdriver are both useful tools, but if I need to drive in a nail, I'll pick up a hammer rather than attaching a hammer's head to my screwdriver :)
 
Last edited by a moderator:
balanga said:
I've read The Handbook and it doesn't distinguish between FreeBSD 10.0 and previous versions.

sysutils/fusefs-ntfs has been installed

Code:
 # mount -t ntfs-3g -o ro /dev/da0s1 /mnt/a
mount: /dev/da0s1: Operation not supported by device

See ntfs-3g(8). That is a command to be used instead of mount(1). So ntfs-3g -o ro /dev/da0s1 /mnt/a.
 
FreeBSD 10 removed the native NTFS code, so the FUSE version must be used. That said, I have never tried to use it with FreeBSD's mount() command. Maybe it can work that way.
 
Last edited:
Hi,

I have previously used ntfs-3g /dev/da0s1 /mnt/extdisk with another distribution, but FreeBSD notifies me that ntfs-3g command is not found.

The disk is attached via USB and I know it is a ntfs partition. I have also tried mount -t ntfs /dev/da0s1 /mnt/extdisk , but is notified that operation is not supported by the device.

Just for the record, I have checked the repository for ntfs-3g , but it is not available.

Edit: Ok, got it. sysutils/fusefs-ntfs is ntfs-3g

Thanks
 
Back
Top