Unable to mount linux-data

I have an old hard drive and I would like to see what is on it but I can not figure out how to mount it. Thanks in advance.

Code:
root@desk92:/var/run # grep ada1 /var/run/dmesg.boot
ada1 at ata3 bus 0 scbus3 target 0 lun 0
ada1: <ST2000VM003-1CT164 ES22> ATA-8 SATA 3.x device
ada1: 300.000MB/s transfers (SATA 2.x, UDMA5, PIO 8192bytes)
ada1: 1907729MB (3907029168 512 byte sectors: 16H 63S/T 16383C)
ada1: Previously was known as ad6

root@desk92:~ # uname -a
FreeBSD desk92.galacticnet.com 9.2-RELEASE-p9 FreeBSD 9.2-RELEASE-p9 #0 r268136: Wed Jul  2 06:18:17 PDT 2014  op@desk92.galacticnet.com:/usr/obj/usr/src/sys/desk92.kern  amd64

root@desk92:~ # ll /dev/ada1*
crw-r-----  1 root  operator  0x63 Nov 20 21:32 /dev/ada1
crw-r-----  1 root  operator  0x73 Nov 20 21:32 /dev/ada1s1
crw-r-----  1 root  operator  0x75 Nov 20 21:32 /dev/ada1s2
crw-r-----  1 root  operator  0x77 Nov 20 21:32 /dev/ada1s3

root@desk92:~ # gpart show /dev/ada1
=>          63  3907029105  ada1  MBR  (1.8T)
              63          1985  - free -  (992k)
          2048  48828120  1  linux-data  (23G)
  48830168  97656248  2  linux-data  (46G)
  146486416  3760542752  3  linux-data  (1.8T)

root@desk92:/var/run # mount -t ext2fs /dev/ada1s3 /mnt/old
mount: /dev/ada1s3: Invalid argument

root@desk92:/var/run # mount -t ext3fs /dev/ada1s3 /mnt/old
mount: /dev/ada1s3: Operation not supported by device

root@desk92:/var/run # mount -t xfs /dev/ada1s3 /mnt/old
mount: /dev/ada1s3: Operation not permitted
 
Sorry for being very pragmatic but why don't you simply boot a Linux live CD for one-time jobs like that?
 
I have zero experience with Linux but I like the suggestion. I will look into obtaining a Linux live CD.
 
linux-data is just a partition type. Use file(1) to find out which filesystem is on those partitions: file /dev/ada1s1.

If it is ext2 or 3, FreeBSD can mount those with mount -t ext2fs /dev/ada1s1 /mnt.
 
wblock@ is, of course, right as usual. But as not everyone is a Unix guru I'd like to extend somewhat on his advice and also explain what I said earlier.

linux-data is just a partition type. But I guess that in >= 99.5% of cases it's been created and used for/by Linux although theoretically those partitions might be formatted as NTFS or whatnot.

Is a rare (I suppose) "Gee, I wonder what's on that drive?" worth to install Linux stuff (like EXT2/3 support) on FreeBSD?

My suggestion is to download Puppy Linux which is small, quite powerful, and friendly. It has a GUI, many relevant tools and some newbie-friendly warning shots built-in. And it doesn't change a bit of your production system.
 
FWIW, I use sysutils/disktype for these questions; it is small, has just a few dependencies and builds quickly on any FreeBSD system.
Here is an example:
Code:
root@kg-core1# disktype /dev/da0*

--- /dev/da0
Character device, size 7.208 GiB (7739768832 bytes)
FreeBSD boot loader (i386 boot1 at sector 0)
FreeBSD boot loader (i386 boot2/BTX 1.02 at sector 2)
BSD disklabel (at sector 1), 8 partitions
Partition a: 699.4 MiB (733364224 bytes, 1432352 sectors from 0)
  Type 7 (4.2BSD fast file system)
  Includes the disklabel and boot code
  UFS file system, 8 KiB offset, little-endian
  Volume name "FreeBSD_Install" (in superblock)
  Last mounted at "/"
Partition c: 699.4 MiB (733364224 bytes, 1432352 sectors from 0)
  Type 0 (Unused)

--- /dev/da0a
Character device, size 699.4 MiB (733364224 bytes)
FreeBSD boot loader (i386 boot1 at sector 0)
FreeBSD boot loader (i386 boot2/BTX 1.02 at sector 2)
BSD disklabel (at sector 1), 8 partitions
Partition a: 699.4 MiB (733364224 bytes, 1432352 sectors from 0)
  Type 7 (4.2BSD fast file system)
  Includes the disklabel and boot code
  UFS file system, 8 KiB offset, little-endian
  Volume name "FreeBSD_Install" (in superblock)
  Last mounted at "/"
Partition c: 699.4 MiB (733364224 bytes, 1432352 sectors from 0)
  Type 0 (Unused)
 
I just had a similar problem and have stumbled upon this two year old thread....

I came across a 64GB micro SDHC card and wanted to know what was on it. Following instructions outlined above, I installed sysutils/disktype and it showed a particular partition as ext3fs, which I thought FreeBSD could handle, but it wouldn't.
Eventually I booted up some version of Linux and it turns out the partition is ext4fs. I don't know if FreeBSD can handle this.

In any case, is there any way to identify which version of Linux is installed just from the filesystem?
 
In any case, is there any way to identify which version of Linux is installed just from the filesystem?
Look at the /etc/*release file. Yes, that's a wildcard in there, every distribution uses a different name for the file, but it always ends with release.
 
Look at the /etc/*release file. Yes, that's a wildcard in there, every distribution uses a different name for the file, but it always ends with release.

It's Raspbian Wheezy, for my Raspberry Pi :) I had forgotten I had that...it's over two years since I installed it.
 
Not to revive an old thread but this does come up in search results, so a bit of improvement, imo:

Use file(1) to find out which filesystem is on those partitions: file /dev/ada1s1.

This will only result in:


# file /dev/da4s1
/dev/da4s1: character special (0/233)
#


vs


# file -s /dev/da4s1
/dev/da4s1: DOS/MBR boot sector, code offset 0x58+2, OEM-ID "MSDOS5.0", sectors/cluster 64, reserved sectors 10112, Media descriptor 0xf8, sectors/track 63, heads 128, hidden sectors 8064, sectors 60557952 (volumes > 32 MB), FAT (32 bit), sectors/FAT 7392, reserved1 0x73496850, reserved2 0x6e4f, serial number x*******f, label: "P*****T "
#
 
Back
Top