# Unable to access disk



## balanga (Jan 8, 2020)

I'm trying to access a SATA disk taken out of PVR with a hope of copying recordings on the disk before I return the PVR when my subscription expires in a couple of weeks.  When running `gpart show` the disk does not show up, but the system does see the disk when I run `camcontrol devlist` which shows:-


> <TOSHIBA MQ01ABD050V -63 3202>     at scbus2 target 0 lun 0 (da0,pass2)



Is there any way I can copy the recordings from the disk?


----------



## SirDice (Jan 8, 2020)

balanga said:


> Is there any way I can copy the recordings from the disk?


There's no partition table and it's unknown what kind of filesystem they used. You could try `file -s /dev/da0` to see if it's recognized.


----------



## balanga (Jan 8, 2020)

If I `dd if=/dev/da0 of=/dev/ada0p4 bs=2MB` would I get the same result using `file -s /dev/ada0p4`? I'm hoping I can preserve a copy of the data before I have to return it.

(ada0p4 is bigger than da0).


----------



## SirDice (Jan 8, 2020)

balanga said:


> If I  dd if=/dev/da0 of=/dev/ada0p4 bs=2MB  would I get the same result using  file -s /dev/ada0p4?


It should, yes, dd(1) makes a bit-for-bit copy of the original data. You can also create a file image that way, `dd if=/dev/da0 of=/tmp/mybackup.img bs=2MB`. That image file can be loaded using mdconfig(8); `mdconfig -a -f /tmp/mybackup.img`. Which will give you an md(4) device to work with.


----------



## tingo (Jan 9, 2020)

Also, if file doesn't give any insight, sysutils/disktype might do better.


----------



## balanga (Jan 9, 2020)

```
file -s /dev/da1
/dev/da1: Linux rev 1.0 ext4 filesystem data, UUID=6dc18958-66f1-479d-98b5-eb9b35b6d7a5, volume name "TOSHIBA MQ01ABD0/mnt/hdd/sda" (needs journal recovery) (extents) (large files) (huge files)
```


```
disktype /dev/da1

--- /dev/da1
Character device, size 465.8 GiB (500107862016 bytes)
Ext3 file system
  Volume name "TOSHIBA MQ01ABD0"
  UUID 6DC18958-66F1-479D-98B5-EB9B35B6D7A5 (DCE, v4)
  Last mounted at "/mnt/hdd/sda"
  Volume size 465.8 GiB (500107862016 bytes, 122096646 blocks of 4 KiB)
```
 
So although FreeBSD supports Ext3/4, there are no mountable partitions, so I can't access the data.... Would I be able access the data if I booted up Linux?


----------



## SirDice (Jan 9, 2020)

balanga said:


> So although FreeBSD supports Ext3/4, there are no mountable partitions


Mount the disk, it's what we would call a "dangerously dedicated" disk. The filesystem is created directly on the disk, without a partition table.


----------



## T-Daemon (Jan 9, 2020)

balanga said:


> ... Would I be able access the data if I booted up Linux?


Yes. It does mount/automount from Linux without problems.


----------



## balanga (Jan 9, 2020)

SirDice said:


> Mount the disk, it's what we would call a "dangerously dedicated" disk. The filesystem is created directly on the disk, without a partition table.



This worked! 

`lklfuse -o type=ext4 /dev/da1 /mnt/tmp`

Many thanks.

Unfortunately I can't work out how to view the files. They seem to be in some sort of proprietary format. At least I can copy them and figure out how to access them later.


----------



## Sevendogsbsd (Jan 9, 2020)

Maybe create an image as SirDice suggested, that way you can mess around with the image at your leisure?


----------



## balanga (Jan 9, 2020)

Sevendogsbsd said:


> Maybe create an image as SirDice suggested, that way you can mess around with the image at your leisure?



With sysutils/fusefs-lkl I can copy the files to another disk so I can mess with them as much as I like.


----------



## Sevendogsbsd (Jan 9, 2020)

That works too - just like forensics , sort of


----------

