Can't mount my sdcard rw I really messed up my HTC Desire today. I need to copy some files to the sdcard, but my Android phone won't let me mount the SD card with write access.

Here's what I've done in short:

(boot to recovery, phone rooted)

$ sudo -i
#./adb root
adbd is already running as root
./adb shell
~ # mount -o rw /dev/block/mmcblk0p1 /sdcard/
~ # cd sdcard/
/sdcard # ls
ls: ./internal: I/O error
/sdcard # touch test.txt
touch: test.txt: Read-only file system
/sdcard # 


/sdcard/internal is a folder I created and copied some files to before the sdcard ceased to be writteable. 

From now on I can't do anything, my system is down, It won't boot, and I can't copy a ROM to the SD-Card.
I tried to format /sdcard/ via the recovery, but it would do nothing, contrary to what it logs.

So finally i've formatted it via newfs_msdos (/system/ needs to be mounted, the command is located at /system/bin/newfs_msdos ) :

/system/bin # ./newfs_msdos -F 32 /dev/block/mmcblk0p1
./newfs_msdos: warning, /dev/block/mmcblk0p1 is not a character device
./newfs_msdos: Skipping mount checks
/dev/block/mmcblk0p1: 5992960 sectors in 93640 FAT32 clusters (32768 bytes/cluster)
bps=512 spc=64 res=32 nft=2 mid=0xf0 spt=16 hds=4 hid=0 bsec=5994496 bspf=732 rdcl=2 infs=1 bkbs=2
/system/bin # ./newfs_msdos -F 32 /dev/block/mmcblk0p1
./newfs_msdos: warning, /dev/block/mmcblk0p1 is not a character device
./newfs_msdos: Skipping mount checks
/dev/block/mmcblk0p1: 5992960 sectors in 93640 FAT32 clusters (32768 bytes/cluster)
bps=512 spc=64 res=32 nft=2 mid=0xf0 spt=16 hds=4 hid=0 bsec=5994496 bspf=732 rdcl=2 infs=1 bkbs=2


and then my sdcard was fine, I could write on it and use it via USB. I guess it was somewhat corrupted.