# Problem with mount ad0s1d.spdr partition



## felixd (Sep 16, 2015)

I'm having a lot of difficulties to mount a partition on FreeBSD.


```
gpart show:

=>      63  41942977  ada0  MBR  (20G)
        63  41942817     1  freebsd  [active]  (20G)
  41942880       160        - free -  (80K)

=>       0  41942817  ada0s1  BSD  (20G)
         0    614400       1  freebsd-ufs  (300M)
    614400   1048576       2  freebsd-swap  (512M)
   1662976   2097152       4  freebsd-ufs  (1.0G)
   3760128   4194304       5  freebsd-ufs  (2.0G)
   7954432   4194304       6  freebsd-ufs  (2.0G)
  12148736  29794081       7  freebsd-ufs  (14G)
```


So I mount the ada0s1a partition:


```
mount /dev/ada0s1a /tmp/1
```

It appeared the boot directory into /tmp/1. The loader.conf file has the following contents:


```
autoboot_delay="-1"
beastie_disable="YES"
kern.ipc.semmni=32
kern.ipc.semmns=512
kern.ipc.nsfbufs=16148
net.inet.tcp.tcbhashsize=262144
vfs.root.mountfrom="ufs:ad0s1d.spdr"
rootdev="ad0s1d"
```

If I try to mount the partitions ada0s1d ==> ada0s1g I get the following error message:


```
rroot@:~ # mount /dev/ada0s1d /tmp/2
mount: /dev/ada0s1d: Invalid argument
root@:~ # mount /dev/ada0s1e /tmp/2
mount: /dev/ada0s1e: Invalid argument
root@:~ # mount /dev/ada0s1f /tmp/2
mount: /dev/ada0s1f: Invalid argument
root@:~ # mount /dev/ada0s1g /tmp/2
mount: /dev/ada0s1g: Invalid argument
```

I need to recover a file within that HD.

A version of the system I am talking about can be downloaded here.

Someone could help me set up such partitions?

Thank you
Felix


----------



## felixd (Sep 16, 2015)

Other attempts:


```
root@:~ # mount /dev/ada0s1d.spdr /tmp/2
mount: /dev/ada0s1d.spdr: No such file or directory

root@:~ # mount -t ufs /dev/ada0s1d.spdr /tmp/2
mount: /dev/ada0s1d.spdr: No such file or directory

root@:~ # mount -t ufs /dev/ada0s1d /tmp/2
mount: /dev/ada0s1d: Invalid argument
```




```
root@:~ # ls /dev/ada0
ada0%    ada0s1%  ada0s1a% ada0s1b% ada0s1d% ada0s1e% ada0s1f% ada0s1g%
```


----------



## wblock@ (Sep 16, 2015)

That appears to be a custom setup of FreeBSD.  Is it from some kind of appliance?


----------



## felixd (Sep 16, 2015)

Is it possible to create a custom file system? 

I think that these partition are encrypted. I tried geli attach but no success.


----------



## usdmatt (Sep 16, 2015)

Looking at the ISO file it appears to be a "Speedr Media Cache"

Usually, a suffix on the partition like that means the disk device is being passing through another GEOM module. For instance the following happens with GELI:

/dev/adaXpY -> raw device that is just encrypted data
/dev/adaXpY.eli -> device created by GELI, which is adaXpY after going through decryption.

So, the fact they have a .spdr suffix (which I've never seen in FreeBSD before) suggests they have a custom GEOM module in their OS which is doing something to the disk in order to make it mountable. It could be something simple like just messing around some of the fields in the filesystem data so it can't be mounted without their module, or it could be doing something far more involved like encryption.

Without hacking a copy of FreeBSD with their GEOM code, or a lot of reverse engineering it may not be trivial to get that to mount.

Of course it's possible it's GELI, and they've just made a few changes to the GELI code to rename the device node. (Don't know how you would confirm that or where you'd get the decryption key from though - Must be stored somewhere?)


----------



## usdmatt (Sep 16, 2015)

Is there a /boot/kernel directory on the boot partition that you were able to mount?

If you're really lucky there'll be a geom_spdr kernel module you can load into a standard FreeBSD system. Although you may have to get the same (or close) FreeBSD version as the one they used.


----------



## felixd (Sep 16, 2015)

no modules...

/boot:

```
dr--r----x  7 root  wheel    1024 Sep 16 03:09 .
drwxr-xr-x  4 root  wheel     512 Sep 16 03:09 ..
-r--r--r--  1 root  wheel    7680 Jul 18  2013 beastie.4th
-r--r--r--  1 root  wheel    8192 Jul 18  2013 boot
-r--r--r--  1 root  wheel     512 Jul 18  2013 boot0
-r--r--r--  1 root  wheel     512 Jul 18  2013 boot0sio
-r--r--r--  1 root  wheel     512 Jul 18  2013 boot1
-r--r--r--  1 root  wheel    7680 Jul 18  2013 boot2
-rw-r--r--  1 root  wheel   36608 Jul 18  2013 brb_preload
-r--r--r--  1 root  wheel    1201 Jul 18  2013 cdboot
drwxr-xr-x  2 root  wheel     512 Jul 18  2013 defaults
-r--r--r--  1 root  wheel     714 Jul 18  2013 device.hints
drwxr-xr-x  2 root  wheel     512 Jul 18  2013 firmware
-r--r--r--  1 root  wheel    2254 Jul 18  2013 frames.4th
-r--r--r--  1 root  wheel   15443 Jul 18  2013 gptboot
-r--r--r--  1 root  wheel   42467 Jul 18  2013 gptzfsboot
drwxr-xr-x  2 root  wheel     512 Sep 16 03:09 kernel
-r-xr-xr-x  1 root  wheel  245760 Aug  1  2014 loader
-r--r--r--  1 root  wheel    5858 Jul 18  2013 loader.4th
-rw-r--r--  1 root  wheel     190 Sep 16 03:06 loader.conf
-r--r--r--  1 root  wheel   15219 Jul 18  2013 loader.help
-r--r--r--  1 root  wheel     390 Jul 18  2013 loader.rc
-r--r--r--  1 root  wheel     512 Jul 18  2013 mbr
drwxr-xr-x  2 root  wheel     512 Jul 18  2013 modules
-r--r--r--  1 root  wheel     512 Jul 18  2013 pmbr
-r--r--r--  1 root  wheel  239616 Jul 18  2013 pxeboot
-r--r--r--  1 root  wheel     697 Jul 18  2013 screen.4th
-r--r--r--  1 root  wheel   35129 Jul 18  2013 support.4th
drwxr-xr-x  2 root  wheel     512 Jul 18  2013 zfs
-r--r--r--  1 root  wheel   66048 Jul 18  2013 zfsboot
-r-xr-xr-x  1 root  wheel  270336 Jul 18  2013 zfsloader
```


/boot/defaults:

```
drwxr-xr-x  2 root  wheel    512 Jul 18  2013 .
dr--r----x  7 root  wheel   1024 Sep 16 03:09 ..
-r--r--r--  1 root  wheel  23745 Nov  9  2013 loader.conf
```

/boot/firmware: (empty)

/boot/kernel:

```
drwxr-xr-x  2 root  wheel       512 Sep 16 03:09 .
dr--r----x  7 root  wheel      1024 Sep 16 03:09 ..
-r--r-----  1 root  wheel     65078 Sep 16 03:09 boot2.bmp
-r--r-----  1 root  wheel  14753767 Sep 16 03:09 kernel
-r--r----x  1 root  wheel     10160 Sep 16 03:08 splash_bmp.ko
-r--r----x  1 root  wheel     27272 Sep 16 03:08 vesa.ko
```

/boot/modules: (empty)

/boot/zfs: (empty)


----------



## wblock@ (Sep 16, 2015)

Okay, one last try: what device is this disk from?


----------



## usdmatt (Sep 16, 2015)

wblock@ I put that in my first reply. The ISO file he linked seems to call itself Speedr Media Cache


----------

