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.

Unable to create SD Card with Sitara Linux SDK

Hi Everybody, I'm now working with ti-sdk-am335x-evm-07.00.00.00.

I'm following the instruction Sitara Linux SDK create SD card script to create the sd-card with pre-built image from SDK, and then get this error at the end of the instruction.

MLO copied


u-boot.img copied


Copying rootfs System partition
Written 100% 


Syncing...
 
Un-mount the partitions
umount2: Invalid argument
umount: boot: not mounted
umount2: Invalid argument
umount: rootfs: not mounted

After removing and inserting the sd card again, I found nothing in the boot partition (although MLO copied, u-boot.img copied as described in the console above), and the rest of the disk is unknown (it should be the rootfs partition).

 I executed the create-sdcard.sh with sudo permission at the bin folder.

sudo ./create-sdcard.sh

Here's the my full task log

################################################################################

This script will create a bootable SD card from custom or pre-built binaries.

The script must be run with root permissions and from the bin directory of
the SDK

Example:
 $ sudo ./create-sdcard.sh

Formatting can be skipped if the SD card is already formatted and
partitioned properly.

################################################################################


Availible Drives to write images to:

#  major   minor    size   name
1:   8       16    3872256 sdb
 
Enter Device Number or n to exit: 1
 
sdb was selected

/dev/sdb is an sdx device
Unmounting the sdb drives
 unmounted /dev/sdb1
Current size of sdb1 72261 bytes
Current size of sdb2 3791340 bytes

################################################################################

   Detected device has 2 partitions already

   Re-partitioning will allow the choice of 2 or 3 partitions

################################################################################

Would you like to re-partition the drive anyways [y/n] : y

 
Now partitioning sdb ...


################################################################################

    Select 2 partitions if only need boot and rootfs (most users)
    Select 3 partitions if need SDK & CCS on SD card.  This is usually used
        by device manufacturers with access to partition tarballs.

    ****WARNING**** continuing will erase all data on sdb

################################################################################

Number of partitions needed [2/3] : 2

 
Now partitioning sdb with 2 partitions...
 

################################################################################

        Now making 2 partitions

################################################################################

1024+0 records in
1024+0 records out
1048576 bytes (1.0 MB) copied, 0.342783 s, 3.1 MB/s
Disk /dev/sdb doesn't contain a valid partition table
DISK SIZE - 3965190144 bytes
Checking that no-one is using this disk right now ...
OK

Disk /dev/sdb: 482 cylinders, 255 heads, 63 sectors/track

sfdisk: ERROR: sector 0 does not have an msdos signature
 /dev/sdb: 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/sdb1   *      0+      8       9-     72261    c  W95 FAT32 (LBA)
/dev/sdb2         10     481     472    3791340   83  Linux
/dev/sdb3          0       -       0          0    0  Empty
/dev/sdb4          0       -       0          0    0  Empty
Successfully wrote the new partition table

Re-reading the partition table ...

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).)

################################################################################

        Partitioning Boot

################################################################################
mkfs.vfat 3.0.12 (29 Oct 2011)

################################################################################

        Partitioning rootfs

################################################################################
mke2fs 1.42 (29-Nov-2011)
Filesystem label=rootfs
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
237104 inodes, 947835 blocks
47391 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=973078528
29 block groups
32768 blocks per group, 32768 fragments per group
8176 inodes per group
Superblock backups stored on blocks:
    32768, 98304, 163840, 229376, 294912, 819200, 884736

Allocating group tables: done                            
Writing inode tables: done                            
Creating journal (16384 blocks): done
Writing superblocks and filesystem accounting information:  1/29
Warning, had trouble writing out superblocks.

################################################################################

   Partitioning is now done
   Continue to install filesystem or select 'n' to safe exit

   **Warning** Continuing will erase files any files in the partitions

################################################################################


Would you like to continue? [y/n] : y

 
 
Mount the partitions
mount: special device /dev/sdb1 does not exist
mount: special device /dev/sdb2 does not exist
 
Emptying partitions
 

Syncing....

################################################################################

    Choose file path to install from

    1 ) Install pre-built images from SDK
    2 ) Enter in custom boot and rootfs file paths

################################################################################

Choose now [1/2] : 1

 
Will now install from SDK pre-built images
now installing:  ti-sdk-am335x-evm-07.00.00.00
################################################################################

    Copying files now... will take minutes

################################################################################

Copying boot partition

MLO copied


u-boot.img copied


Copying rootfs System partition
Written 100%  

Syncing...
 
Un-mount the partitions
umount2: Invalid argument
umount: boot: not mounted
umount2: Invalid argument
umount: rootfs: not mounted
 
Remove created temp directories
 
Operation Finished

Any Help would be appreciated.

Best Regards

  • Hi Loi,

    I will forward this to the SW experts.

  • Hi Loi,

    There is something wrong in:

    Availible Drives to write images to:
    # major minor size name
    1: 8 16 3872256 sdb

    Here I don't see the HDD, it has to be sda and sd-card sdb. Could you type with inserted sd-card command lsblk to see all devices. When the HDD appear as sda, you will have hdd - sda and sd-card - sdb. When you start create-sdcard.sh script you have to choose hdd - 1. This is much more amazing, but in script has an error and you can work with this way.

    BR
    Ivan
  • Ivan Matrakov said:
    Hi Loi,

    There is something wrong in:

    Availible Drives to write images to:
    # major minor size name
    1: 8 16 3872256 sdb

    Here I don't see the HDD, it has to be sda and sd-card sdb. Could you type with inserted sd-card command lsblk to see all devices. When the HDD appear as sda, you will have hdd - sda and sd-card - sdb. When you start create-sdcard.sh script you have to choose hdd - 1. This is much more amazing, but in script has an error and you can work with this way.

    BR
    Ivan

    Hi Ivan, do "create-sdcard.sh" only look for SDCard? The sample image from Sitara Linux SDK create SD card script only return 1 line of sdcard, so I dont think something went wrong here

    BR

  • Biser Gatchev-XID said:

    Hi Loi,

    I will forward this to the SW experts.

    Hi Biser, I'm looking for hearing from you.

    Btw, I have some additional Information : I have the SD Card with 4gb capacity, only 1 partition, Fat16 formatted

    BR

  • Hi Loi,

    No, the create-sdcard.sh script not look for only SDCard. It's displayed all devices. Your sd-card can be formated or not, it doesn't matter, the script will make 2 partitions and will format it. 4Gb is a normal sd-card. See on my computer what appears when I run a script:

    $ sudo ./create-sdcard.sh

    Formatting can be skipped if the SD card is already formatted and
    partitioned properly.

    ################################################################################

    Availible Drives to write images to:

    # major minor size name
    1: 8 0 488386584 sda
    2: 8 16 1981440 sdb

    Enter Device Number or n to exit:

    Here you can choose 1.

    BR
    Ivan
  • Hi Ivan, "lsblk" command return for me 2 disk, and all partition inside, but create-sdcard.sh only list one - the SDCard.

    Afterall, I dont think the problem come from here, I also have no idea why you choose your 500gb hard disk to write image to, the guide lead me to choose the SDCard.

    Then I used Gparted to format the disk with ext2, also with the command mke2fs. But they all went wrong like this

    Writing superblocks and filesystem accounting information:  1/29
    Warning, had trouble writing out superblocks. 

    You can see my line 129 & 130 of my total log above.

    BR

  • Hi,
    I tell you to choose HDD because the script is wrong. This is the only way to make sd-card with this script.
    BR
    Ivan
  • Hi Ivan, thank you for all of your assistances, but I found the reason that lead me to the wrong way : I used a bad card reader,  I guess. After replacing with the new one,I've made 3 cards, and received no error.

    After all, I cant see my HDD after running create-sdcard.sh script.

    BR.