![]() |
|
FreeBSD General Other questions regarding FreeBSD which do not fit in any of the categories below. |
![]() |
|
Thread Tools | Display Modes |
|
|||
![]()
Hi All
Apologies up front for being a FreeBSD/Linux complete novice.... I'm I.T literate, and have a problem accessing a Samsung_S2 USB drive, that for the majority of time is connected to my Panasonic Tx-P42G20B TV, which I know formats this device when you pair the 2 together. It also does state that you will not be able to read it elsewhere..... therein lies my predicament...and challenge! :-) I can see form the TV's system information/licence details, that it is FreeBSD with the possibility of the disk being UFS2. I have deduced that the USB picks up /dev/da0.. and have tried the following mount commands mount -t UFS /dev/da0 /mnt/colin (n.b dir colin created with chown 777) ERROR - Mount: /dev/da0 : Invalid argument mount -t UFS2 /dev/da0 /mnt/colin ERROR - From a (not mine) similar thread ("mount_msdosfs /dev/da0: : Invalid argument"), I have seen replies requesting information output from certain commands, so ahead of any replies here, please see below to the output of those commands. Whilst this thread gave me some decent background, it didn't help me solve "my" problem" and seemed to stop posting last December, which is why I've started this new thread. Can anyone help in being able to successfully mount the disk and getting at the data, which I believe is on the first partition of the disk (assuming I'm reading the output correctly) ?? Like I say, I'm new to all thgings FreeBSD/Linux, so any detailed help would be very welcome :-) Uname output FreeBSD 8.1-RELEASE #0 Dmesg Ugen4.2: <JMicron> at usbus4 Umass0: <MSC Bulk-Only Transfer> on usbus4 Umass0 : SCSI over Bulk-Only; quirks =0x000 Umass0:0:0:-1: Attached to scbus0 Da0 at umass-sim0 bus 0 scbus0 target 0 lun 0 Da0: <Samsung S2 Portable > Fixed Direct Access SCSI-2 Device Da0: 40.000MB/s transfers Da0: 476940MB (976773168 512 byte sectors: 255H 63X/T 60801C) Fdisk /dev/da0 Parameter extracted from in-core disklabel are: Cylinders=60801 heads=255 sectors/track=63 ( 16065 blks/cyl) Figures below won’t work with BIOS for partitions not in cycl 1 paramters to be used for BIOS calculations are cylineders=60801 heads=255 sctors/track=63 ( 16065 blks/cyls) Media sector size is 512 Warning BIOS sector numbering starts with sector 1 Information from DOS bootblock is: The data for partition 1 is : Sysid 165 (0xa5) , (FreeBSD/NetBSD/386BSD) Start 63, size 976768002 (476937 Meg), flag 80 (active) Beg: cyl 0 / head 1 / sector 1 End: cyl 384 / head 254 / sector 63 The data for partition 2 is <UNUSED> The data for partition 3 is <UNUSED> The data for partition 4 is <UNUSED> Bsdlabel /dev/da0 No valid label found |
|
|||
![]()
Important is the fdisk output. It shows the first partition or slice is FreeBSD. So you have to mount the slice nr1 with something like
Code:
# mount -t ufs -o ro /dev/da0s1 /mnt
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump |
|
|||
![]()
Hi J65nko
Thank you for that, like I say, new to all things BSD/Linux, sadly... I'm a windows man (tho I work with VMware ESX which is a linux derivative) so really need to do more to understand ths OS :-) If I understand your command line, I'm guessing the your mount command -o is specifiying an option... and ro is possibly a read-only option, I'm also guessing a "slice" is a partition... doing a ls -l of all thing da0 in /dev shows da0 & da0s1, which is where im thinking s1 means slice1. # mount -t ufs -o ro /dev/da0s1 /mnt (or /mnt/colin in my case) ERROR - mount: /dev/da0s1 : invalid argument I notice on the other thread I mentioned in my first post, someone mentioned JMicron support (or possible lack of it in FreeBSD), and I can spot the word JMicron comes up when I connect the device... does this have any bearing on the error? ... Is there anything else I could try? Regards Colin |
|
|||
![]()
Hi
I did do a ls -l of /dev/da0* and saw a da0s1, which I'm guessing stands for slice 1 and further guessing this is FreeBSD notation of a partitition. I ran the line suggested... # mount -t ufs -o ro /dev/da0s1 /mnt ERROR - mount: /dev/da0s1 : Invalid Operation I don't know if this has any bearing, but I did notice on the other post about JMicron drivers and have noticed when I connect my usb drive that JMircon is in the system response when it recognises it's connection into the USB port. Anything further to try? Cheers |
|
|||
![]()
If you're trying to determine the filesystem, use dd to copy it somewhere.. a few sectors should be enough to use file(1).
Assuming the manufacture did use UFS, it's possible they made incompatible changes to the on-disk layout to make it difficult to mount.. it's also possible that the contents are encrypted, several tools are at your disposal to scan for known formats. |
|
|||
![]()
<just in case>
The '#' means that you have to run this command as root, it is not part of the command itself </just in case> ![]() . So the command is: Code:
mount -t ufs -o ro /dev/da0s1 /mnt Code:
$ ls -l /dev/da* crw-r----- 1 root operator 0, 128 Feb 25 02:26 /dev/da0 crw-r----- 1 root operator 0, 129 Feb 25 02:26 /dev/da0s1 I count mount a USB stick with a FAT file system as follows: Code:
# fdisk da0 ******* Working on device /dev/da0 ******* parameters extracted from in-core disklabel are: cylinders=487 heads=255 sectors/track=63 (16065 blks/cyl) parameters to be used for BIOS calculations are: cylinders=487 heads=255 sectors/track=63 (16065 blks/cyl) Media sector size is 512 Warning: BIOS sector numbering starts with sector 1 Information from DOS bootblock is: The data for partition 1 is: sysid 12 (0x0c),(DOS or Windows 95 with 32 bit FAT (LBA)) start 1072, size 7830480 (3823 Meg), flag 0 beg: cyl 0/ head 17/ sector 2; end: cyl 121/ head 50/ sector 51 The data for partition 2 is: <UNUSED> The data for partition 3 is: <UNUSED> The data for partition 4 is: <UNUSED> Code:
hercules# mount -t msdosfs -o ro /dev/da0s1 /mnt hercules# ls -l /mnt total 1356 -rwxr-xr-x 1 root wheel 680899 Feb 10 2010 Articles.tgz -rwxr-xr-x 1 root wheel 5699 Feb 9 2010 OBSDsnapshot_tracking-1.05.tgz drwxr-xr-x 1 root wheel 4096 Dec 4 2009 Snapshots -rwxr-xr-x 1 root wheel 3224 Feb 10 2010 snapget
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump |
|
|||
![]()
You could try to use dump(8) to create a backup of the drive. Just make sure you have enough space:
![]() Code:
# dump -0af /home/j65nko/usb-dump /dev/da0s1
I plugged an external USB disk, which has been formatted with OpenBSD UFS. (No problem to mount it in FreeBSD with the command I showed you in my first post) First a check to see how much space in my home directory (in /usr) Code:
df -h Filesystem Size Used Avail Capacity Mounted on /dev/ad6s1a 989M 172M 738M 19% / devfs 1.0K 1.0K 0B 100% /dev /dev/ad6s1e 989M 16K 910M 0% /tmp /dev/ad6s1f 30G 1.1G 27G 4% /usr /dev/ad6s1d 4.8G 11M 4.4G 0% /var The dump itself: Code:
hercules# dump -0af /home/j65nko/usb-dump /dev/da0s1 DUMP: Date of this level 0 dump: Fri Feb 25 03:09:37 2011 DUMP: Date of last level 0 dump: the epoch DUMP: Dumping /dev/da0s1 to /home/j65nko/usb-dump DUMP: mapping (Pass I) [regular files] DUMP: mapping (Pass II) [directories] DUMP: estimated 28017516 tape blocks. DUMP: dumping (Pass III) [directories] DUMP: dumping (Pass IV) [regular files] DUMP: 9.59% done, finished in 0:47 at Fri Feb 25 04:03:06 2011 DUMP: 19.16% done, finished in 0:42 at Fri Feb 25 04:03:09 2011 DUMP: 28.73% done, finished in 0:37 at Fri Feb 25 04:03:10 2011
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump |
|
|||
![]()
That is a very clever idea from J65nko, as it would confirm the filesystem is a supported type.
|
|
|||
![]()
Hi Guys, thank you for your answers.... , much appreciated
Yeah J65nko, I did realise about the "#" not being part of the command ![]() Just to quickly answer your suggestion... mount -t ufs -o ro /dev/da0s1 /mnt ERROR : mount: /dev/da0S1 : Invalid argument Is there an entry for 'da0s1' in "/dev/" ? – Yes, same as per your listing also You also could try to leave out the -t ufs part. As per earlier , ERROR : mount: /dev/da0S1 : Invalid argument dump -0af /colin /dev/da0s1 - comes back with..... DUMP: Date of this level 0 dump: Fri Feb 25 09:18:48 2011 DUMP: Date of last level 0 dump: the epoch DUMP: Dumping /dev/da0s1 to /colin DUMP: Cannot find file system superblock DUMP: The ENTIRE dump is aborted Like I said at the start, I think the file system is supported by FreeBSD, as the TV's licence has BSD written all over it, but it does state that you will not be able to read it on anything else.... I think there is some kind pof protective rights DRM going on, but I don't think the data is encrytped itself, I think it's just been cleverly displaced or offset in someway form how a standard disk can be mounted... but my guess is that, if the TV can read/write to it, then there must be also some clever way of getting to it.... Is there a hex dump utility that might be able to check the dev out sin some way, that it doesn't need to be mounted first... just guessing at my own solution there... welcome to try anything else....? :-) Cheers Colin |
|
|||
![]()
If dump complains about Cannot find file system superblock then something has been modified in the file system on your drive. Maybe it is encrypted.
You could try with dd(1) to copy the disk sector by sector, but then you still have an image that very probably cannot be mounted anyway.
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump |
|
|||
![]()
Unfortunately, there is not much you can do, the primary MBR-type partition indicates FreeBSD but there is no BSD disklabel information so the tools can't find the offsets into any BSD subpartitions.
If there was the BSD disklabel data, you might have been able to obtain the alternate superblock locations for the filesystem (..newfs -N).. but right now nothing is where it should be. As suggested by Carpetsmoker you'll need to dig a bit deeper, perhaps more so then you're willing or capable of.. by analyzing sectors and attempting to discern the on disk layout. Using tools that search for known "filetypes" might be one way of recovering files if it's actually unencrypted, like ..pictures/text/videos. You might have luck with TestDisk/PhotoRec, presumably in the FreeBSD ports tree somewhere. Good luck. |
![]() |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Samsung syncmaster 933sn xorg.conf | trombel | FreeBSD General | 11 | 8th June 2010 11:02 AM |
errors re-mounting external drive | amorphousone | OpenBSD General | 3 | 12th March 2010 05:34 PM |
NetBSD on Samsung 2410.... | nmohture | NetBSD General | 1 | 23rd July 2009 11:08 AM |
Intesting reading on recent X11 changes | vermaden | General software and network | 4 | 14th May 2009 03:39 AM |
Mounting ntfs drive as rw using fusefs-ntfs | caesius | FreeBSD General | 3 | 12th October 2008 11:08 AM |