UFS2 mount in FreeBSD

LaChris said:
Hi,

No ideas left? Is there no chance to use parts of the distro? How can I run that kernel in a virtual machine? Please don't let me alone with that.

Regards and thanks,

Chris


It has been a while, but I loosely investigated a similar issue to yours. I apologize if my information is not correct in regards to your problem. If I remember correctly, certain Panasonic model televisions have the ability to read and record media to USB2 hard drives. They have the ability to read media from FAT16, FAT32, exFAT, and NTFS formatted partitions from most USB2 drives.

Only certain USB2 hard drives approved by Panasonic can be used if you want to record media to the drive. In that case the drive must be formatted by the television and it indeed uses a UFS2 file system, although with an altered MBR/GPT scheme as mentioned above. It also uses a modified Linux/BSD OS for recording with encryption on any files recorded by the television.

Even if you do get the drive mounted in Linux or FreeBSD, the files recorded by the television would not be usable due to encryption. Once the drive is formatted by the television, recorded media is locked to that particular television only, and any media files added to that drive by any device but that television would not be recognized by that television. I believe there were some Linux developers attempting to crack the encryption used by the televisions, but gave up.

I think your options are pretty much limited to either reformatting the drive with a file system that is recognizable and usable to your devices, or getting a new drive and formatting it with a file system compatible with all your devices/computers for use with your media.

It has been a couple of years so I do not remember where I got this information, but I believe it was from a Linux Forum. I'm sure this is not what you want to hear, but hopefully it helps you to decide what to do next instead of wondering.

Regards
 
Dear all,

It seems I have a similar problem like Chris, and it would be great if anyone could assist how to mount these UFS2 disks formatted on the Panasonic TV on FreeBSD.

Let me explain the background of this question: from time to time the Panasonic TV "loses" the disk, means it is not recognized anymore as the one that was originally registered and formatted. This happened to me more than six times.

Once after it happened, I mounted the brand-new-formatted disk with just 1 recording using Knoppix. It worked perfectly fine on Knoppix with [cmd=]mount -w -t ufs -o ufstype=ufs2 /dev/sdc1 /wd2[/cmd]. After the last crash this did not work as before, but I got the output that the device could only be mounted read-only. So I assume that same thing preventing the disk from mounting rw on Knoppix would prevent the rw mount on the Panasonic TV, making the recordings on it useless.

Then I have tried formatting a new disk, and copying the old recordings over. This would have worked perfectly (the copied files are recognized by the TV!) if the cp or dd command would not have aborted after 2GB. So I stumbled over the same 2GB limit as Chris.

Knowing that UFS2 is the preferred filesystem of BSD I have installed FreeBSD on my PC, kicked out Ubuntu as Ubuntu can handle UFS2 just read-only.

Now when I try to mount this disk using [cmd=]mount -t ufs /dev/da4s1 /mnt/wd2[/cmd] I get the error:
Code:
mount: da4s1: Operation not supported by device
Oh, and I get the same error when I give non-existing device names, e.g. /dev/da4s1dfjkdfjkdf.

When I try [cmd=]gpart show da4s1[/cmd] I get the error:
Code:
gpart: No such geom: da4s1


Your help is really appreciated!


Many thanks & greetings from Germany,
Peter
 
It's about /dev/da0s1.
Peter


Code:
Script started on Sun Mar 17 19:21:38 2013
root@pemu11:/root # ll /dev/ada* /dev/da*

crw-r-----  1 root  operator    0, 104 Mar 17 19:14 /dev/ada0
crw-r-----  1 root  operator    0, 108 Mar 17 19:14 /dev/ada0s1
crw-r-----  1 root  operator    0, 110 Mar 17 19:14 /dev/ada0s2
crw-r-----  1 root  operator    0, 124 Mar 17 20:14 /dev/ada0s2a
crw-r-----  1 root  operator    0, 126 Mar 17 19:14 /dev/ada0s2b
crw-r-----  1 root  operator    0, 106 Mar 17 19:14 /dev/ada1
crw-r-----  1 root  operator    0, 114 Mar 17 19:14 /dev/ada1s1
crw-r-----  1 root  operator    0, 119 Mar 17 19:14 /dev/ada1s2
crw-r-----  1 root  operator    0, 121 Mar 17 19:14 /dev/ada1s3
crw-r-----  1 root  operator    0, 143 Mar 17 20:14 /dev/da0
crw-r-----  1 root  operator    0, 144 Mar 17 20:14 /dev/da0s1
crw-r-----  1 root  operator    0, 149 Mar 17 20:14 /dev/da0s1a
crw-r-----  1 root  operator    0, 145 Mar 17 20:14 /dev/da1
crw-r-----  1 root  operator    0, 146 Mar 17 20:14 /dev/da2
crw-r-----  1 root  operator    0, 147 Mar 17 20:14 /dev/da3
crw-r-----  1 root  operator    0, 148 Mar 17 20:14 /dev/da4
root@pemu11:/root # diskinfo /dev/ada0

/dev/ada0	512	160041885696	312581808	0	0	310101	16	63
root@pemu11:/root # diskinfo /dev/ada1

/dev/ada1	512	320072933376	625142448	0	0	620181	16	63
root@pemu11:/root # diskinfo /dev/da0

/dev/da0	512	1000202043392	1953519616	0	0	121600	255	63
root@pemu11:/root # diskinfo /dev/da1

diskinfo: /dev/da1: Device not configured
[color="Red"]root@pemu11:/root # gpart show /dev/ada0

=>       63  312581745  ada0  MBR  (149G)
         63   81915372     1  ntfs  (39G)
   81915435   41943006     2  freebsd  [active]  (20G)
  123858441  188723367        - free -  (90G)

root@pemu11:/root # gpart show /dev/ada0s2

=>       0  41943006  ada0s2  BSD  (20G)
         0  39845888       1  freebsd-ufs  (19G)
  39845888   2097117       2  freebsd-swap  (1G)
  41943005         1          - free -  (512B)

root@pemu11:/root # gpart show /dev/ada0s1

=>       63  625142385  ada1  MBR  (298G)
         63  102414312     1  ntfs  [active]  (48G)
  102414375  498159585     2  ntfs  (237G)
  600573960   24563385     3  !12  (11G)
  625137345       5103        - free -  (2.5M)

root@pemu11:/root # gpart show /dev/da0

=>        63  1953519553  da0  MBR  (931G)
          63  1953503937    1  freebsd  [active]  (931G)
  1953504000       15616       - free -  (7.6M)

root@pemu11:/root # gpart show /dev/da0s1

=>         0  1953503937  da0s1  BSD  (931G)
           0          16         - free -  (8.0k)
          16  1953503921      1  !0  (931G)

root@pemu11:/root # mount -w -t ufs /dev/da0s1 /wd2

mount: /dev/da0s1: Invalid argument
root@pemu11:/root # mount /dev/da0s1 /wd2

mount: /dev/da0s1: Invalid argument
root@pemu11:/root # diskinfo /dev/da0s1

/dev/da0s1	512	1000194015744	1953503937	0	32256	121599	255	63
[/color]root@pemu11:/root # mount /dev/blabla /wd2

mount: /dev/blabla: No such file or directory
root@pemu11:/root # mount -w -t ufs -o ufstype=ufs2 /dev/da0s1 /wd2

mount: /dev/da0s1: mount option <ufstype> is unknown: Invalid argument
root@pemu11:/root # exit

exit

Script done on Sun Mar 17 19:24:52 2013
 
Code:
root@pemu11:/root # diskinfo /dev/da0
/dev/da0	512	1000202043392	1953519616	0	0	121600	255	63
root@pemu11:/root # gpart show /dev/da0
=>        63  1953519553  da0  MBR  (931G)
          63  1953503937    1  freebsd  [active]  (931G)
  1953504000       15616       - free -  (7.6M)
root@pemu11:/root # gpart show /dev/da0s1
=>         0  1953503937  da0s1  BSD  (931G)
           0          16         - free -  (8.0k)
          16  1953503921      1  !0  (931G)
root@pemu11:/root # mount -w -t ufs /dev/da0s1 /wd2
mount: /dev/da0s1: Invalid argument
root@pemu11:/root # mount /dev/da0s1 /wd2
mount: /dev/da0s1: Invalid argument
 
You tried everything except the one that might work:
# mount /dev/da0s1a /wd2

But that !0 partition type indicates that the vendor is probably doing something nonstandard there.
 
This was work for me ..

# bsdlabel /dev/da0s2

mount -t ufs /dev/da0s2a /mnt/

But i dont know how to unmount it..

umount -t /dev/da0 /mnt/
 
But i dont know how to unmount it..
If you don't know how to use a certain command then read it's manualpage: man umount, this points you to umount(8):

Code:
SYNOPSIS
     umount [-fNnv] special ... | node ... | fsid ...
     umount -a | -A [-F fstab] [-fnv] [-h host] [-t type]

DESCRIPTION
     The umount utility calls the unmount(2) system call to remove a file
     system from the file system tree.  The file system can be specified by
     its special device or remote node (rhost:path), the path to the mount
     point node or by the file system ID fsid as reported by "mount -v" when
     run by root.
 
Back
Top