Re: microSD ext3 file system
El dÃa Tuesday, April 03, 2012 a las 07:06:40PM +0200, Ed Kapitein escribió: Hi Matthias, A while ago i read this article on [1]. Perhaps this will help you to solve your problem. ( i have a hard time finding a working uSD card too ) Is your card on the supported card list [2] ? Kind regards, Ed [1] https://lwn.net/Articles/428584/ [2] http://wiki.openmoko.org/wiki/Supported_microSD_cards Hi, This card (or the reader in the FR) must be completely broken; the FR was one day switched off and now a ls(1) in a directory where should only be subdirs (as numbers for OpenStreetMap) looks like this: root@om-gta02 /media/card/osm # ls -l -r-xr-xr-x1 root root0 Sep 29 2034 06.4.25 .sam drwxr-xr-x6 root root 4096 Apr 3 2012 15 drwxr-xr-x5 root root 4096 Apr 3 2012 16 drwxr-xr-x6 root root 4096 Apr 3 2012 17 drwxr-xr-x 48 root root 4096 Oct 12 2009 8 drwxr-xr-x 51 root root 4096 Jun 16 2009 9 -r-xr-xr-x1 root root1936026729 Mar 9 2030 =2.4.2 w.ord -rwxr-xr-x1 root root808598885 Jan 10 2030 iption=m.ade -rwxr-xr-x1 root root1852795251 Dec 5 1902 stardict.'s -rwxr-xr-x1 root root 74 Apr 2 2012 syncToMoko.sh I also do not understand why df(1) shows the space a ~1GB and the fdisk(1M) as 3.8GB: root@om-gta02 /media/card/osm # df -kh /media/card FilesystemSize Used Available Use% Mounted on /dev/mmcblk0p1 1022.0M552.5M469.4M 54% /media/card root@om-gta02 /media/card/osm # fdisk -l /dev/mmcblk0 Disk /dev/mmcblk0: 3953 MB, 3953131520 bytes 4 heads, 16 sectors/track, 120640 cylinders Units = cylinders of 64 * 512 = 32768 bytes Sector size (logical/physical): 512 bytes / 512 bytes Disk identifier: 0x0aecb0ac Device Boot Start End Blocks Id System /dev/mmcblk0p1 1 120640 3860472 83 Linux And even more surprises: after reading the OSM tiles with tangoGPS, the dir changes now to: root@om-gta02 /media/card/osm # ls -l -r-xr-xr-x1 root root0 Sep 29 2034 06.4.25 .sam drwxr-xr-x4 root root 4096 Jan 2 06:56 10 drwxr-xr-x5 root root 4096 Jan 2 06:56 11 drwxr-xr-x5 root root 4096 Jan 2 06:56 12 drwxr-xr-x5 root root 4096 Jan 2 06:55 13 drwxr-xr-x5 root root 4096 Jan 2 06:54 14 drwxr-xr-x6 root root 4096 Apr 3 2012 15 drwxr-xr-x5 root root 4096 Apr 3 2012 16 drwxr-xr-x6 root root 4096 Apr 3 2012 17 drwxr-xr-x5 root root 4096 Jan 2 06:57 7 drwxr-xr-x 48 root root 4096 Oct 12 2009 8 drwxr-xr-x 51 root root 4096 Jun 16 2009 9 -r-xr-xr-x1 root root1936026729 Mar 9 2030 =2.4.2 w.ord -rwxr-xr-x1 root root808598885 Jan 10 2030 iption=m.ade -rwxr-xr-x1 root root1852795251 Dec 5 1902 stardict.'s -rwxr-xr-x1 root root 74 Apr 2 2012 syncToMoko.sh What does all this mean? What should I do? matthias -- Matthias Apitz t +49-89-61308 351 - f +49-89-61308 399 - m +49-170-4527211 e g...@unixarea.de - w http://www.unixarea.de/ UNIX since V7 on PDP-11 | UNIX on mainframe since ESER 1055 (IBM /370) UNIX on x86 since SVR4.2 UnixWare 2.1.2 | FreeBSD since 2.2.5 ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: microSD ext3 file system
On 04/02/2012 08:49 PM, Matthias Apitz wrote: El día Monday, April 02, 2012 a las 08:32:51PM +0200, Jiří Pinkava escribió: Hi, after umout is the filesystem broken? I have experience where are writen some pseudorandom data, which overiwrite even forst sector (after restart disk partition are not show, SD card is unformated). Is this you case? Hi, Not exactly. It seems that through writing files to the ext3 file system it gets broken; and after this fdisk -l does not show the partition anymore; btw: when I format this with mkfs.vfat, all is fine; but the space is only 1GB while the partition is around 4GB: root@om-gta02 ~ # fdisk -l /dev/mmcblk0 Disk /dev/mmcblk0: 3953 MB, 3953131520 bytes 4 heads, 16 sectors/track, 120640 cylinders Units = cylinders of 64 * 512 = 32768 bytes Sector size (logical/physical): 512 bytes / 512 bytes Disk identifier: 0x0aecb0ac Device Boot Start End Blocks Id System /dev/mmcblk0p1 1 120640 3860472 83 Linux root@om-gta02 ~ # df -kh /dev/mmcblk0p1 FilesystemSize Used Available Use% Mounted on /dev/mmcblk0p1 1022.0M394.0M627.9M 39% /media/card Why is this? matthias Hi Matthias, A while ago i read this article on [1]. Perhaps this will help you to solve your problem. ( i have a hard time finding a working uSD card too ) Is your card on the supported card list [2] ? Kind regards, Ed [1] https://lwn.net/Articles/428584/ [2] http://wiki.openmoko.org/wiki/Supported_microSD_cards ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: microSD ext3 file system
Am 03.04.2012 um 19:06 schrieb Ed Kapitein: On 04/02/2012 08:49 PM, Matthias Apitz wrote: El día Monday, April 02, 2012 a las 08:32:51PM +0200, Jiří Pinkava escribió: Hi, after umout is the filesystem broken? I have experience where are writen some pseudorandom data, which overiwrite even forst sector (after restart disk partition are not show, SD card is unformated). Is this you case? Hi, Not exactly. It seems that through writing files to the ext3 file system it gets broken; and after this fdisk -l does not show the partition anymore; btw: when I format this with mkfs.vfat, all is fine; but the space is only 1GB while the partition is around 4GB: root@om-gta02 ~ # fdisk -l /dev/mmcblk0 Disk /dev/mmcblk0: 3953 MB, 3953131520 bytes 4 heads, 16 sectors/track, 120640 cylinders Units = cylinders of 64 * 512 = 32768 bytes Sector size (logical/physical): 512 bytes / 512 bytes Disk identifier: 0x0aecb0ac Device Boot Start End Blocks Id System /dev/mmcblk0p1 1 120640 3860472 83 Linux root@om-gta02 ~ # df -kh /dev/mmcblk0p1 FilesystemSize Used Available Use% Mounted on /dev/mmcblk0p1 1022.0M394.0M627.9M 39% /media/card Why is this? matthias Hi Matthias, A while ago i read this article on [1]. Perhaps this will help you to solve your problem. ( i have a hard time finding a working uSD card too ) Is your card on the supported card list [2] ? I recently came across a different possibility: a broken SD card reader. It may work well for SD cards up to 2 GB but fail for 8 GB cards. It took me approx. 3 days of intensive cross-testing to find out that the microSD cards were all ok. And only the brand new SDXC compatible USB card reader (even originally branded by the SD card manufacturer!) was broken. The symptom was that it did read 100% ok. But write access did fail in approx. 1 out of 10k writes. So it damaged sectors within files - without changing the file tree. So fsck did not find anything. Only rarely and spurious. So please try a badblocks [3] on the system where you create the card. If it shows bad blocks and a second run shows them in a different location, your reader is broken and not the SD card... Kind regards, Ed [1] https://lwn.net/Articles/428584/ [2] http://wiki.openmoko.org/wiki/Supported_microSD_cards ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community [3]: http://linux.die.net/man/8/badblocks ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: microSD ext3 file system
El dÃa Tuesday, April 03, 2012 a las 07:06:40PM +0200, Ed Kapitein escribió: Hi Matthias, A while ago i read this article on [1]. Perhaps this will help you to solve your problem. ( i have a hard time finding a working uSD card too ) Is your card on the supported card list [2] ? Kind regards, Ed [1] https://lwn.net/Articles/428584/ [2] http://wiki.openmoko.org/wiki/Supported_microSD_cards Hi Ed, Thanks to you (and Nikolaus) for your hints. The card in question is this one: http://www.hama.de/00055570/hama-microsdhc-4gb-class-2-+-adapter-mobile and does not show up in our Wiki. I will check the card on FreeBSD with something like Linux' badblocks(8). Thanks matthias -- Matthias Apitz t +49-89-61308 351 - f +49-89-61308 399 - m +49-170-4527211 e g...@unixarea.de - w http://www.unixarea.de/ UNIX since V7 on PDP-11 | UNIX on mainframe since ESER 1055 (IBM /370) UNIX on x86 since SVR4.2 UnixWare 2.1.2 | FreeBSD since 2.2.5 ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: microSD ext3 file system
Hi, after umout is the filesystem broken? I have experience where are writen some pseudorandom data, which overiwrite even forst sector (after restart disk partition are not show, SD card is unformated). Is this you case? Pinkava J. Dne 2.4.2012 19:52, Matthias Apitz napsal(a): Hello, After some hours of testing I'm now totally lost with creating an ext3 file system on a (new) 4GB micro SD card. Using my FR (running SHR) I created one new partition on the SD with fdisk(1) and it looks like this: root@om-gta02 ~ # fdisk -l /dev/mmcblk0 Disk /dev/mmcblk0: 3953 MB, 3953131520 bytes 4 heads, 16 sectors/track, 120640 cylinders Units = cylinders of 64 * 512 = 32768 bytes Sector size (logical/physical): 512 bytes / 512 bytes Disk identifier: 0x0aecb0ac Device Boot Start End Blocks Id System /dev/mmcblk0p1 1 120640 3860472 83 Linux Then I created the ext3 file system on it with: root@om-gta02 ~ # mkfs.ext3 /dev/mmcblk0p1 mke2fs 1.41.9 (22-Aug-2009) Filesystem label= OS type: Linux Block size=4096 (log=2) Fragment size=4096 (log=2) 241440 inodes, 965118 blocks 48255 blocks (5.00%) reserved for the super user First data block=0 Maximum filesystem blocks=989855744 30 block groups 32768 blocks per group, 32768 fragments per group 8048 inodes per group Superblock backups stored on blocks: 32768, 98304, 163840, 229376, 294912, 819200, 884736 Writing inode tables: done Creating journal (16384 blocks): done Writing superblocks and filesystem accounting information: done This filesystem will be automatically checked every 32 mounts or 180 days, whichever comes first. Use tune2fs -c or -i to override. now mounting against the /etc/fstab line failes: root@om-gta02 ~ # mount /media/card mount: wrong fs type, bad option, bad superblock on /dev/mmcblk0p1, missing codepage or helper program, or other error In some cases useful info is found in syslog - try dmesg | tail or so mounting with -t ext3 works and after this as well mounting with the normal line in fstab(5) works too: root@om-gta02 ~ # mount -t ext3 /dev/mmcblk0p1 /media/card root@om-gta02 ~ # umount /media/card root@om-gta02 ~ # mount /media/card root@om-gta02 ~ # and it is really mounted: root@om-gta02 ~ # mount ... /dev/mmcblk0p1 on /media/card type ext3 (rw,errors=continue,data=ordered) now I create a dir and copy over some files from the host connected via USB: root@om-gta02 ~ # mkdir /media/card/dic host: $ scp -rp stardict-duden-2.4.2 root@miko:/media/card/dic duden.ifo 100% 155 0.2KB/s 00:00 duden.idx 100% 2360KB 786.7KB/s 00:03 duden.dict.dz 100% 6719KB 559.9KB/s 00:12 scp: /media/card/dic/stardict-duden-2.4.2/duden.dict.dz: Read-only file system scp: /media/card/dic/stardict-duden-2.4.2/duden.idx.oft: Read-only file system scp: /media/card/dic/stardict-duden-2.4.2/duden(2).idx.oft: Read-only file system the SCP fails and magically now the SD in the FR is mounted read-only: root@om-gta02 ~ # mount ... /dev/mmcblk0p1 on /media/card type ext3 (ro,errors=continue,data=ordered) What is wrong or what do I wrong with this SD card? Thanks matthias ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: microSD ext3 file system
El día Monday, April 02, 2012 a las 08:32:51PM +0200, Jiří Pinkava escribió: Hi, after umout is the filesystem broken? I have experience where are writen some pseudorandom data, which overiwrite even forst sector (after restart disk partition are not show, SD card is unformated). Is this you case? Hi, Not exactly. It seems that through writing files to the ext3 file system it gets broken; and after this fdisk -l does not show the partition anymore; btw: when I format this with mkfs.vfat, all is fine; but the space is only 1GB while the partition is around 4GB: root@om-gta02 ~ # fdisk -l /dev/mmcblk0 Disk /dev/mmcblk0: 3953 MB, 3953131520 bytes 4 heads, 16 sectors/track, 120640 cylinders Units = cylinders of 64 * 512 = 32768 bytes Sector size (logical/physical): 512 bytes / 512 bytes Disk identifier: 0x0aecb0ac Device Boot Start End Blocks Id System /dev/mmcblk0p1 1 120640 3860472 83 Linux root@om-gta02 ~ # df -kh /dev/mmcblk0p1 FilesystemSize Used Available Use% Mounted on /dev/mmcblk0p1 1022.0M394.0M627.9M 39% /media/card Why is this? matthias -- Matthias Apitz e g...@unixarea.de - w http://www.unixarea.de/ UNIX since V7 on PDP-11, UNIX on mainframe since ESER 1055 (IBM /370) UNIX on x86 since SVR4.2 UnixWare 2.1.2, FreeBSD since 2.2.5 ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community