Nugroho's blog.: Recover The SD Memory Card Data

Friday, March 15, 2019

Recover The SD Memory Card Data

My SD Card is toasted.

It happened when I recorded my music video cover, a song called "Kolam Susu" by Koes Plus, but I used Musikimia arrangement.

I used to record my music performance on Logic Pro and the video on my Canon EOS M6.

I'm a multi-instrumentalist, I played music instruments all by myself.  So my workflow is like:
  1. Record the drum.
  2. Record the bass.
  3. The rhythm guitar.
  4. Guitar Solo.
  5. Bass Solo, I improvised this part. 
  6. Vocal.
In the middle of taking vocal part, suddenly the camera LCD went dark. I continue my vocal take because I always could lip-sync it later.

After my vocal take is finished, I grab the camera and, it shutdown by itself, uh oh...

I turned it on but it displayed a warning, something like "memory error", oh my...

I thought about my drum video record. It's always hard to "lip-sync" drum part; I have to rescue the SD Card data. And the journey's began...

My first step is remove the memory card from EOS M6 and read it at my Macbook Air. It read, but as soon as I copied the files, it vanished in the middle of copying-process. I reinsert the card to the computer. It has strange behavior. The DCIM folder, where the video is stored is there, but it's empty, no content at all.

Is the video's data gone? No, for sure, because the memory card is still have 28GB Free, according the info. It means the data is still there (about 34GB) but I had to find the way to obtain/rescue it.

Tried to copy it via terminal command to no avail. And the Sandisk SD Card had a very long eject time, which is very unusual.

Because my Mac failed to do, I used my second machine. An Ubuntu Desktop. It behave same as my Macbook Air, even worst. The Linux only displayed the files in DCIM (yes!) but cannot be copied! No. It's have warning about permission.

Usually I could resolve that by using sudo or switch to root. But not this time, it still had a permission warning. And the worst, the data's started to vanish again. But the content is still there because the df -h command is still showed 34GB used data (it's slightly smaller than the Mac, because of difference in base number 1000 vs 1024 or 2 vs 10 or binary vs decimal, :) )

Okay, the easy way is failed. So I started to use the ancient way. The dd command. I used it a lot during my "Linux time" to remaster a Linux distribution to my flavor, burning image to CD ROM, etc.

This particular command also could be used to copy the device in the block basis instead of filename.

So I tried this command.

$ ddrescue -d -r3 /dev/sdg test.img test.logfile

It worked. But slowly. It copied about 2.6MB/hour. I had 34GB data. No. There must be another way.

When browsing at the internet about this, I learned that the ddrescue had two version. The classic and GNU version. The GNU version is faster.

So I hunt the GNU ddrescue at my Macbook Air. I managed to installed it via brew, and a GUI standalone program.

I run the terminal version first, using above command, with the different device name of course (Linux using /dev/sdg while MacOS, being FreeBSD descendant, using something like /dev/disk2s1 ). But it's still slow.

As final effort, I tried the GUI version, with no expectation. Surprisingly, it worked very fast. And the video recording data is rescued, :D


No comments:

323f (5) amp (1) android (12) apple (7) arduino (18) art (1) assembler (21) astina (4) ATTiny (23) blackberry (4) camera (3) canon (2) cerita (2) computer (106) crazyness (11) debian (1) delphi (39) diary (286) flash (8) fortran (6) freebsd (6) google apps script (8) guitar (2) HTML5 (10) IFTTT (7) Instagram (7) internet (12) iOS (5) iPad (6) iPhone (5) java (1) javascript (1) keynote (2) LaTeX (6) lazarus (1) linux (29) lion (15) mac (28) macbook air (8) macbook pro (3) macOS (1) Math (3) mathematica (1) maverick (6) mazda (4) microcontroler (35) mountain lion (2) music (37) netbook (1) nugnux (6) os x (36) php (1) Physicist (29) Picture (3) programming (189) Python (109) S2 (13) software (7) Soliloquy (125) Ubuntu (5) unix (4) Video (8) wayang (3) yosemite (3)