This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

SD Card Boot (Rebuilt problem)

TI/Linux gurus,

I've created two SD Boot cards with two different types of SDs (Generic 4GB & HP 8GB) for the first time with minor glitches. Rebuilding the same SDs for the 2nd time has been a nightmare.

Command:

$ sudo ${EZSDK}/bin/mksdboot.sh --device /dev/sdX --sdk ${EZSDK}

   Where

         sdX = sdc

............. Start of session ...........................

************************************************************
*         THIS WILL DELETE ALL THE DATA ON /dev/sdc        *
*                                                          *
*         WARNING! Make sure your computer does not go     *
*                  in to idle mode while this script is    *
*                  running. The script will complete,      *
*                  but your SD card may be corrupted.      *
*                                                          *
*         Press <ENTER> to confirm....                     *
************************************************************

ls: cannot access /dev/sdc?: No such file or directory
1024+0 records in
1024+0 records out
1048576 bytes (1.0 MB) copied, 0.00287755 s, 364 MB/s
Disk /dev/sdc doesn't contain a valid partition table
Checking that no-one is using this disk right now ...
BLKRRPART: Invalid argument
OK

Disk /dev/sdc: 486 cylinders, 255 heads, 63 sectors/track

sfdisk: ERROR: sector 0 does not have an msdos signature
 /dev/sdc: unrecognized partition table type
Old situation:
No partitions found
New situation:
Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0

   Device Boot Start     End   #cyls    #blocks   Id  System
/dev/sdc1   *      0+      4       5-     40131    c  W95 FAT32 (LBA)
/dev/sdc2          5     114     110     883575   83  Linux
/dev/sdc3        115     485     371    2980057+  83  Linux
/dev/sdc4          0       -       0          0    0  Empty
Successfully wrote the new partition table

Re-reading the partition table ...
BLKRRPART: Success

If you created or changed a DOS partition, /dev/foo7, say, then use dd(1)
to zero the first 512 bytes:  dd if=/dev/zero of=/dev/foo7 bs=512 count=1
(See fdisk(8).)
Formating /dev/sdc1 ...
/dev/sdc1: No such file or directory

ERROR: executing mkfs.vfat -F 32 -n BOOT /dev/sdc1

-------------- End of session --------------------

The above error is similar to this issue as reported by another Linux user:

http://askubuntu.com/questions/124565/mkfs-vfat-unable-to-open-dev-sdg1-device-or-resource-busy

I had to use many disk tools (GPARTED, HDDLLF similar to fdisk)  to reformat the SD card to FAT32 many tried before I could successfully rebuild the same SD Boot card.

Is there a simpler procedure?


Regards,

g

ps. I've used different SD & MMC readers

  • Hi Le George,

       There is a utility available in Linux namely Disk utility. If you are using Linux 10.04 ubuntu, find that in system-->Administration->Disk Utility in Desktops panel.
    If you use Ubuntu 11+ U can search in tools and get the same utility. This Utility is available by default.

    Procedure In case u want to proceed with it :

    • Insert your USB/MMC
    • open Disk utility and identify your device.
    • Unmount the device using option available in Disk Utility.(U cant operate on it when it is mounted.)
    • Format / delete partition / Create partition / using option available.

      This is a GUI based tool which does all the tasks that your fdisk + sequence of other command can do.


    Hope it helps..

  • Ravikiran,

    Per your suggestion, I got this same error with SD cards that have been programmed once:

    Enclosed is the file listing the steps taken with the Disk utility (Ubuntu 11.10):

    5751.SD-Boot-Format.zip

    Using these steps seem to fix this problem for now (not 100% reliable):

    1. Win PC 

      Low level format with HDDLLF

      FAT32 format

    2. Ubuntu

     Create SD Boot card

    Regards,

    g

    --------------------------- Resolved------------------

        - Have access to a reliable SDHC reader/writer (e.g. ALL in 1 Multislot card reader/writer)
        - Linux: Use Gparted to delete all partitions
        - WinXP: Use SDFormatter V3.1 to reformat SDHC to FAT32