From ModMyiFone - Wiki
This is how to fix your iPhone after jailbreaking or unlocking, then connecting to iTunes it says it only has 300MB.
Step 1.
Get Installer.app on your iPhone, if your firmware is 1.0.2 or older (Settings>General>About) use Apptapp from: http://iphone.nullriver.com/beta/
If your firmware is 1.1.1 go to jailbreakme.com from your Safari browser.
Step 2.
Install BSD Subsystem on your iPhone
Install vt100 terminal on your iPhone.
Type in:
cd /private/var/root
Then:
mv Media Media_sym
Then:
mv Mediaold Media
Then Reboot the phone, this should fix it.