John,
I suspect your device falls in the same category as many camera sd 
cards. They expect you to
format the drive with their software, and assume thereafter exactly one 
format, the one they
created.  The format is 'close enough' to allow other devices to read 
it, but maybe not exactly what the device uses.  Since the device 
'knows' the format, it ignores the partition table and just
writes data, assuming it knows what the format is. linux requires the 
partition table to figure
out what to do.
Many photo apps now refuse to delete pictures off cameras because of this.

It looks like the soda episode managed to corrupt the partition table.

If the data is ascii text, and not some magical medical binary format, 
you could do the following
      dd if=/dev/sdd of=copy bs=512 conv=noerror
      strings copy > copy1
Basically from a human point of view there's lots of garbage on the sd 
card, strings will filter out much of it. The text will normally be in 
512 byte blocks scattered in random places on the disk (worse case).  
You can look at the copy1 and perhaps find your data.

e.g. my glucose meter generates data that looks like
P "FRI","07/25/14","08:31:40   ","  104 ", 00 081B
It's pretty easy to scan for data of this format.  Of course you 
potentially have 2Gb of this data
to scan. It was so much easier when a mounted disk amounted to about 1Mb.
If it is nice line oriented data, something like
     strings copy |sort
may recover 90% of the data.  Potentially not recovering data that fell 
across block boundaries.

fsck might be able to repair it, but if it's the partition table thats 
bad, even if you used fsck.vfat
it may not work and if it gets confused there is a slim chance it would 
trash the drive even more..
I used to have some tools to recover data from a floppy (same process 
just smaller) but that was a decade ago at least.

If you medical device can backup the data to another sd card, a quick 
goggle search found

http://www.junauza.com/2010/09/recover-lost-or-deleted-partitions-in.html

I've never used it but it claims to do what you want. This page links to
http://www.cgsecurity.org/wiki/TestDisk
which has a download link.

steve


Denis Heidtmann wrote:
> On Sun, Jul 27, 2014 at 5:29 PM, John Jason Jordan <[email protected]> wrote:
>> I have a 2GB SD card that a medical device writes data to daily. I view
>> the data periodically myself to keep tabs on things. To do so I just
>> insert the card in the card reader slot in my laptop, whereupon it
>> appears grayed out in Xfce's "Places" widget. By right-clicking I can
>> mount it and then view the data. As far as I know it is formatted
>> FAT32.
>>
>> The other day, concomitant with the soda in the keyboard disaster, it
>> no longer appears in the Places widget. However, the medical device
>> still recognizes it and appears to be continuing to write data to it.
>> And dmesg sees it, albeit with an error message:
>>
>> [198579.916202] mmc0: new high speed SD card at address b368
>> [198579.916537] mmcblk0: mmc0:b368 SD02G 1.76 GiB
>> [198579.918556]  mmcblk0: unknown partition table
>>
>> I also tried using an external USB card adapter, but I still can't
>> mount the card. The results in dmesg are different, however:
>>
>> [199653.623925] Read(10): 28 00 00 00 00 00 00 00 08 00
>> [199653.625085] sd 8:0:0:0: [sdd] Unhandled sense code
>> [199653.625087] sd 8:0:0:0: [sdd]
>> [199653.625087] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
>> [199653.625088] sd 8:0:0:0: [sdd]
>> [199653.625089] Sense Key : Medium Error [current]
>> [199653.625090] sd 8:0:0:0: [sdd]
>> [199653.625091] Add. Sense: Unrecovered read error
>> [199653.625092] sd 8:0:0:0: [sdd] CDB:
>> [199653.625093] Read(10): 28 00 00 00 00 00 00 00 08 00
>>
>> >From past experience, if I reformat it the medical device will throw a
>> fit, but then offer to reformat it. I suspect that it reformats it and
>> also writes some key files that the device needs in order to recognize
>> it. I have not yet reformatted it because if I do I will lose several
>> days worth of data - the medical device stores no data internally.
>>
>> I am curious why the medical device can seemingly write to the card,
>> but Xubuntu 13.10 cannot even mount it, and what might have gone wrong
>> to cause the problem. Perhaps the results from dmesg will mean
>> something to someone here.
> How does the medical device respond to a full card?
>
> -Denis
> _______________________________________________
> PLUG mailing list
> [email protected]
> http://lists.pdxlinux.org/mailman/listinfo/plug
>

_______________________________________________
PLUG mailing list
[email protected]
http://lists.pdxlinux.org/mailman/listinfo/plug

Reply via email to