Unoffical empeg BBS

Quick Links: Empeg FAQ | RioCar.Org | Hijack | BigDisk Builder | jEmplode | emphatic
Repairs: Repairs

Topic Options
#322282 - 16/05/2009 15:20 advice needed: SD card fubar format
DWallach
carpal tunnel

Registered: 30/04/2000
Posts: 3810
Back-story: I needed USB storage so I could "hack" my AppleTV to run Boxee. All I had handy was my USB card reader and the main SD card that I used with my camera. Whatever, it worked fine.

Then I put the card back in the camera (Panasonic LX3), formatted it, and started shooting. My Mac now complains when trying to mount the card, with some variation on this theme: "mount_msdos: Unsupported sector size (34952)".

At this point, I'm assuming that the card has whatever Linux boot format that the AppleTV hack installer used plus whatever "minimal" formatting that the Panasonic camera did, which was probably assuming the card was FAT32 the whole time, which it wasn't in order to be a Linux boot image for the AppleTV.

Despite all of this, the camera happily let me shoot a bunch of pictures that I'd now like to extract. I'm presently running TestDisk to see if it can sort anything out. (The companion tool, PhotoRec, doesn't claim to understand the latest raw file format used by Panasonic/Leica for this camera, so that would seem less likely to succeed. EDIT: the "work in progress" version does claim to support it, so I'm now running that to see how it does.)

Quoth TestDisk, currently grinding away:
Analyse Disk /dev/rdisk1 - 16 GB / 15 GiB - CHS 31978496 1 1
Current partition structure:
Bad GPT partition, invalid signature.

Any advice on how to proceed on this? I'd rather not lose a whole day's shooting with the camera. If TestDisk fails, what's next?


Edited by DWallach (16/05/2009 15:44)

Top
#322285 - 16/05/2009 15:57 Re: advice needed: SD card fubar format [Re: DWallach]
Dignan
carpal tunnel

Registered: 08/03/2000
Posts: 12341
Loc: Sterling, VA
Sorry, I'm a little confused: you took a card with pictures on it, then put the AppleTV hack on it, then took more pictures on it, and now you want to take all the pictures off? Unfortunately, you've already tried PhotoRec and TestDisk, which I would have suggested. I've also heard Recuva is good, if you have access to a Windows box.

I have to say, though: I know you said you used what was handy, but is there a reason you couldn't just wipe the card between uses? There's no reason to keep that AppleTV hack on there. You could have wiped it when you put it in the camera.

Also, which AppleTV hack were you trying. I've tried two, and they both reformat the card/drive and put their own file system on there that becomes unreadable to the OS.
_________________________
Matt

Top
#322286 - 16/05/2009 16:12 Re: advice needed: SD card fubar format [Re: Dignan]
peter
carpal tunnel

Registered: 13/07/2000
Posts: 4180
Loc: Cambridge, England
Does it complain if you mount the whole device (on Linux that would be /dev/sda rather than /dev/sda1 or whatever)? Because perhaps the problem is that there's enough of a partition table data structure there to convince MacOS to look for one, but it's not valid, as the camera formatted the whole device without partitioning it.

If you can't even mount /dev/sda, then the first thing I'd do (being a Linux weenie but not a Mac weenie, but I imagine similar facilities are available) is dd the whole device into a file on a PC, and try and mount that over loopback (on Linux that skips all the partition-checking code). If that doesn't work either, then dd /dev/zero over the first few sectors of the device, format it (in the camera again) as FAT, then create a new file whose first sector comes from the newly-formatted card and all of whose subsequent sectors come from the original dump. That new file should be mountable over loopback unless the filesystem is totally hosed.

Peter

Top
#322288 - 16/05/2009 16:45 Re: advice needed: SD card fubar format [Re: peter]
drakino
carpal tunnel

Registered: 08/06/1999
Posts: 7868
Does the camera have a USB connector? If so, try plugging it directly into the computer. The camera may be able to read the images and get them to the computer. iPhoto should work to try this.

Top
#322289 - 16/05/2009 17:11 Re: advice needed: SD card fubar format [Re: Dignan]
DWallach
carpal tunnel

Registered: 30/04/2000
Posts: 3810
I did format the card after turning it back into a "camera" card, but the problem is that I asked the camera to do the formatting, and it did a half-assed job. (The AppleTV patchstick writes out an HFS+ image, I believe.)

PhotoRec has now been running for 1.5 hours. It estimates it will take it another 17 hours. It's gotten maybe 6% through "phase 1" and has recovered nothing so far. Not promising.

If I give up on PhotoRec, I'm liking the idea of just dd'ing an image of the entire SD card. Or, maybe TestDisk can somehow patch things together again. Hrm.

Top
#322290 - 16/05/2009 17:14 Re: advice needed: SD card fubar format [Re: peter]
DWallach
carpal tunnel

Registered: 30/04/2000
Posts: 3810
The idea of hand-crafting a solution like this (sort of a Frankenstein-image of the card) seems pretty rough to do properly. The idea of connecting a micro-usb cable to the camera (which I don't handy at the moment, while I'm presently in Ascona, Switzerland for a conference) is tempting, but my fear is that the camera just exports the internal card as if the camera were nothing more than the USB card reader, returning us to our previously unsolved problem.

Top
#322291 - 16/05/2009 17:44 Re: advice needed: SD card fubar format [Re: DWallach]
DWallach
carpal tunnel

Registered: 30/04/2000
Posts: 3810
Resolution!

I killed PhotoRec and went back to TestDisk. I let it run for 25% of the card, after which it found nothing. I told it to stop and then just told it to write out a FAT32 partition using the whole damn thing. Some scary error messages ignored, quit the program, pulled and reinserted the card, and voila! Problem solved.

So, it does indeed seem that the camera's "format" isn't very smart about partition tables. Now, the question is what I need to do, on the computer, to make sure the card continues to be "clean" for future shooting sessions.

*sigh*

Top
#322302 - 17/05/2009 08:13 Re: advice needed: SD card fubar format [Re: DWallach]
Shonky
pooh-bah

Registered: 12/01/2002
Posts: 2009
Loc: Brisbane, Australia
Just format it on the PC using FAT32 rather than on the camera and it should be OK.

And before I get jumped on a PC is a personal computer of course.


Edited by Shonky (17/05/2009 08:17)
_________________________
Christian
#40104192 120Gb (no longer in my E36 M3, won't fit the E46 M3)

Top
#322316 - 17/05/2009 18:30 Re: advice needed: SD card fubar format [Re: Shonky]
wfaulk
carpal tunnel

Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
Most cameras expect FAT12 or FAT16, don't they?
_________________________
Bitt Faulk

Top
#322317 - 17/05/2009 18:36 Re: advice needed: SD card fubar format [Re: wfaulk]
peter
carpal tunnel

Registered: 13/07/2000
Posts: 4180
Loc: Cambridge, England
His card is 16GB. You can't format FAT16 over 2GB.

Peter

Top
#322328 - 18/05/2009 04:03 Re: advice needed: SD card fubar format [Re: peter]
Roger
carpal tunnel

Registered: 18/01/2000
Posts: 5683
Loc: London, UK
Originally Posted By: peter
His card is 16GB. You can't format FAT16 over 2GB.


Yeah. It'll be FAT32 (likely) or exFAT (less likely). With the TomTom case, though, I wonder if this'll continue to be the case...
_________________________
-- roger

Top
#322359 - 18/05/2009 16:21 Re: advice needed: SD card fubar format [Re: Shonky]
canuckInOR
carpal tunnel

Registered: 13/02/2002
Posts: 3212
Loc: Portland, OR
Originally Posted By: Shonky
Just format it on the PC using FAT32 rather than on the camera and it should be OK.

Yeah... you just gotta be careful about doing that. Some camera makers (notably Olympus) will disable features if the card wasn't formatted in the camera, and/or isn't their brand of card.

Top
#322361 - 18/05/2009 17:09 Re: advice needed: SD card fubar format [Re: canuckInOR]
tman
carpal tunnel

Registered: 24/12/2001
Posts: 5528
Originally Posted By: canuckInOR
Yeah... you just gotta be careful about doing that. Some camera makers (notably Olympus) will disable features if the card wasn't formatted in the camera, and/or isn't their brand of card.

I think it is only the "special" Olympus branded xD and SmartMedia cards that do the checks? They're exactly the same as a regular xD card but they've got a flag in the header which you can't normally access that tells the camera to enable the extra features.

Top
#322392 - 19/05/2009 15:08 Re: advice needed: SD card fubar format [Re: tman]
canuckInOR
carpal tunnel

Registered: 13/02/2002
Posts: 3212
Loc: Portland, OR
Originally Posted By: tman
Originally Posted By: canuckInOR
Yeah... you just gotta be careful about doing that. Some camera makers (notably Olympus) will disable features if the card wasn't formatted in the camera, and/or isn't their brand of card.

I think it is only the "special" Olympus branded xD and SmartMedia cards that do the checks?

Yeah... I just wasn't sure if anyone other than Olympus did it, so I thought I'd toss the warning out there.

Quote:
They're exactly the same as a regular xD card but they've got a flag in the header which you can't normally access that tells the camera to enable the extra features.

And if anyone knows how to access that header under Linux, so I can flip my bits, I'd appreciate the knowledge. I wouldn't have purchased an Olympus at all, but they're the only camera maker out there with a waterproof/crushproof/shockproof camera suitable for whitewater kayaking.

Top
#322393 - 19/05/2009 15:38 Re: advice needed: SD card fubar format [Re: canuckInOR]
tman
carpal tunnel

Registered: 24/12/2001
Posts: 5528
Originally Posted By: canuckInOR
Quote:
They're exactly the same as a regular xD card but they've got a flag in the header which you can't normally access that tells the camera to enable the extra features.

And if anyone knows how to access that header under Linux, so I can flip my bits, I'd appreciate the knowledge. I wouldn't have purchased an Olympus at all, but they're the only camera maker out there with a waterproof/crushproof/shockproof camera suitable for whitewater kayaking.

You need to find a card reader that can be convinced to give you low level access to the flash itself. The actual secret sauce is very similar to how Olympus marked their SmartMedia cards. The actual utility you want and instructions are here but you need Windows frown Go poke at the Alauda driver for Linux.

Top
#322592 - 26/05/2009 16:14 Re: advice needed: SD card fubar format [Re: tman]
canuckInOR
carpal tunnel

Registered: 13/02/2002
Posts: 3212
Loc: Portland, OR
Thanks for the pointers.

/me adds to his ever growing pile of projects.

Top