Fat32 partition stuck in read-only in 16GB MicroSDHC - G1 General

OK so far my problem has stumped everyone.
I have a rooted and hacked G1(HTC Dream) with a 16GB MicroSDHC that is divided into a 2GB Ext2 partition and a 14GB FAT32 partition. It worked fine for a while but then my G1 started to freeze up and reboot continuously so I took the card out and it stopped. I tried chkdsk in Vista and it hung in elevated .cmd prompt and it says i have bad sectors but it cannot fix in read only mode. I tried format in Vista and cmd and it tries, says the data is RAW and that it tried to convert to FAT but cluster size too big. Then when I try fs command for vfat in .cmd it still won't work. I used Paragon Partition Manager 9.0 PAID version to create partitions but now it hangs every time it tries to read the card and it won't format. Tried sdformatter and a low level formatter to and no good.
I have Terminal in my G1 but I am not familiar with Linux commands. I tried fdisk and it says the FAT32 is in read only mode. When I type busybox df -h it won't show the "/dev/block/mmcblk0p1" but it shows the Ext2 partition. But when I type the mount command it shows up as "rw". But i cannot access it at all to wipe the stupid card out.
HELP!!!!

1) can you mount the fat32 partition in you phone and can see the files?
2) did you tried as root *mount -o rw,remount -t vfat /sdcard* ?
Yes I tried it and it doesn't work. Is there anyway to flash the bootloader or the ramdisk?

assuming i have ramdisk.img boot.img and system.img on sdcard root and I want to copy to system files, anyone know the commands in Terminal Emulator?

Download the ubuntu live cd, burn it, then boot your computer with it. Plug your SD card into an external reader, NOT the g1. Run gparted and select the sd card from the list of drives and see if you can format or re-partition your card. If it wont let you then try selecting Device->Create Partition Table, to create a new partition table. If none of that works then either your card or card reader is dead.
Mike

Nevermind, it was a class 2 16GB card...i think I broke it...getting a class 6...

need help....
i have a 16gb class 6 and i need help or technically a walk through on how to partition this card....hence i am an extreme noob. i got into parted and it says i have a 16.1 gb so would that translate to 16001 mb? reason i ask is cause i dont know what to subtract 32mb from and such? also what is the optimal set up for a card this size? thanx in advance for any help that you guys may supply me...

TeCH NiNJa said:
i have a 16gb class 6 and i need help or technically a walk through on how to partition this card....hence i am an extreme noob. i got into parted and it says i have a 16.1 gb so would that translate to 16001 mb? reason i ask is cause i dont know what to subtract 32mb from and such? also what is the optimal set up for a card this size? thanx in advance for any help that you guys may supply me...
Click to expand...
Click to collapse
do it from phone terminal its much easier, if you need any more help pm me

i got guys thanks alot....i think ill try 42mb linux-swap to see if the hero rom will run smoother. to
JJbdoggg
Senior Member
thanx

Related

creating 2 partitions on an SD card on a Mac fat32/ext2

Hey all. I was wondering how to format/create my sdcard with 2 partitions one fat32 the other ext2 on a mac. I used the search engine but cannot find anything.
I'm not a terminal noob but I can't figure out how to format/create the 2 partitions. I need help because I want to move my data from the g1 to the sdcard.
Thanks!
Install this http://sourceforge.net/projects/ext2fsx/ and then reboot and use the Disk Utility in /Applications/Utilities/
this will not format a ext2 partition, it only allows you to mount it, your best bet is to d/l GPARTED or of you have windows in parallels use Paragon Partition Manager... this will not work if your windows is in a bootcamp partition, the other option is to use a pc (sadly hu?)
If it helps, I actually used an ubuntu live cd and installed gparted while booted to the cd... of course, i had already made the sdcard fat32 in windows but gparted allowed me to resize and format the remainder in ext2.
I've used the ext2fsx tool to partition my SD card on my mac. I don't think I had any extra software installed, and I just used the Disk Utility...
I'm also having trouble creating a valid partition. I'm using gparted on an ubuntu live cd but the sdcard doesnt like being messed with.
What disklabel are you using? [Loop / msdos / bsd etc]?
I think i've tried every combination and haven't gotten anywhere.
Also, i've read that the card class makes a difference, is this right or does it only effect the speed of data transfer?
Any help would be much appreciated!!
.//Yamthief

8gb class 6 dead?

so i was flashing from dudes 1.1 to cyans 3.4.6 (been out of the game for a lil while) and i figured itd be best to wipe sd and g1. I reformatted to fat32 then made ext2 partition with paragon partition manager. After that the pc needed to restart and it all went smooth until it booted up again.
the pc wont read my sd anymore now (im using a standard SD adapter), windows will show its plugged in and reccomend me to reformat it to fat32 but then it always says formatting failed.
I tried using partiton again and all it does is read it as 7.6 gb ext2 drive, it wont let me format/reformat/delete partition/ create partition. it says something like No unallocated space.
Basically...Is my card fried? = /
I doubt its fried.
If it's fried, then windows will not even detect it.
Unfortunately, I do not know the fix.
Sounds like Vista is having problems reading the card... know anyone with a Mac or Linux box?
tissle said:
I doubt its fried.
If it's fried, then windows will not even detect it.
Unfortunately, I do not know the fix.
Click to expand...
Click to collapse
Not necessarily. I've seen this problem for bad SD cards.
Infact, mine appears to have died today too. It now says "blank SD card" and wants to be formatted. Damn.
Guess it's a trip to Fry's for me.
i tried using my linux liveboot cd, it detects it but linux wont mount..
damn frys is soo far for me ..like 45 min
so no body knos a fix huh?
if u don't need anything off the card, just format it.
from within windows just do a format.
or..
in linux, put the card in
Code:
df
find the one that matches ur card (/dev/sdb or /dev/sdc normally)
Code:
shred -f -n 0 -z -v /dev/sdc
this will completely wipe the card.
now type in
Code:
sudo gparted /dev/sdc
and recreate your partitions (i recommend a fat32 partition )
=O a fix from the sensai himself. i will try it when im home thanks so much haykuro!
tried in linux but command lead to a no such directory or file. and partition editor wouldnt show any other option but my actual hd. it says "cannot mount" when i insert it so it knows its there .. : /

partition sd card?

Hi all, I've noticed lately that most of the new roms coming out require you to partition your sd card. a couple of questions;
Why?
is it perminent?
wich partition to add new files too?
can i still use stock sd card?
how big to make partition?
Thanks in advance
dca1970 said:
Hi all, I've noticed lately that most of the new roms coming out require you to partition your sd card. a couple of questions;
Why?
is it perminent?
wich partition to add new files too?
can i still use stock sd card?
how big to make partition?
Thanks in advance
Click to expand...
Click to collapse
Memory size on the phone is not adequate to handle the size of certain ROMs.
No its not permanent
Ext3 for apps
Yes
As big as you want, 2gigs is what's recommended and 32 mb swap
phatmanxxl said:
Memory size on the phone is not adequate to handle the size of certain ROMs.
No its not permanent
Ext3 for apps
Yes
As big as you want, 2gigs is what's recommended and 32 mb swap
Click to expand...
Click to collapse
Thanks! .
Upgrading from ext2-ext3
On a side note, I have been attempting to partition my SDcard with the 2G on my 16G C6 card. When I use AR1.8 everything goes quickly, but it will not upgrade from ext2-ext3 and says to use adb to do this (adb does not see the partition)...partition seems to be made when checking the card. On AR2.3 the partitioning goes on forever and have to do a battery pull to get it to stop. When I check the size with this version it also seems to have done the partition even with the endless process stated earlier. It however gives me the message 'opps, something went wrong' when trying to upgrade from ext2-3.
When checking from either method in TB, it shows an ap2sd partition of around 400mb and have yet to actually upgrade to ext3 from either recovery version.
Any ideas?
Use RA recovery to partition, it makes it simple.
What ROMs require this?
I guess I've been in the AOSP world for too long...
Just the virus gingersense and the virus kingdom that I know of. The virus kindom does not require it but you wont be left if much room for apps.
phatmanxxl said:
Just the virus gingersense and the virus kingdom that I know of. The virus kindom does not require it but you wont be left if much room for apps.
Click to expand...
Click to collapse
Why not just http://forum.xda-developers.com/showthread.php?t=855424 ?
Better performance on NAND than SD-EXT.
phatmanxxl said:
Use RA recovery to partition, it makes it simple.
Click to expand...
Click to collapse
Sorry, AR was my intention of RA. Have used both the initial version 1.8 (my first anyway) and 2.3 with no success.
Have been attempting to do it within ADB and keep getting this message when attempting to make the ext2 partition:
Input/Output error during write on /dev/block/mmcblk0
This is the process I'm using:
within adb shell
# parted /dev/block/mmcblk0
(parted) mkpartfs primary fat32 0 13991
(parted) mkpartfs primary ext2 13991 16039
this is where I get the error mentioned above and can not continue to the swap.
(parted) mkpartfs primary linux-swap 16039 16071
HOWEVER....
If I use mkpart primary ext2 13991 16039 it takes, but does not show that it is an ext2 in the files system under the partition information.
Does this even make sense..lol
EDIT:
Never mind..erased my edit until I really screw up my card...now it won't mount...back to the drawing board
Gave up after reading about Transcend cards and just partitioned to the single 16G. Going to get a different card/mfg and give it a go. At least I learned a bit more about ADB today...so not a total loss.
OK..after looking through many options, may have my issue as to why RA won't perform the partition and I can't do it through ADB.....MY CARD. Apparantly there have been issues with Transcend and making an ext partition. Guess it's time to go C10 and get a new one.
Anyway...found this thread and thought it might help?
http://forum.xda-developers.com/showthread.php?t=534714
Got a new C10 card today from a different mfg and that fixed the problem!
I use gpart on ny ubuntu OS. It is NVIDIA to keep a Linux OS around guys. I can do the wholebpartitioning without erasing any files or data. soo I'm good to go. Also its fast as well.
Sent from my PC36100 using XDA App

[Q] Re: "Dualboot Mirage CM7 / ICS CM9 Image": can't resize sdcard volume.

This question probably belongs in the thread "[ROMS]NEW! Dualboot Mirage CM7 / ICS CM9 Image for SDcard [3/26]", except that I can't post there yet.
I was able to create a working dual boot card per the instructions. However, I could not make a working card that made use of all 16 GB of my card, rather than just the <4GB size of the image file. The card still worked when I used fdisk on my Mac to increase the size of the last, 'sdcard', partition to fill up the available space. However, that did not increase the capacity of the FAT volume in that partition, leaving the extra space still unavailable.
After saving the files from that volume, I then used the Mac's Disk Utility to erase the partition and re-create it as a FAT partition using all the available space. Once I did that, unfortunately, the Nook would then not recognize anything on the SD card and would only boot into the Nook's own ROM.
As an alternative, I tried leaving the existing partitions alone and editing the MBR with fdisk to create a new partition using the available space, which I then formatted as a FAT partition with Disk Utility. Again, the Nook would no longer recognize the SD card and would only boot into its stock ROM.
I actually tried the above with two 16GB SD cards, a SanDisk Class 4 and a Samsung Class 10, and with two Nooks. Moreover, I tried a number of manipulations of the MBR, mostly to make it identical to the original one except for necessary size changes. Nothing worked to get a card that would boot and use the full 16 GB. I'll admit I haven't tried everything, such as trying to resize to something less than the full 16GB, but I've put so much time into this already that I don't want to do any more until I get some feedback.
aarons510 said:
This question probably belongs in the thread "[ROMS]NEW! Dualboot Mirage CM7 / ICS CM9 Image for SDcard [3/26]", except that I can't post there yet.
I was able to create a working dual boot card per the instructions. However, I could not make a working card that made use of all 16 GB of my card, rather than just the <4GB size of the image file. The card still worked when I used fdisk on my Mac to increase the size of the last, 'sdcard', partition to fill up the available space. However, that did not increase the capacity of the FAT volume in that partition, leaving the extra space still unavailable.
After saving the files from that volume, I then used the Mac's Disk Utility to erase the partition and re-create it as a FAT partition using all the available space. Once I did that, unfortunately, the Nook would then not recognize anything on the SD card and would only boot into the Nook's own ROM.
As an alternative, I tried leaving the existing partitions alone and editing the MBR with fdisk to create a new partition using the available space, which I then formatted as a FAT partition with Disk Utility. Again, the Nook would no longer recognize the SD card and would only boot into its stock ROM.
I actually tried the above with two 16GB SD cards, a SanDisk Class 4 and a Samsung Class 10, and with two Nooks. Moreover, I tried a number of manipulations of the MBR, mostly to make it identical to the original one except for necessary size changes. Nothing worked to get a card that would boot and use the full 16 GB. I'll admit I haven't tried everything, such as trying to resize to something less than the full 16GB, but I've put so much time into this already that I don't want to do any more until I get some feedback.
Click to expand...
Click to collapse
Well you're missing just one step after fdisk. If Disk Utility is failing at it you could try terminal:
First you need to find out where your /sdcard is being mounted at. Use "diskutil list" to find out
Once you find out where it's being mounted (eg. /dev/disk4s7). You will then need to unmount the volumes before you can format it.
Code:
$ diskutil unmountDisk /dev/disk4s*
$ diskutil partitionDisk "/dev/disk*" 1 MBRFormat "MS-DOS FAT32" "sdcard" "*M"
Replace * with the actual values needed. You might need "sudo" to perform the format command. Make sure you're formatting the correct mount point or else you might end up wiping your system. But if you were able to use fdisk, I'm sure you have a good understanding of terminal.
Haven't tried it myself. But it should(might) work.
-Racks
Won't "diskutil partitionDisk ..." wipe out all volumes on disk?
racks11479 said:
[See previous post!]
Click to expand...
Click to collapse
When I type
Code:
diskutil partitionDisk
in Terminal to get usage info, I see, inter alia, the following:
Code:
(Re)Partition an existing disk. All volumes on this disk will be destroyed.
But that is clearly not what I want to do. Am I missing something?
Updated update:
I have tried, several times and on both SD cards and both Nooks, diskutil eraseVolume, a presumably more powerful version of the erase option in Disk Utility. I tried one or another of the commands:
Code:
diskutil eraseVolume MS-DOS sdcard /dev/disk4s7
diskutil eraseVolume 'MS-DOS FAT32' sdcard /dev/disk4s7
on cards that were booting, but with the small sdcard partition or the small volume on the enlarged partition. I also tried at least one of those commands on a card that was already not working after modification. In all cases, the commands ran without error but produced a non-booting card. Changing the 'ob' partition id back to 'oc' with fdisk didn't help, nor did any restoration of the original fdisk MBR info.
In sum, the only change that I have been able to make to a card as originally written from the image without making it unbootable was to enlarge the sdcard partition while leaving the sdcard volume untouched, and therefore not using most of the capacity of the partition.
Some more general but related questions.
Since I've got your attention, Racks, let me ask a few questions whose answers might help me and others understand what is going on here and what might go wrong with this and other Nook Color boot setups. Of course, also please point out where anything I think I know is, in fact, wrong.
1) I understand that the firmware boot code on the Nook first looks for something on an inserted SD card to boot from. It seems it looks for a file named u-boot.bin on the first partition of the inserted card to which to transfer control. Does it also check other things on the card before transferring control to u-boot.bin? Does it look at the file MLO? Does it look at the partition labeled sdcard, or at any other partition, before doing so?
2) Presuming that it does transfer control to u-boot.bin, what does the latter check before either booting from the (default) ROM on the card or, if the Home button is being held down, going to the interactive boot dialogue? My experience has been that, when using one of my 'non-working' cards, the Nook goes quickly to the ROM on internal memory without showing any visible signs of doing anything else first. In other words, it 'knows' that it can't boot from a ROM on the sdcard before actually trying to do so.

Fix broken internal storage on GT-I9000M (/dev/block/mmcblk0 corrupted)

I bypassed dead internal memory on a GT-I9000M.
Symptoms:
- Your GT-I9000M is not booting or bootlooping no matter what firmware you are flashing it with.
- In recovery, you are seeing I/O errors on /dev/block/mmcblk0p1
- Trying to repartition and format the internal storage with fdisk or parted and mkfs.whatever fails.
To recover:
- Partition and format your 16GB+ external microSD with at least two primary partitions, vfat on the first one and rfs (or whatever fs is supported by your firmware) on the second one.
- Acquire a stock ROM, in my case I used JL2
- untar the PDA portion of your ROM of choice (you want zImage and factoryfs.rfs)
- Extract initramfs from zImage ( https://github.com/mistadman/Extract-Kernel-Initramfs )
- grep for /dev/block/mmcblk, there should be 4 .rc files containing references to it as well as within the binary file /init.
- use a text editor to replace all occurances of "mmcblk0" with "mmcblk1" (and vice-versa if you feel so inclined) in the .rc files.
- use a hex editor to replace "mmcblk0" with "mmcblk1" in /init.
- create cpio archive of your modified initramfs with `find . | cpio -H newc -o > ../initramfs.img`
- repack kernel and initramfs ( http://forum.xda-developers.com/showthread.php?t=789712 ), you should have a new_zImage now.
- Mount the factoryfs.rfs as a loop `mount -o loop,rw -t vfat factoryfs.rfs /mnt/loop`
- Modify vold.fstab - this topic is well covered elsewhere (swap sdcard and sdcard1, swap mount points), then umount your loop
- Flash factoryfs.rfs and zImage using your favorite method.
That's it! Your phone will now boot and complain forevermore that the external memory is corrupt. ToDo: use third partition on external microSD as external_sd...
To recap:
We're telling android's init and whatever .rc scripts contain references to the broken partitions on the internal storage /dev/block/mmcblk0 to point to an appropriate partition on the external microSD card /dev/block/mmcblk1. You can actually do anything you want with the partition structure as long as it's consistent throughout init and in vold.fstab. Different ROMs do it differently.
I am not responsible for misuse of your hex editor, lack of backups, etc. I highly recommend the unbrickable mod.
Corrupt internal storage
Hi b0nafide,
My internal storage is also corrupted (i9000). I'm getting the same errors you descripe in your post. I'm trying your solution in wich you install android on your external SD. I bought a 8GB cat10 SD card....
But I'm stuck at the step: 'Extract initramfs from zImage ( [//github.com/mistadman/Extract-Kernel-Initramfs] )'. When I start the script nothing happens, except for my terminal closing. I'm using a virtualy installed Ubuntu distribution (Backtrack 5).
Do you have a tip? Perhaps you can help me through Teamviewer???
Hope do hear from you... I want to use my phone again
Greatings, Eldoro
My sgs is dead.
Please b0nafide, can you upload this modificated kernel (zImage and factoryfs.rfs) just for noobs like me?
Yes that woud be great. ..
Sent from my GT-I9300 using xda app-developers app
Here also an i9000 with reboot
Have done allot, stock rom, other pit files...
Is there a way to do this with a i9000 ?
and yes an image for us ?
and is the phone then normale... or is the internal storage still broken ?
Thanxs
Anyone can help us?
grimorct said:
Anyone can help us?
Click to expand...
Click to collapse
???
Anyone with working solution for this on i9000? I'll try to pack JW4 following this guide
grozni said:
Anyone with working solution for this on i9000? I'll try to pack JW4 following this guide
Click to expand...
Click to collapse
Yesterday, I made a flasheable pack of JW4, but it doesn't run. Now i'ḿ trying to modify JVU, but a strange thing happen when i'm repacking zImage...the script spends a lot of time in order to make it, and i can't be able to verify the correct pocess of new_zImage.
It's my first post in XDA, because normally I use HTCMANIA... I'm Spanish...and my English it isn't so good. Even, I should said that it isn't my phone...i'm repairing a friend's phone, so it's difficult for me to explain or speak about different ROMs or kernels....sorry
It's very important to advice that the scripts posted should be modified to get it run...because I found different problems to execute on Ubuntu.
Now it's 1:30 am...i'm trying "ext_JVU"....tomorrow i'll tell you the results.
Anyway i'll try to upload it, to reach different conclusions...
sesetxu said:
Anyway i'll try to upload it, to reach different conclusions...
Click to expand...
Click to collapse
Please do, I'll try flashing immediately and get back with results. How did you format external sd card?
I'm willing to try aswell... almost gave up hope.
Sent from my GT-I9300 using xda app-developers app
Hello friends!!!
I've the CODE (PDA file in ODIN) modified to execute android in ext-sdcard.
I do it as the first post said....but it doesn't run for me...
Anyway here is...Yo must get the MODEM and CSC os the stock firmware
XDA block the urls for me...for this reason its haven´t the WWW ...
Stock firmware..only to get MODEM and CSC: 4shared.com/zip/W1NeYAPA/I9000XXJVU_I9000OXAJVU_OXA.html?
Code modified to run in sdcard external: rapidshare.com/files/3786190721/ext_XXJVU.tar.md5
To solve my problems, i'll try to generate an CWMfile flasheable to try it...but now i'm hopeless....
Good luck men!!
sesetxu said:
Good luck men!!
Click to expand...
Click to collapse
Great work men!! It works for me. After flashing I got error in picture I posted (same error as before when writing to internal storage with stock rom). I just hit reboot but honestly I was not thinking it will boot. Thing I noticed when I start camera I get message turn off usb storage first. My files app shows no sd card inserted. How did you format your sd card? I'm using 8gb class 6 sd card
grozni said:
Great work men!! It works for me. After flashing I got error in picture I posted (same error as before when writing to internal storage with stock rom). I just hit reboot but honestly I was not thinking it will boot. Thing I noticed when I start camera I get message turn off usb storage first. My files app shows no sd card inserted. How did you format your sd card? I'm using 8gb class 6 sd card
Click to expand...
Click to collapse
I've modified all to use an sdcard with the folowing partitions:
1st primary fat32 which is internal sd card (4 gb)
2nd primary reiserfs which is /data (2 gb)
3rd primary fat 32 as external sd card
Try it...and I am happy to help you
sesetxu said:
I've modified all to use an sdcard with the folowing partitions:
1st primary fat32 which is internal sd card (4 gb)
2nd primary reiserfs which is /data (2 gb)
3rd primary fat 32 as external sd card
Try it...and I am happy to help you
Click to expand...
Click to collapse
I will try this layout. At first I prepared sdcard with 2 partitions which currently boot into Android but storage isn't working:
1st primary fat32 (6gb)
2nd primary ext4 (2gb)
You said raiserfs, should be that rfs type partition?
Update: I just noticed that both partition on my sdcard are fat32. First partition which should be internal storage I had to format again (not sure why). After this internal storage is still not available when in Android. I guess some mounting point is not good. Second fat32 partition is where the data is I guess (picture attached)
Exactly the same result as grozni. Same errors upon installing but booting into android. Amazing work! Also formatted 2 partitions. WiFi also not working btw. Hangs on obtaining ip...
Sent from my GT-I9300 using xda app-developers app
eldoro said:
Hangs on obtaining ip...
Click to expand...
Click to collapse
Same here
Is imposible to start Andoird without a rfs partition to mount /data (or ext4, for ROMs wich has fixed the troubles with ext4/rfs file systems...)
I can´t start the phone, because i get an added problem (my system can't format rfs data..but i don't know why)
I'm going to review the file /system/etc/vold.fstab who manages the mount points of the internal and external storages.
If anyone gets the correct configuration...please post it..
Tomorrow is Monday...and although I'm Spanish, I have a job (****ing crisis)...and i haven't so much time as weekend
Edit: wifi sockets are created over /data partition, if there is any problem in this partition is probably to get troubles obtaining IP
sesetxu said:
Is imposible to start Andoird without a rfs partition to mount /data (or ext4, for ROMs wich has fixed the troubles with ext4/rfs file systems...)
Click to expand...
Click to collapse
If I understand correctly samsung rfs and reiserfs are not the same thing? Why you use raiserfs on sdcard layout?
sesetxu said:
Edit: wifi sockets are created over /data partition, if there is any problem in this partition is probably to get troubles obtaining IP
Click to expand...
Click to collapse
That is the reason
Update: One more thing I forgot to mention. When I try to format USB storage (internal sd) I get message sd card removed

Categories

Resources