Reboot on "Preparing SD Card"

Discussion in 'Koush' started by Se7enLC, Jul 29, 2010.

  1. Se7enLC
    Offline

    Se7enLC Active Member

    Joined:
    Nov 16, 2009
    Messages:
    1,262
    Likes Received:
    0
    Trophy Points:
    36
    Ratings:
    +0
    I just got a 32GB SD card and am now experiencing a reboot whenever I unmount and remount the SD card. Other than that, the card works perfectly fine.

    Steps to Reproduce:
    1). Settings | SD Card and Phone Storage
    2). Unmount SD card
    3). Mount SD card

    Notification bar will say "Preparing SD Card" at this point for quite awhile, and then I will see the bootsplash (not the full hardware reset).

    Is anybody else experiencing this? Anything anyone can think of that I should look for?

    I'm running 6.0RC1
     
    Last edited: Jul 29, 2010
  2. droidman101
    Offline

    droidman101 Member

    Joined:
    Feb 25, 2010
    Messages:
    711
    Likes Received:
    0
    Trophy Points:
    16
    Ratings:
    +0
    this happened to me. formatting the sdcard fixed it. this will erase all your stuff on your sdcard so back it up to a computer before formatting.
     
  3. Se7enLC
    Offline

    Se7enLC Active Member

    Joined:
    Nov 16, 2009
    Messages:
    1,262
    Likes Received:
    0
    Trophy Points:
    36
    Ratings:
    +0
    I just tried that - formatting the card does not fix the problem. Are you using a 32gb card?
     
  4. usranger80
    Offline

    usranger80 Member

    Joined:
    Jul 29, 2010
    Messages:
    33
    Likes Received:
    0
    Trophy Points:
    6
    Ratings:
    +0
    I also had the same issue, figured out it happened when I unplugged the USB from my computer on accident while transferring files, after that the sd card could not mount properly after transferring files or when I restarted the phone it would always reboot. I did reformat the card and now it works fine, it is only a 16gb card though, so if your using a 32gb it might be another issue. I would try another reformat, if it doesnt work then I would look through the forums some more.
     
  5. Se7enLC
    Offline

    Se7enLC Active Member

    Joined:
    Nov 16, 2009
    Messages:
    1,262
    Likes Received:
    0
    Trophy Points:
    36
    Ratings:
    +0
    I've reformatted a few times (it's a brand new card, so there wasn't much on it anyway). I get the problem when I unmount and remount even if I'm not even attached to a computer at all. My random uninformed guess is that there is a timeout for how long the "preparing SD card" step should take, and since the card is twice the size, that step takes twice as long - and something times out and reboots.

    I'm going to attach to adb and run logcat when I get home so I can see what messages show up right before the reboot, maybe that will give me a hint.
     
  6. usranger80
    Offline

    usranger80 Member

    Joined:
    Jul 29, 2010
    Messages:
    33
    Likes Received:
    0
    Trophy Points:
    6
    Ratings:
    +0
    Does it work fine with just the 16gb sdcard?
     
  7. Se7enLC
    Offline

    Se7enLC Active Member

    Joined:
    Nov 16, 2009
    Messages:
    1,262
    Likes Received:
    0
    Trophy Points:
    36
    Ratings:
    +0
    Yeah, never had a problem with the 16gb
     
  8. usranger80
    Offline

    usranger80 Member

    Joined:
    Jul 29, 2010
    Messages:
    33
    Likes Received:
    0
    Trophy Points:
    6
    Ratings:
    +0
    What method did you use for reformat? I had problems using the Droid format option and used the RM option to partition and that made it work again. Not sure if that makes a difference, I read awhile back that the Droid was not actually able to format a 32gb sdcard even though I know others are using them. However if its a brand new card, was it ever even formatted for the phone, properly?
     
  9. Se7enLC
    Offline

    Se7enLC Active Member

    Joined:
    Nov 16, 2009
    Messages:
    1,262
    Likes Received:
    0
    Trophy Points:
    36
    Ratings:
    +0
    The card came formatted vfat (fat32) and shows the full capacity both in my PC (linux) and on the droid. I reformatted the card from the phone and that seemed to format properly, but still triggered the reboot when I tried to mount it. On boot, the card mounts fine.

    I don't think using RomManager for partitioning is recommended or needed anymore - there's no need to partition for Apps2SD when using CM6, since it uses the Froyo method for apps on the SD card.
     
  10. usranger80
    Offline

    usranger80 Member

    Joined:
    Jul 29, 2010
    Messages:
    33
    Likes Received:
    0
    Trophy Points:
    6
    Ratings:
    +0
    Ok, I guess I don't really know what could be causing it, your earlier post made sense with the load time issues, but I had a lot of trouble finding any real info on the subject when when I was having my problems before. As far as using the RM partition/format option, it was the only thing that would seem to work when I was trying to reformat the card for some reason so I took that route, the phone format option kept causing my phone to reboot. Would like to know what you come up with for the cause of the issue though.
     
  11. Se7enLC
    Offline

    Se7enLC Active Member

    Joined:
    Nov 16, 2009
    Messages:
    1,262
    Likes Received:
    0
    Trophy Points:
    36
    Ratings:
    +0
    Added logcat debug logs from 2 occurances. Unfortunately, adb cuts out before the actual reboot, but hopefully there's something in there that points to it.
     
  12. Se7enLC
    Offline

    Se7enLC Active Member

    Joined:
    Nov 16, 2009
    Messages:
    1,262
    Likes Received:
    0
    Trophy Points:
    36
    Ratings:
    +0
    Best I can guess, the problem seems to stem from trying to allocate the necessary memory to hold the file allocation table for the SD card. When it tries to allocate the memory, it starts off a killing spree, eventually killing ADB and the phone itself.

    Can anyone with a 32gb card check and see if they have this problem as well? I don't want to call it a cyanogenmod bug unless somebody else can reproduce it. For all I know it's just me at this point.
     
  13. Se7enLC
    Offline

    Se7enLC Active Member

    Joined:
    Nov 16, 2009
    Messages:
    1,262
    Likes Received:
    0
    Trophy Points:
    36
    Ratings:
    +0
    Just tried to run fsck_msdos from a terminal window. It tries to allocate 30mb to hold the FAT and gets killed before it is able to. Not enough free, I suppose, or the settings are such that a process is not allowed to take that much memory.
     
  14. Se7enLC
    Offline

    Se7enLC Active Member

    Joined:
    Nov 16, 2009
    Messages:
    1,262
    Likes Received:
    0
    Trophy Points:
    36
    Ratings:
    +0
    SOLVED!

    It turns out that the default settings for formatting FAT32 in linux is NOT really ideal for an SD card!

    Default Settings:
    Code:
    4096 bytes per cluster
    31105536 bytes per FAT (= 60753 sectors)
    
    (That's right, 31 MEGABYTES for the FAT!)

    Settings I used:
    Code:
    32768 bytes per cluster
    1944064 bytes per FAT (= 3797 sectors)
    
    1.9 MB for the FAT, now.

    The problem was that android was not able to allocate the 30MB needed to store the FAT to check the SD card. I'm not sure what the ramifications are for such a large cluser size, but if it stops my phone from rebooting it's a definite improvement.

    Code:
    mkfs.vfat -s 64 /dev/sdb1 -n "LABEL" 
    
     
  15. bigfire
    Offline

    bigfire New Member

    Joined:
    Apr 1, 2010
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    Ratings:
    +0
    I have similar problem for the longest time. Finally just formatted it while mounted on my Windows 7 system. Using a smaller cluster size (16kb) seemed to work well for me.

    Previously, whenever I mount and dismount the phone sd card drive on my computer, it will perform a soft reset. I have yet to get it to do that. And for some reason, the phone's performance improved in not too obvious ways. Battery life seemed to be better, and overall performance faster.
     
Search tags for this page
droid reboot from sd
,
how long does a phone take to prepare a sd card
,
how long does it take a phone to prepare a sd card
,
how long does it take to format a 32gb sd card
,

how long does it take to prepare sd card

,
in emulator what does fsck msdosfs [-ny] mean?
,

preparing sd card

,
preparing sd card and reboot
,
preparing sd card takes long time
,
sd card takes long time to mount