Yun Micro SD card: Multiple errors.

Hello all,

I'm trying to get a webserver running on a sd card on my Yun. I've tried 2 SanDisk 2GB Micro SD cards. They're both formatted fat32.

Both give me the same error when i: dmesg.

[  342.850000] sd 0:0:0:0: [sda] 3862528 512-byte logical blocks: (1.97 GB/1.84 GiB)
[  342.850000] sd 0:0:0:0: [sda] No Caching mode page present
[  342.850000] sd 0:0:0:0: [sda] Assuming drive cache: write through
[  342.940000] sd 0:0:0:0: [sda] No Caching mode page present
[  342.940000] sd 0:0:0:0: [sda] Assuming drive cache: write through
[  342.950000]  sda: sda1
[  555.500000] sda: detected capacity change from 1977614336 to 0
[  584.840000] sd 0:0:0:0: [sda] 3862528 512-byte logical blocks: (1.97 GB/1.84 GiB)
[  584.840000] sd 0:0:0:0: [sda] No Caching mode page present
[  584.840000] sd 0:0:0:0: [sda] Assuming drive cache: write through
[  584.850000] sd 0:0:0:0: [sda] No Caching mode page present
[  584.850000] sd 0:0:0:0: [sda] Assuming drive cache: write through
[  584.860000]  sda: sda1
[  584.950000] sd 0:0:0:0: [sda] Device not ready
[  584.950000] sd 0:0:0:0: [sda]  
[  584.950000] Result: hostbyte=0x00 driverbyte=0x08
[  584.960000] sd 0:0:0:0: [sda]  
[  584.960000] Sense Key : 0x2 [current] 
[  584.960000] Info fld=0x0
[  584.960000] sd 0:0:0:0: [sda]  
[  584.960000] ASC=0x3a ASCQ=0x0
[  584.960000] sd 0:0:0:0: [sda] CDB: 
[  584.960000] cdb[0]=0x28: 28 00 00 00 03 78 00 00 08 00
[  584.970000] end_request: I/O error, dev sda, sector 888
[  584.970000] Buffer I/O error on device sda, logical block 111
[  584.980000] sd 0:0:0:0: [sda] Device not ready
[  584.980000] sd 0:0:0:0: [sda]  
[  584.980000] Result: hostbyte=0x00 driverbyte=0x08
[  584.980000] sd 0:0:0:0: [sda]  
[  584.980000] Sense Key : 0x2 [current] 
[  584.980000] Info fld=0x0
[  584.990000] sd 0:0:0:0: [sda]  
[  584.990000] ASC=0x3a ASCQ=0x0
[  584.990000] sd 0:0:0:0: [sda] CDB: 
[  584.990000] cdb[0]=0x28: 28 00 00 00 03 78 00 00 08 00
[  584.990000] end_request: I/O error, dev sda, sector 888
[  584.990000] Buffer I/O error on device sda, logical block 111
[  585.000000] sd 0:0:0:0: [sda] Device not ready
[  585.000000] sd 0:0:0:0: [sda]  
[  585.000000] Result: hostbyte=0x00 driverbyte=0x08
[  585.010000] sd 0:0:0:0: [sda]  
[  585.010000] Sense Key : 0x2 [current] 
[  585.010000] Info fld=0x0
[  585.010000] sd 0:0:0:0: [sda]  
[  585.010000] ASC=0x3a ASCQ=0x0
[  585.010000] sd 0:0:0:0: [sda] CDB: 
[  585.010000] cdb[0]=0x28: 28 00 00 00 02 00 00 00 08 00
[  585.020000] end_request: I/O error, dev sda, sector 512
[  585.020000] Buffer I/O error on device sda, logical block 64
[  585.020000] sd 0:0:0:0: [sda] Device not ready
[  585.030000] sd 0:0:0:0: [sda]  
[  585.030000] Result: hostbyte=0x00 driverbyte=0x08
[  585.030000] sd 0:0:0:0: [sda]  
[  585.030000] Sense Key : 0x2 [current] 
[  585.030000] Info fld=0x0
[  585.030000] sd 0:0:0:0: [sda]  
[  585.040000] ASC=0x3a ASCQ=0x0
[  585.040000] sd 0:0:0:0: [sda] CDB: 
[  585.040000] cdb[0]=0x28: 28 00 00 00 02 00 00 00 08 00
[  585.040000] end_request: I/O error, dev sda, sector 512
[  585.040000] Buffer I/O error on device sda, logical block 64
[  585.050000] sd 0:0:0:0: [sda] Device not ready
[  585.050000] sd 0:0:0:0: [sda]  
[  585.050000] Result: hostbyte=0x00 driverbyte=0x08
[  585.060000] sd 0:0:0:0: [sda]  
[  585.060000] Sense Key : 0x2 [current] 
[  585.060000] Info fld=0x0
[  585.060000] sd 0:0:0:0: [sda]  
[  585.060000] ASC=0x3a ASCQ=0x0
[  585.060000] sd 0:0:0:0: [sda] CDB: 
[  585.060000] cdb[0]=0x28: 28 00 00 00 00 20 00 00 08 00
[  585.070000] end_request: I/O error, dev sda, sector 32
[  585.070000] Buffer I/O error on device sda, logical block 4
[  585.070000] sd 0:0:0:0: [sda] Device not ready
[  585.080000] sd 0:0:0:0: [sda]  
[  585.080000] Result: hostbyte=0x00 driverbyte=0x08
[  585.080000] sd 0:0:0:0: [sda]  
[  585.080000] Sense Key : 0x2 [current] 
[  585.080000] Info fld=0x0
[  585.080000] sd 0:0:0:0: [sda]  
[  585.090000] ASC=0x3a ASCQ=0x0
[  585.090000] sd 0:0:0:0: [sda] CDB: 
[  585.090000] cdb[0]=0x28: 28 00 00 00 00 20 00 00 08 00
[  585.090000] end_request: I/O error, dev sda, sector 32
[  585.090000] Buffer I/O error on device sda, logical block 4
[  585.100000] sd 0:0:0:0: [sda] Device not ready
[  585.100000] sd 0:0:0:0: [sda]  
[  585.100000] Result: hostbyte=0x00 driverbyte=0x08
[  585.100000] sd 0:0:0:0: [sda]  
[  585.100000] Sense Key : 0x2 [current] 
[  585.110000] Info fld=0x0
[  585.110000] sd 0:0:0:0: [sda]  
[  585.110000] ASC=0x3a ASCQ=0x0
[  585.110000] sd 0:0:0:0: [sda] CDB: 
[  585.110000] cdb[0]=0x28: 28 00 00 00 10 00 00 00 08 00
[  585.110000] end_request: I/O error, dev sda, sector 4096
[  585.120000] Buffer I/O error on device sda, logical block 512
[  585.840000] sda: detected capacity change from 1977614336 to 0

I've got no idea what is wrong or how to fix it. If anyone could point me out in the right direction i would be very thankfull.

Christmas greetings from the Netherlands.

Thomas Huster

I believe the problem is that you have formatted the SD card with “FAT32” instead of “FAT” try again by first reformatting to not FAT32. and reinstall.

I used NFTS on a windows 7 machine and was successful

[  585.840000] sda: detected capacity change from 1977614336 to 0

karlson:
this is the response in support, and is exactly the problem!!!

The issue could be related to the micro SD card socket. The switch made by two metal springs that closes when you insert the SD card is maybe not closing the contact, so the linux system is not notified by the presence of the SD card.
Can you try to push on the metal springs with a small screwdriver, that should allow the card to be detected ?

regards

FYI:

Please use ext4 format at Yun.

sonnyyu:
Install sofware:

opkg update

opkg install fdisk
opkg install mkdosfs
opkg install e2fsprogs
opkg install nano




Partition microSD:

http://www.howtogeek.com/106873/how-to-use-fdisk-to-manage-partitions-on-linux/



fdisk -l




Format microSD( base on the format you need only run one of them):



mkdosfs -F 32 /dev/sda1
mke2fs -t ext2 /dev/sda1
mke2fs -t ext3 /dev/sda1
mke2fs -t ext4 /dev/sda1




Mount microSD:



mkdir -p /mnt/sda1
mount  /dev/sda1 /mnt/sda1

ellisthewelder:
I used NFTS on a windows 7 machine and was successful

https://wiki.openwrt.org/doc/howto/storage

We do NOT recommend using NTFS. While it is possible, it has serious performance issues under Linux.
If, for whatever reasons, you insist to utilize NTFS as file system, you may find Writable NTFS helpful.

sonnyyu:
Please use ext4 format at Yun.

That's a good file system to use for a system disk, but may not be ideal for a disk that will be used to move files between different systems. For example, standard Windows will not be able to read an ext4 disk without installing special drivers/software.

Writing speed of EXT4 beat NTFS's by 495%.