Some microSD card failing when creating with l-m-c

Bug #940339 reported by Stefan Palsson
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
IglooCommunity
Won't Fix
Low
Lee Jones
Linaro Image Tools
Won't Fix
High
Linaro Infrastructure

Bug Description

I have bought 5 different types of microSD cards and all fail when creating a image on them with linaro-media-create, exept one.

The cards I have are:
Fuji 8Gb (does not work)
Fuji 8Gb (does not work)
SanDisc 4Gb (does not work)
TDK 8Gb Class 4 (does not work)
TDK 16Gb Class 2 (Does Work !!!!)

I have attached the printout. All where created with the following command:
stefan@stefan-uLaptop:~/snowball/12_01/ubuntu/linaro-image-tools-2012.01$ sudo ./linaro-media-create --dev snowball_sd --mmc /dev/mmcblk0 --hwpack hwpack_linaro-lt-snowball_20120123-1_armel_supported.tar.gz --binary linaro-o-ubuntu-desktop-tar-20120125-0.tar.gz

using the source tools linaro-image-tools-2012.01.tar.gz

attache is the outputs for different cards

Revision history for this message
Stefan Palsson (stefan-palsson) wrote :
Revision history for this message
Stefan Palsson (stefan-palsson) wrote :
Revision history for this message
Stefan Palsson (stefan-palsson) wrote :
Revision history for this message
Stefan Palsson (stefan-palsson) wrote :
Revision history for this message
Anmar Oueja (anmar) wrote :

Lee: Can you please comment on this bug. I believe you had similar issues.

Changed in igloocommunity:
assignee: nobody → Lee Jones (lag)
importance: Undecided → Low
Revision history for this message
Lee Jones (lag) wrote :

Also see related, but not the same:

https://bugs.launchpad.net/igloocommunity/+bug/919246

Changed in linaro-image-tools:
assignee: nobody → Mattias Backman (mabac)
Revision history for this message
Mattias Backman (mabac) wrote :

A quick look at the logs shows that the errors are from mkfs for most of the cards. For the Sandisk 4Gb card it's mv that complains that it's a read-only fs.

Can you try other filesystems on the failing cards to see if it's ext4 that's the cause of the problems? Perhaps find some flags to mkfs that works for partitioning the cards?

At least it's very likely that the workaround for this is to create images and dd them to the cards. Unless ext4 really is a bad idea.

Revision history for this message
James Tunnicliffe (dooferlad) wrote :

How confident are we in the cards that don't work? It could be that they are worn out. Can you try formatting them as ext4 or FAT32 (full format, not quick)? What happens if you try and fill the cards up and read the files back?

Revision history for this message
Stefan Palsson (stefan-palsson) wrote :

All the cards where new when I tried them. (out of the box).

Do you guys have the exact commands for me to create a image and dd over to the cards? I fairly bussy with my current work and don't want to spend to much time figuring them out :p

Same goes for the format/verification of the cards...

Revision history for this message
James Tunnicliffe (dooferlad) wrote :

There are instructions for writing an image to a card on http://www.linaro.org/ if you follow the download link. You could try a pre-built image to save you the trouble of making one of your own. If that works and you want to make your own image, just replace "--mmc <DEVICE>" in your command line with --image-file /path/to/file.

As for formatting cards, I would install gparted and use that since it makes the process trivial. Filling the card up with data should be a simple matter of copying some large files over using whatever method you want and then just cp them back to /dev/null to see if you can read them.

Revision history for this message
Данило Шеган (danilo) wrote :

The thing that fails is

linaro_image_tools.cmd_runner.SubcommandNonZeroReturnValue: Sub process "['mkfs.ext4', '/dev/mmcblk0p2', '-L', 'rootfs']" returned a non-zero value: 1

This gives you the command to try out:

  "mkfs.ext4 /dev/mmcblk0p2 -L rootfs"

It's very likely that the l-m-c is too fast for the cards (i.e. partition table has not been re-read by the OS or something like that: the first one succeeds because it creates a VFAT filesystem in the "old", factory-provided partition table).

It would be good to:
 1. get mkfs.vfat to use the "-v" option so we can perhaps see what size of the FS it is creating
 2. get mkfs.ext4 to use "-v" (verbose) option to see if we can get more than just error code (which is 1) out of it.
 3. get an output of "fdisk -l /dev/mmcblk0" as soon as mkfs.ext4 fails

We do need to rely on your input for this, because we can't reproduce the problem and you can :)

Changed in linaro-image-tools:
status: New → Incomplete
assignee: Mattias Backman (mabac) → Linaro Infrastructure (linaro-infrastructure)
Revision history for this message
Данило Шеган (danilo) wrote :

(for 1 and 2, please hack the linaro_image_tools/media_create/partitions.py file directly [perhaps in /usr/lib/pymodules/python2.7], and we'll consider adding the --verbose or --debug options to linaro-media-create directly)

Changed in linaro-image-tools:
importance: Undecided → High
Revision history for this message
Stefan Palsson (stefan-palsson) wrote :

Thank you danilo, I will try this to night or early to morrow morning.

getting the exact commands to try the dd part would be very helpfull as I'm sneeking into this beside my work at the office...
I did spend some time on it, but did not find the correct syntax. the --image-file /path/to/file had to go with some resizing or something to fit onto the card size....

Revision history for this message
Stefan Palsson (stefan-palsson) wrote :

Updated TDK_8Gb with verbose printout

Revision history for this message
Stefan Palsson (stefan-palsson) wrote :

Hi Danilo,
I just added a new printout from the TDK 8Gb card with -v on all the mkfs in the partitions.py

The error seems to be:
fs_types for mke2fs.conf resolution: 'ext4', 'default'
Calling BLKDISCARD from 0 to 7891582976 failed.

not sure what it meens...

if I do fdisk on it I get:
stefan@stefan-uLaptop:~/snowball/12_01/ubuntu/linaro-image-tools-2012.01$ sudo fdisk -l /dev/mmcblk0
[sudo] password for stefan:

Disk /dev/mmcblk0: 7946 MB, 7946108928 bytes
4 heads, 16 sectors/track, 242496 cylinders
Units = cylinders of 64 * 512 = 32768 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00060b76

        Device Boot Start End Blocks Id System
/dev/mmcblk0p1 * 1 1664 53216 c W95 FAT32 (LBA)
Partition 1 does not end on cylinder boundary.
/dev/mmcblk0p2 1665 242496 7706624 83 Linux
Partition 2 does not end on cylinder boundary.
stefan@stefan-uLaptop:~/snowball/12_01/ubuntu/linaro-image-tools-2012.01$

Revision history for this message
Milo Casagrande (milo) wrote :

Due to the age of this issue, we are acknowledging that it will likely not be fixed, is no longer applicable, or was already fixed by an indirect change. If this issue is still important, please add details and reopen it.

Changed in linaro-image-tools:
status: Incomplete → Won't Fix
Lee Jones (lag)
Changed in igloocommunity:
status: New → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.