[Galaxy S I9000 General] khaledmh:
I thought I should share this with everyone in case it helps someone out there. I might have gotten lucky, so YMMV.

Basically like everyone else my SGS (I9000M from Bell) died due to an internal SD error, but in my case I haven't updated the phone since I got it in September 2010 (it had the JG9 firmware). The good thing is I was able to flash it to the stock Froyo 2.2, and I'm currently using it as normal and can access the internal SD without problems.

Summary of steps that most likely fixed the problem:

Go into recovery mode and "wipe data/factory reset". If your phone boots (but still have problems accessing the SD card) then it's a good indication that you maybe able to fix it.

Flash JL2 (from samfirmware.com) using ODIN. Not sure if this is needed, but you may need to ask ODIN to Re-partition. You still get an error "Can't mount DBDATA", and the phone won't boot. That's ok.

Flash the SpeedMod Kernel using ODIN (I used SpeedMod K12J with HZ=256). Your phone should boot into JL2 and the SD card should be accessible again.

At this point your internal SD card is fixed and you should be able to flash whatever you want. Just note that Kies will sometimes not work properly with the SpeedMod installed. In my case I flashed 2.1 (JH2) again (this won't work if you have 2.2 without speedmod kernel), then used Kies to update to 2.2 (JL2).

For those who are interested in the details, please read on.

Bought the phone in September, it's a Samsung Galaxy S I9000M from Bell. It says 10.07 on the back of the phone, and it had the JG9 firmware on it.

Since the 2.2 update came out I've been following closely the problem of the internal SD failures and the grief it's causing to a lot of people. So I decided to hold off updating until Samsung gets their act together. (I know it's better to update as soon as possible in case it dies so that I can use the warranty, but I had 9 months remaining so I decided to wait a little more.)

Close to the end of 2010 I noticed that my Android Market has changed, and that it now allows me to "Update All", so I just hit that and noticed that after updating several apps, all the remaining updates failed. I knew this wasn't a good sign. My SD card was still fine though.

After the above incident the phone felt a bit sluggish and less responsive than it used to be. I hadn't correlated this to anything yet, but now I know it was most probably due to the internal SD on its way to die.

On January 7 the phone suddenly died. When I rebooted it, I got the infamous symptom of seeing the S logo animation then black screen, then if I touch the two buttons at the bottom they light up indefinitely. At that point I knew it was the internal SD card.

I put the phone into recovery mode and confirmed my guess when I saw the red error message "Can't mount SDCARD".

I took the phone to the Bell store, the guy told me Bell now has an expedited shipping process for this problem and gave me a number to call to get a new replacement phone.

I called the number and they verified the symptoms with me, and said they're going to send me a new phone. I asked for the $100 credit but I was told I can't get it since I didn't update to 2.2. Apparently they only give you the credit if you actually tried to update and the update caused the phone to die (which doesn't make any sense to me).

So, while waiting for the new phone to arrive, I decided to try a few things. Here's what I did:

First thing I did was going into recovery mode and doing a "wipe data/factory reset". To my surprise, the phone actually booted after I did that, but I got force closes on almost all apps, and when I checked the internal SD card it wasn't mounted at all. The phone response was extremely slow and barely usable. I was able to make phone calls though.

I wondered if the SD problem is a corrupt partition rather than a physical error. After searching for a while I found someone posted a solution to fix a problem with his internal SD card by using the "parted" tool to mkfs the partition. Unfortunately I couldn't copy the tool using adb; my phone wasn't rooted and I couldn't access the SD card, so there was no place to copy the binary to. I get either a read-only error when trying to copy to the root, or a permission denied error when trying to copy to other mounted partitions.

Then I figured if I could flash 2.2 somehow (even if it doesn't work) I can try to ask Bell for the $100 credit :) Kies was useless as it couldn't recognize the phone, so I grabbed the stock JL2 firmware from samfirmware.com and used ODIN 1.7 to flash it. I asked it to Re-partition (not sure if this was needed). After reboot I saw another red error message, but this time it was complaining "Can't mount DBDATA" (as opposed to SDCARD). Then all reboots after that resulted in the same problem (S logo then black screen).

I searched for the "Can't mount DBDATA" error and found a post on xda that shows a method that should fix this by first using a 512 PIT file to repartition (no ROM involved), then flashing a stock firmware. I did that but it didn't help.

Then I found a site called "AKA skriller" that shows a way to reflash a stock firmware after the phone is bricked. So I followed the instructions by flashing a "nobrick" image (apparently made by someone called eugene), and then flashing a stock firmware. I flashed nobrick then JH2 in attempt to go back to 2.1. After doing this the phone went into a boot loop where it keeps showing the I9000M screen then rebooting. At that point I couldn't go into recovery mode, but I could go into download mode.

After searching again I found out that this was due to a new bootloader in 2.2 that prevents going back to a 2.1 firmware. I wanted to stop the boot loop so I flashed JL2 again, which stopped the boot loop but still the phone won't boot (black screen).

After more searching I found that I could go back to a 2.1 firmware only if I flash a custom kernel, someone suggesting the SpeedMod kernel (not sure if it has to be SpeedMod or any other kernel). So I flashed SpeedMod (I used SpeedMod K12J with HZ=256) using ODIN 1.52. First thing I got is a custom recovery menu with more options, I just skipped it and rebooted. THE PHONE ACTUALLY BOOTED this time into 2.2. Not only that, but the SDCARD problem was FIXED, and the phone was responsive and fast again.

I wanted to load my contacts again using Kies from a backup I made earlier. Kies recognized the phone but for some reason the contacts widget keep saying "please connect your phone" and I couldn't copy back my contacts.

I thought this might be due to the custom kernel and I was right. I flashed a stock 2.1 (JH2) with a bootloader included using ODIN. It just worked. I could copy my contacts again back to the phone.

I was also able to update to 2.2 (JL2) again using Kies this time, and it even kept my contacts. This is what I have now on the phone.

P.S. I can't post external links due to a restriction by the forum (since I'm new).