Steve's Digicams Forums

Steve's Digicams Forums (https://forums.steves-digicams.com/)
-   Memory Cards, Microdrives, Card Readers (https://forums.steves-digicams.com/memory-cards-microdrives-card-readers-51/)
-   -   Unable to read Sandisk 8GB SDHC Card (https://forums.steves-digicams.com/memory-cards-microdrives-card-readers-51/unable-read-sandisk-8gb-sdhc-card-164343/)

hardeepthind Jan 7, 2010 12:10 PM

Unable to read Sandisk 8GB SDHC Card
 
Hi,

I have a canon SD790is camera with an 8GB sandisk card. I was recently on holiday, shooting up a storm. Took the SD card out of camera (all was working ok) and put it into the SD/MMC card slot of my sons portable DVD player to show the kids a slide show. After a few seconds, the DVD player gave me a "Bad Card" message on screen. When I put the card back in the canon camera, I got a "Card error" message on screen. SD card would not work on my other canon digicam either. Looks like the portable DVD player did something to the card....

Installed photorec on PC, but it doesn't see the card in the PC's built in reader (neither does windows).

I had seen some previous posts where JimC had helped people with a similar issue.... HELP, cause my wifey is about to do me bodily harm :(

Hardeep

JimC Jan 7, 2010 12:25 PM

Hey Hardeep.

Are you sure the PC's reader will work with a card that size? Many built in readers are only capable of reading 1GB or smaller Secure Digital cards, and some will only work OK with 2GB SD cards. IOW, if you don't have a card reader that specifically supports SDHC cards, your Sandisk card is not going to work in it.

Is it a relatively new PC? Have you used that same card in it before?

JimC Jan 7, 2010 12:31 PM

P.S.

I moved your post to a thread by itself, so we're not continuing someone elses thread. Let me know if your built in reader has worked with that card in the past as a first step. Then, we'll go from there.

hardeepthind Jan 7, 2010 12:42 PM

Hi Jim,

Thanks for such a quick response! The PC in question is about 2 years old and I have used the card in it previously. That said, the card reader has been giving me issues recently (and I have been uploading pix by connecting PC to camera via USB cable). I will look into getting a new card reader and trying it out. If that also fails, what is my next step?

JimC Jan 7, 2010 12:55 PM

If a different reader won't see the card, I can talk you through downloading a .iso file for a Linux CD with some additional tools on it that may be able to see the card. Basically, you can burn the .iso file to CD and boot into it (the operating system can run from CD).

There's no guarantee that would work. But, I've had good luck with failing cards that Windows utilities could not see in the past using that technique. Basically, I'd copy the card using a utility designed for failing drives known as ddrescue (which creates an image file of the card, without regards to the file system on it, etc.). Then run photorec against the image file (so that it doesn't need to worry about hard read errors if the card has a component issue).

If you scroll down to the bottom of this page, you'll see posts from me about how that works:

http://forums.steves-digicams.com/me...tml#post882107

It sounds harder than it is. LOL

Are you in the U.S.? If so, if a different reader doesn't handle it using photorec under Windows, send me a PM with contact info and I can talk you through it. Otherwise, we can try to do it online (I can let you know what commands to run, you can copy and paste what you see, and I can let you know what to do next).

But, hopefully, it's a simple problem (only file system corruption) and using a different reader will allow you to use something like photorec without the need to do anything else.

hardeepthind Jan 8, 2010 8:47 PM

Hi Jim,

Tried a new card reader- no dice. Seems like we have to go the alt/difficult route. Shoot me an email as to when you have time to go thru- I had sent you my email address via PM earlier.

Thanks,
Hardeep

JimC Jan 8, 2010 9:17 PM

No problem. I'll try to talk you through it.

What I'd do first is download the 32 bit version of SimplyMEPIS 8.0.12 from the link in this press release:

http://distrowatch.com/?newsid=05756

Here's the direct link (same one as the press release shows):

http://mirror.cs.vt.edu/pub/MEPIS/Si....12-rel_32.iso

Here's an alternative download link from Georgia Tech if that one is too slow from your location:

ftp://ftp-linux.cc.gatech.edu/pub/li....12-rel_32.iso

The latest 8.5 Beta 4 also has the utilities i want to try on it. But, it's still a bit rough around the edges and it would probably be best to stick with the stable 8.0.12 release for now (the stable release is at the download links I posted above):

After you download the .iso file, you'll need to burn it to CD using a tool that knows how to burn a .iso image to CD. Many products do (Roxio, etc.).

If you don't have a tool that knows how to burn the .iso to CD, you can download a free product to do that for you. One free tool is DeepBurner Free. It's the second download link on this page:

http://www.deepburner.com/?r=download

When you install Deepburner in Windows and load it, you'll see a "Burn .iso" choice in the popup menu. Browse for the mepis .iso you downloaded and burn it to CD.

What we'll do is boot into it, then log into the distro using username demo, password demo; open a terminal program and issue some commands to figure out how the card is showing up, then mount your Windows partition to have a place to store an image file of the card, and use a tool called ddrescue from command line to make a copy of the card (writing a sector by sector copy to an image file that's a copy of that card). Then, we'll run photorec against that image file to recover any photos in it.

So, I'd go ahead an download the .iso file and burn it to CD for now. It's quite large (around 700MB). But, it's a full featured linux distribution and is more likely to support all of your hardware OK. Then, we can schedule a time for me to call you and talk you through the rest. I'll send you an e-mail now.

JimC Jan 8, 2010 9:43 PM

E-mail sent.

BTW, as an alternative to doing it over the phone, we could simply use the forums to do it (I could let you know what commands to issue, and you could just copy and paste them into a terminal window, then copy and past the results of the commands back into a post here). As long as your hardware is detected OK, you'd be able to use Firefox while we do it (you'll see it in the menus). Or, we could do both at once. That way, it could help others figure out how to handle a similar issue if we can see the card with Linux.

didalee Feb 20, 2010 12:07 AM

Am having same problem and am interested in a walk through of process. Now downloading MEPIS. . . .

didalee Feb 20, 2010 12:29 PM

OK- burning iso file to disk now and just grabbed ddrescue. Could really use a walk through!

My email address is [email protected]

JimC Feb 20, 2010 12:47 PM

ddrescue is already on the Mepis CD.

Reboot your PC making sure the CD is the boot choice (either change the boot order in your BIOS or press the function key for selecting your boot drive if your PC offers that option).

When you get to the Mepis Boot menu, press F3 and select your Monitor resolution (it will probably auto detect it without doing that, but you can make sure it selects the correct resolution if you press F3 at the Mepis boot menu choices). Then, just press enter, leaving at the default (top) menu choice to load Mepis.

After it loads, it will prompt you for a username and password. demo is the username and demo is the password when running from a live CD.

After the desktop loads, click on the icon that looks like a Home in your system tray (I think it's probably the third one over from the left). Then, click on the yellow star you'll find on the left side for services and you'll see a Storage Media choice that can show you drives it sees (like "My Computer" would look under Windows after you click on it). Or, depending on the version you downloaded, you may see a "My Computer" choice on your desktop and you can get to your drives that way, too.

Then, click on the Windows partition on your C drive under Storage Media (it will probably show up as sda1) and make sure you can browse folders and files on it OK (that's where we'll want to store a copy of your bad card). Do not click on your card if it shows up.

Then, open a Terminal Program. You'll find one in the menus (click on the icon in the bottom left of your tray in the same place you'd find the Start icon in Windows), and you should see a menu choice under System somewhere for Terminal Program-Konsole.

That will open what looks like a DOS command prompt. Then, maximize it and type this, letting me know what you see (copy and paste the results into a forum post here). You'll find a menu choice for Firefox under Internet Programs. Insert your card in the reader so we can see how it's detected before typing these commands (or, just insert it before booting into the CD if desired). Use root as the root password when prompted for one (running from a CD, root will be the root password). Note that all commands will be case sensitive (use lower case as shown below):

su
mount
fdisk -l

JimC Feb 20, 2010 12:59 PM

P.S.

Note that when I ask you to click on anything, just use a "single click", not a "double click" like you'd use with windows (otherwise, you'll end up opening something twice or loading a program more than once).

didalee Feb 21, 2010 1:52 AM

Great- i had done all you mention but the command lines already- will start fresh in morning.

didalee Feb 21, 2010 2:10 PM

here's what I got (was unable to connect to my wireless internet vis MEPIS distro- Wireless tab functions remain grayed out, b/c I was logged in as demo?)

=================================
[email protected]:~$ su
Password:
mepis1:/home/demo# mount
tmpfs on /linux/lib/init/rw type tmpfs (rw,nosuid,mode=0755)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
procbususb on /proc/bus/usb type usbfs (rw)
udev on /dev type tmpfs (rw,mode=0755)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=620)
rootfs on / type rootfs (rw)
/dev/sr0 on /cdrom type iso9660 (ro)
/dev/loop0 on /linux type squashfs (ro)
/ramdisk on /ramdisk type tmpfs (rw,size=2282352k,nr_inodes=222170,mode=755)
/ramdisk on /home type tmpfs (rw,size=2282352k,nr_inodes=222170,mode=755)
shmfs on /linux/lib/init/rw/splashy type tmpfs (rw)
fusectl on /sys/fs/fuse/connections type fusectl (rw)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
/dev/sda2 on /mnt/sda2 type fuseblk (rw,noexec,nosuid,nodev,allow_other,default_permis sions,blksize=4096,user=demo)
/dev/sda1 on /mnt/sda1 type fuseblk (rw,noexec,nosuid,nodev,allow_other,default_permis sions,blksize=4096,user=demo)
mepis1:/home/demo#




mepis1:/home/demo# fdisk -l


Disk /dev/sda: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x220ed127


Device Boot Start End Blocks Id System
/dev/sda1 1 192 1536000 27 Unknown
Partition 1 does not end on cylinder boundary.
/dev/sda2 * 192 29632 236476416 7 HPFS/NTFS
/dev/sda3 29632 30402 6184960 17 Hidden HPFS/NTFS


Disk /dev/sdb: 100.2 GB, 100256292864 bytes
255 heads, 63 sectors/track, 12188 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000


Disk /dev/sdb doesn't contain a valid partition table


Disk /dev/sdc: 3965 MB, 3965190144 bytes
49 heads, 48 sectors/track, 3292 cylinders
Units = cylinders of 2352 * 512 = 1204224 bytes
Disk identifier: 0x00000000


Device Boot Start End Blocks Id System
/dev/sdc1 4 3293 3868160 b W95 FAT32
mepis1:/home/demo#
mepis1:/home/demo#

JimC Feb 21, 2010 2:52 PM

OK.

/dev/sda2 is your Windows partition from the looks of it (make sure you click on it again under Storage manager if you've exited the system before issuing any commands, since that will automatically mount it read/write under /mnt/sda2). It appears you've got a 4GB card showing up as /dev/sdc

Do this from a command prompt (using the terminal program Konsole). Enter root as the password when prompted. This is basically changing directories to root of your windows partition, then making a copy of the card using ddrescue and saving it to a file called badcard.img in the root of your windows partition. It's an exact copy of the card. Then, you're running photorec against that disk image file. Just use the defaults for it when prompted and it will create a new folder in the root of your windows partition and place recovered images in it.

su
cd /mnt/sda2
ddrescue /dev/sdc /mnt/sda2/badcard.img /mnt/sda2/badcard.log
photorec /mnt/sda2/badcard.img

didalee Feb 21, 2010 2:57 PM

Thanks--Is photerec also part of MEPIS distro?

JimC Feb 21, 2010 2:59 PM

P.S.

You could also do it like this (since you'll be in the same folder the file is being created in when you use the commands). IOW, you don't have to include a full path to the files themselves, as it will look for them in your current directory after you change to it using the first command. Note that ddrescue will make multiple passes if needed using those defaults to try and get a good copy. The log file just lets you start and stop it again if desired if you're getting too many errors and need to restart it again later (just using the same exact commands).

su
cd /mnt/sda2
ddrescue /dev/sdc badcard.img badcard.log
photorec badcard.img

JimC Feb 21, 2010 3:01 PM

photorec is already on the Mepis CD (if you're using a stable versus beta version of Mepis 7.0 or 8.0). The latest stable version is 8.0.15 (but, it's on previous releases of 7.0 and 8.0, too). It's also on Mepis 8.5 Beta 4 and 5. But, I'd avoid those betas for now.

JimC Feb 21, 2010 3:07 PM

Quote:

Originally Posted by JimC (Post 1055209)
su
cd /mnt/sda2
ddrescue /dev/sdc badcard.img badcard.log
photorec badcard.img


Basically, this is just telling it you want to work as root (which gives you access to more commands and permissions):

su

Then, this is changing where you're working from to the root of your windows partition (which should be mounted as /mnt/sda2):

cd /mnt/sda2

Then, this is telling ddrescue to copy /dev/sdc (which is your 4GB card) and save it to an image file called badcard.img, using a log file name of badcard.log (that it uses to keep track of what's been copied OK without errors so far, allowing you to make multiple passes if needed):

ddrescue /dev/sdc badcard.img badcard.log

Then, after you get a good copy of the card (saved to a file named badcard.img in the root of your windows partition), you can use photorec to read through it and find any image files like this (and just use it's defaults and it will create a new folder for them on your windows drive and save them in it, since you're already working in /mnt/sda2 since you changed to it before you started issuing the commands).

photorec badcard.img

JimC Feb 21, 2010 3:11 PM

P.S.

As for your wireless, what do you get from a terminal if you type this (and you can have more than one terminal window open at a time)?

su
iwconfig

didalee Feb 21, 2010 3:20 PM

Thanks again for the help- My unix is a bit rusty, but it's makiing sense! I'll get back to you WRT to my progress and the wireless issue. Doing some other work now under Windows

didalee Feb 21, 2010 3:22 PM

I'm using 8.0.15

JimC Feb 21, 2010 3:24 PM

Let me know what you see when you run the ddrescue command (copy and paste the results if you have a network connection). You may want to wait until we get a relatively error free copy of the card before you run photorec against the image file we're creating, too (in case we need to do something different to get a better copy).

But, it's showing up as a device, which is a very good sign (the card is not dead yet). ;-) I'm assuming that's the only thing you'd have plugged in that would show up that way (/dev/sdc appears to be a 4GB card).

JimC Feb 21, 2010 3:30 PM

Quote:

Originally Posted by didalee (Post 1055226)
I'm using 8.0.15

That's fine. That's the latest stable release of Mepis 8.0 (updated with the latest patches not long ago).

Warren (the developer) is working very hard on a new version (SimplyMEPIS 8.5) which will be using a KDE 4.4 based desktop with some newer applications on it. But, it's not ready for "prime time" yet (it's at Beta 5 right now).

didalee Feb 21, 2010 4:15 PM

I clicked the windows partition, which opened it. Issued the commands, which did not work- kept getting a "no such file or directory message." I'll cut and paste the commands. Maybe I inserted a space where there should be none.

But before that, wanted to make sure the Windows partition s/b open when I'm in the Konsole

didalee Feb 21, 2010 4:16 PM

yes, dev/sdc is definitely the card

JimC Feb 21, 2010 4:31 PM

Make sure you followed all of the commands (entering root for the root password when prompted, pressing the enter key after each line).

su
cd /mnt/sda2

Here's where the spaces for that last command would be:
cdSPACE/mnt/sda2

At that point, your prompt should also show you're in /mnt/sda2

Then, issue the command for ddrescue:

ddrescue /dev/sdc badcard.img badcard.log

Here's where the spaces for that last command would be:

ddrescueSPACE/dev/sdcSPACEbadcard.imgSPACEbadcard.log

JimC Feb 21, 2010 4:35 PM

If you've got a network connection, it's probably easier just to copy and paste each command versus trying to retype them

su
cd /mnt/sda2
ddrescue /dev/sdc badcard.img badcard.log

But, if that's giving you an error, just paste what you're getting into a forum post.

didalee Feb 21, 2010 4:37 PM

HI- yes, I'm pressing enter and spacing correctly. I'll try again, maybe the card is'nt seated right. . .What about the open Windows partition window?

didalee Feb 21, 2010 4:39 PM

after ddrescue command, get this:
cannot open input file: No such file or directory

JimC Feb 21, 2010 4:44 PM

What are you getting when you type this now (are you still seeing /dev/sdc in the list)?

fdisk -l

JimC Feb 21, 2010 4:47 PM

If not, remove it, wait about 10 seconds, reinsert it, and repeat this command and see if it's showing up:

su
fdisk -l

If so, then, do this:

su
cd /mnt/sda2
ddrescue /dev/sdc badcard.img badcard.log

JimC Feb 21, 2010 4:49 PM

Copy and paste what you're getting if you have a network connection so I can make sure nothing else is going wrong.

JimC Feb 21, 2010 5:17 PM

Quote:

Originally Posted by didalee (Post 1055263)
HI- yes, I'm pressing enter and spacing correctly. I'll try again, maybe the card is'nt seated right. . .What about the open Windows partition window?

You can leave it open. That's no problem. The input file error you're getting indicates it's not seeing the card (/dev/sdc), or there is a typo in the command (and remember, commands are case sensitive). Remove it, reinsert, and see if it shows up:

su
fdisk -l

If so, then, see if you can copy it (note there is a space between /dev/sdc and the two filename parameters in the command). Make sure your prompt is changing with the cd command, too.

su
cd /mnt/sda2
ddrescue /dev/sdc badcard.img badcard.log

Again, if you can copy and paste everything you're getting, that would help to determine what else may be going wrong. But, the input file error indicates it's not seeing the card or there is a typo somewhere (wrong case, etc.), and if it's failing, sometimes you will need to remove and reinsert a card to get it where it shows up again, which fdisk -l will tell you.

didalee Feb 21, 2010 5:23 PM

OK-ran the commands in what looked like a successful manner (apparently, the card was NOT seated properly during prior attempts) I saw how hundreds of image files were restored to recup_dir directory. However, I can't find that folder now that I'm back in Windows. Am I only able to view it from Linux?

Also, is the moral of this tale that SanDisk cards are bad news? Or just SDHC cards?

Thanks again- I'll be off line now for a few hours, but look forward to your reply ;)

JimC Feb 21, 2010 5:32 PM

It should be visible from Windows. You should find the folder created in your root directory (go to your C drive and you should see it), as long as you were in the correct folder (your prompt showed up as being in /mnt/sda2 when you ran those commands). You can also move them to somewhere else if desired using Linux if you have trouble finding them (just copy and paste that folder to somewhere you can easily find it using the same file manager you were viewing your Windows drive with under Storage Media).

JimC Feb 21, 2010 5:36 PM

Did you see any errors using ddrescue? If you could copy and paste what you saw, that would tell me if the card is bad or not.

IOW, it may have been a corruption issue versus a bad card if you weren't seeing any errors when using ddrescue (and always formatting the card prior to every reuse using the camera's menu choice for format can reduce the possibility of file system corruption). But, without seeing the output from ddrescue, I don't know what you were getting using it or if the card is even bad or not. It could just be a contact problem, too (not making a good enough connection).

didalee Feb 21, 2010 5:37 PM

ah yes! Found it! Awesome! So, back to my question re: San Disk and SDHC. .

JimC Feb 21, 2010 5:46 PM

Again, did you see any errors when using ddrescue?

It may not even be bad if you didn't see any read errors while it was running. It may be a corruption issue (often caused when users remove a card after deleting images from a PC without using the "Safely Remove" or "Eject" features, and if you don't use those features, you can leave unflushed writes being cached in memory causing corruption). That's why it's a good idea to always reformat a card prior to every reuse using a camera's menu choice for format (so that you always start out with a fresh file allocation table, just the way the camera expects it, since it's performing the format).

As for Sandisk, they make more cards than anyone else. So, yes, you probably do see more issues reported with them. But, you see failures from other brands, too. But, your card may not even be bad.

JimC Feb 21, 2010 5:51 PM

If you didn't see any errors when ddrescue was running, then the card is probably OK.

I'd format it using this utility (you'll see a download link at the bottom of the page). But, make sure you can open your images first (full size images, not just the thumbnails, since the thumbnails are a separate image embedded inside of the main jpeg image).

http://panasonic.jp/support/global/c...formatter.html

Then, make sure to reformat it using your camera's menu choice for format prior to *every* reuse. That's usually just as fast or faster than deleting images on one anyway, and always insures you start out with a fresh File Allocation Table (to reduce the chance of unnoticed corruption that could cause issues later).

If you did see errors when ddrescue was running, I wouldn't use it again.


All times are GMT -5. The time now is 7:34 AM.