SD card, ddrescue

Using PhotoRec to recover lost data
Forum rules
When asking for technical support:
- Search for posts on the same topic before posting a new question.
- Give clear, specific information in the title of your post.
- Include as many details as you can, MOST POSTS WILL GET ONLY ONE OR TWO ANSWERS.
- Post a follow up with a "Thank you" or "This worked!"
- When you learn something, use that knowledge to HELP ANOTHER USER LATER.
Before posting, please read https://www.cgsecurity.org/testdisk.pdf
Locked
Message
Author
olsson
Posts: 3
Joined: 19 Nov 2018, 21:14

SD card, ddrescue

#1 Post by olsson »

Hi, first post here at the forum. Also a noob with photorec and ddrescue

I have a corrupt/failing SD card that has been used in an android phone for a long time. On that card I have hade som zip files that I'm interested in trying to recover.

First off, before using photorec, im trying to get an image of the card. But I'm having trouble.

Code: Select all

anders@DSM:~$ sudo ddrescue -d -b512 -r1 /dev/sdb SDcard_recovery.img SDcard_recovery.log
[sudo] password for anders:
GNU ddrescue 1.22
Press Ctrl-C to interrupt
Initial status (read from mapfile)
rescued: 3792 MB, tried: 8820 kB, bad-sector: 0 B, bad areas: 0

     ipos:    2487 MB, non-trimmed:   12003 kB,  current rate:       0 B/s
     opos:    2487 MB, non-scraped:        0 B,  average rate:   8230 kB/s
non-tried:   26351 MB,  bad-sector:        0 B,    error rate:   3117 kB/s
  rescued:    5076 MB,   bad areas:        0,        run time:      2m 35s
pct rescued:   16.14%, read errors:       50,  remaining time:         n/a
                              time since last successful read:          0s
Copying non-tried blocks... Pass 5 (forwards)
Unaligned read error. Is sector size correct?
anders@DSM:~$ sudo ddrescue -d -b512 -r1 /dev/sdb SDcard_recovery.img SDcard_recovery.log
GNU ddrescue 1.22
Press Ctrl-C to interrupt
Initial status (read from mapfile)
rescued: 5076 MB, tried: 12003 kB, bad-sector: 0 B, bad areas: 0

     ipos:    3728 MB, non-trimmed:   16132 kB,  current rate:       0 B/s
     opos:    3728 MB, non-scraped:        0 B,  average rate:  10942 kB/s
non-tried:   25110 MB,  bad-sector:        0 B,    error rate:   4063 kB/s
  rescued:    6312 MB,   bad areas:        0,        run time:      1m 52s
pct rescued:   20.07%, read errors:       63,  remaining time:         40m
                              time since last successful read:          0s
Copying non-tried blocks... Pass 5 (forwards)
Unaligned read error. Is sector size correct?
anders@DSM:~$ sudo ddrescue -d -b512 -r1 /dev/sdb SDcard_recovery.img SDcard_recovery.log
GNU ddrescue 1.22
Press Ctrl-C to interrupt
Initial status (read from mapfile)
rescued: 6312 MB, tried: 16132 kB, bad-sector: 0 B, bad areas: 0

     ipos:    3731 MB, non-trimmed:   18819 kB,  current rate:       0 B/s
     opos:    3731 MB, non-scraped:        0 B,  average rate:   16384 B/s
non-tried:   25107 MB,  bad-sector:        0 B,    error rate:   2621 kB/s
  rescued:    6312 MB,   bad areas:        0,        run time:          3s
pct rescued:   20.07%, read errors:       41,  remaining time: 26d 15h  2m
                              time since last successful read:          0s
Copying non-tried blocks... Pass 5 (forwards)
Unaligned read error. Is sector size correct?
anders@DSM:~$
I'ts quits with an error saying Unaligned read error. Is sector size correct?
The sector size of the SD card is 512, I'w checked. Searching regarding the error the only info I can find is the MAN for ddrescue that says
If your system does not support direct disc access, ddrescue will warn you. If the sector size is not correctly set, an unaligned read error will result and ddrescue will exit with status 1.
I can keep starting but with the same error is coming back.

Any idea what I can do? My intention is to use phororec later on to try to recover any zip files I can find.

User avatar
cgrenier
Site Admin
Posts: 5432
Joined: 18 Feb 2012, 15:08
Location: Le Perreux Sur Marne, France
Contact:

Re: SD card, ddrescue

#2 Post by cgrenier »

Have you tried ddrescue without forcing the blocksize or using extra parameters ? Something like "sudo ddrescue /dev/sdb SDcard_recovery_new.img SDcard_recovery_new.log"

olsson
Posts: 3
Joined: 19 Nov 2018, 21:14

Re: SD card, ddrescue

#3 Post by olsson »

Thank you for answering!

Unfortunately the same result.

Code: Select all

anders@DSM:~$ sudo ddrescue /dev/sdb SDcard_recovery.img SDcard_recovery.log
GNU ddrescue 1.22
Press Ctrl-C to interrupt
Initial status (read from mapfile)
rescued: 7473 MB, tried: 45688 kB, bad-sector: 0 B, bad areas: 0

     ipos:    6244 MB, non-trimmed:   87107 kB,  current rate:       0 B/s
     opos:    6244 MB, non-scraped:        0 B,  average rate:    9362 B/s
non-tried:   23878 MB,  bad-sector:        0 B,    error rate:  37879 kB/s
  rescued:    7473 MB,   bad areas:        0,        run time:          6s
pct rescued:   23.77%, read errors:      632,  remaining time: 38d  2h 19m
                              time since last successful read:          3s
Copying non-tried blocks... Pass 5 (forwards)
Unaligned read error. Is sector size correct?
anders@DSM:~$ sudo ddrescue /dev/sdb SDcard_recovery.img SDcard_recovery.log
GNU ddrescue 1.22
Press Ctrl-C to interrupt
Initial status (read from mapfile)
rescued: 7473 MB, tried: 87107 kB, bad-sector: 0 B, bad areas: 0

     ipos:    6785 MB, non-trimmed:   90449 kB,  current rate:       0 B/s
     opos:    6785 MB, non-scraped:        0 B,  average rate:  10530 kB/s
non-tried:   23338 MB,  bad-sector:        0 B,    error rate:   3276 kB/s
  rescued:    8010 MB,   bad areas:        0,        run time:         50s
pct rescued:   25.47%, read errors:       51,  remaining time:         35m
                              time since last successful read:          0s
Copying non-tried blocks... Pass 5 (forwards)
Unaligned read error. Is sector size correct?
anders@DSM:~$ sudo ddrescue /dev/sdb SDcard_recovery.img SDcard_recovery.log
GNU ddrescue 1.22
Press Ctrl-C to interrupt
Initial status (read from mapfile)
rescued: 8010 MB, tried: 90449 kB, bad-sector: 0 B, bad areas: 0

     ipos:    6788 MB, non-trimmed:   93726 kB,  current rate:       0 B/s
     opos:    6788 MB, non-scraped:        0 B,  average rate:       0 B/s
non-tried:   23335 MB,  bad-sector:        0 B,    error rate:   3211 kB/s
  rescued:    8010 MB,   bad areas:        0,        run time:          3s
pct rescued:   25.47%, read errors:       50,  remaining time:         n/a
                              time since last successful read:         n/a
Copying non-tried blocks... Pass 5 (forwards)
Unaligned read error. Is sector size correct?
anders@DSM:~$ sudo ddrescue /dev/sdb SDcard_recovery.img SDcard_recovery.log
GNU ddrescue 1.22
Press Ctrl-C to interrupt
Initial status (read from mapfile)
rescued: 8010 MB, tried: 93726 kB, bad-sector: 0 B, bad areas: 0

     ipos:    6792 MB, non-trimmed:   97265 kB,  current rate:       0 B/s
     opos:    6792 MB, non-scraped:        0 B,  average rate:       0 B/s
non-tried:   23331 MB,  bad-sector:        0 B,    error rate:   3473 kB/s
  rescued:    8010 MB,   bad areas:        0,        run time:          3s
pct rescued:   25.47%, read errors:       54,  remaining time:         n/a
                              time since last successful read:         n/a
Copying non-tried blocks... Pass 5 (forwards)
Unaligned read error. Is sector size correct?
anders@DSM:~$ sudo ddrescue /dev/sdb SDcard_recovery.img SDcard_recovery.log
GNU ddrescue 1.22
Press Ctrl-C to interrupt
Initial status (read from mapfile)
rescued: 8010 MB, tried: 97265 kB, bad-sector: 0 B, bad areas: 0

     ipos:    6797 MB, non-trimmed:  102508 kB,  current rate:       0 B/s
     opos:    6797 MB, non-scraped:        0 B,  average rate:       0 B/s
non-tried:   23326 MB,  bad-sector:        0 B,    error rate:   5177 kB/s
  rescued:    8010 MB,   bad areas:        0,        run time:          3s
pct rescued:   25.47%, read errors:       80,  remaining time:         n/a
                              time since last successful read:         n/a
Copying non-tried blocks... Pass 5 (forwards)
Unaligned read error. Is sector size correct?
anders@DSM:~$
On some tries it goes on for a few seconds, but on others it quit more or less immediately. When it keeps going it makes progress, so if i could force it to restart maybe I could succeed?

If it makes any difference, I'm running of an virtual machine (Ubuntu 16.04) on a Synology NAS (DS918+) with the SD card attached threw a smal USB card reader.

olsson
Posts: 3
Joined: 19 Nov 2018, 21:14

Re: SD card, ddrescue

#4 Post by olsson »

Short correction, it's Ubuntu 18.04 I'm using :)

Locked