Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux? |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
|
07-24-2016, 02:36 PM
|
#1
|
LQ Newbie
Registered: Jul 2016
Distribution: Arch linux
Posts: 25
Rep: 
|
Mounting micro SD card
So I'm trying to mount my micro SD card unto my linux fs and
to my knowledge it usually goes with the mount command.
However:
Code:
mount /dev/mmcblk0 /mnt
mount: /dev/mmcblk0: can't read superblock
To my knowledge a superblock holds metadata on the file system.
So I tried to format it using cfdisk but I get the error:
Code:
sudo cfdisk /dev/mmcblk0
cfdisk: cannot open /dev/mmcblk0: Input/output error
So I doubted I was accessing the right storage but lsblk gives me:
Code:
lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 931.5G 0 disk
├─sda1 8:1 0 512M 0 part /boot
├─sda2 8:2 0 30G 0 part /
├─sda3 8:3 0 300G 0 part /home
└─sda4 8:4 0 12G 0 part [SWAP]
sr0 11:0 1 1024M 0 rom
mmcblk0 179:0 0 7.3G 0 disk
and mmcblk0 sure does look like my 8GB micro sd card (and it's gone when I remove it so pretty much sure it is).
Why am I getting such an error, am I missing something that needs to be fixed before I could mount it?
|
|
|
07-24-2016, 03:49 PM
|
#2
|
Senior Member
Registered: Oct 2003
Posts: 3,018
|
Which distro are you running and what file system is on the sd card(eg FAT32, NTFS, ext3, etc)? Also, with the SD card inserted, post the output of:
|
|
|
07-25-2016, 12:39 AM
|
#3
|
LQ Newbie
Registered: Jul 2016
Distribution: Arch linux
Posts: 25
Original Poster
Rep: 
|
I'm running Arch linux version 230 (June-2016).
I always keep it up to date.
I believe the sd card runs on FAT32. But I'm not too sure.
output of fdisk -l:
Code:
sudo fdisk -l
Disk /dev/sda: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 79203D58-31EC-4720-AFEE-CADA6A0209F2
Device Start End Sectors Size Type
/dev/sda1 2048 1050623 1048576 512M EFI System
/dev/sda2 1050624 63965183 62914560 30G Linux filesystem
/dev/sda3 63965184 693110783 629145600 300G Linux filesystem
/dev/sda4 693110784 718276607 25165824 12G Linux swap
Strange that it isn't identified here at all while lsblk still gives me mmcblk0.
|
|
|
07-25-2016, 01:43 AM
|
#4
|
LQ Addict
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 24,253
|
try to take it out and insert again (probably a reboot helps)
|
|
|
07-25-2016, 07:20 AM
|
#5
|
LQ Newbie
Registered: Jul 2016
Distribution: Arch linux
Posts: 25
Original Poster
Rep: 
|
I did a reboot but the problem persisted.
I also noticed that my 4GB micro SD card mounts perfectly, no issues whatsoever. Strange.
|
|
|
07-25-2016, 09:28 AM
|
#6
|
LQ Addict
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 24,253
|
probably you can find some info in /var/log
Did you try it in another device?
|
|
|
07-25-2016, 10:13 AM
|
#7
|
LQ Newbie
Registered: Jul 2016
Distribution: Arch linux
Posts: 25
Original Poster
Rep: 
|
The SD card contained OSMC, a rsapberry pi OS. It booted just fine on the pi.
Though I still could not mount it unto my filesystem.
Here's a relevant excerpt from journalctl
Code:
Jul 25 17:39:10 Archie kernel: mmc0: cannot verify signal voltage switch
Jul 25 17:39:10 Archie kernel: mmc0: new ultra high speed SDR104 SDHC card at address 0002
Jul 25 17:39:10 Archie kernel: mmcblk0: mmc0:0002 00000 7.32 GiB
Jul 25 17:39:10 Archie kernel: mmcblk0: unknown error -22 sending read/write command, card status 0x900
Jul 25 17:39:10 Archie kernel: mmc0: cannot verify signal voltage switch
Jul 25 17:39:10 Archie kernel: mmc0: tried to reset card
Jul 25 17:39:10 Archie kernel: mmcblk0: unknown error -22 sending read/write command, card status 0x900
Jul 25 17:39:10 Archie kernel: blk_update_request: I/O error, dev mmcblk0, sector 0
Jul 25 17:39:10 Archie kernel: Buffer I/O error on dev mmcblk0, logical block 0, async page read
Jul 25 17:39:10 Archie kernel: ldm_validate_partition_table(): Disk read failed.
Jul 25 17:39:10 Archie kernel: mmcblk0: unknown error -22 sending read/write command, card status 0x900
Jul 25 17:39:10 Archie kernel: blk_update_request: I/O error, dev mmcblk0, sector 0
Jul 25 17:39:10 Archie kernel: Buffer I/O error on dev mmcblk0, logical block 0, async page read
Jul 25 17:39:10 Archie kernel: mmcblk0: unable to read partition table
Jul 25 17:39:10 Archie kernel: mmcblk0: unknown error -22 sending read/write command, card status 0x900
Jul 25 17:39:10 Archie kernel: mmc0: cannot verify signal voltage switch
Jul 25 17:39:10 Archie kernel: mmc0: tried to reset card
Jul 25 17:39:10 Archie kernel: mmcblk0: unknown error -22 sending read/write command, card status 0x900
Jul 25 17:39:10 Archie kernel: blk_update_request: I/O error, dev mmcblk0, sector 0
Jul 25 17:39:10 Archie kernel: mmcblk0: unknown error -22 sending read/write command, card status 0x900
Jul 25 17:39:10 Archie kernel: blk_update_request: I/O error, dev mmcblk0, sector 0
Jul 25 17:39:10 Archie kernel: Buffer I/O error on dev mmcblk0, logical block 0, async page read
Jul 25 17:39:26 Archie kernel: mmcblk0: unknown error -22 sending read/write command, card status 0x900
Jul 25 17:39:26 Archie kernel: blk_update_request: I/O error, dev mmcblk0, sector 0
Jul 25 17:39:26 Archie kernel: mmcblk0: unknown error -22 sending read/write command, card status 0x900
Jul 25 17:39:26 Archie kernel: blk_update_request: I/O error, dev mmcblk0, sector 0
Jul 25 17:39:26 Archie kernel: Buffer I/O error on dev mmcblk0, logical block 0, async page read
Jul 25 17:45:01 Archie kernel: mmcblk0: unknown error -22 sending read/write command, card status 0x900
Jul 25 17:45:01 Archie kernel: mmc0: cannot verify signal voltage switch
Jul 25 17:45:01 Archie kernel: mmc0: tried to reset card
Jul 25 17:45:01 Archie kernel: mmcblk0: unknown error -22 sending read/write command, card status 0x900
Jul 25 17:45:01 Archie kernel: blk_update_request: I/O error, dev mmcblk0, sector 0
Jul 25 17:45:01 Archie kernel: mmcblk0: unknown error -22 sending read/write command, card status 0x900
Jul 25 17:45:01 Archie kernel: blk_update_request: I/O error, dev mmcblk0, sector 0
Jul 25 17:45:01 Archie kernel: Buffer I/O error on dev mmcblk0, logical block 0, async page read
Jul 25 17:45:01 Archie kernel: mmcblk0: unknown error -22 sending read/write command, card status 0x900
Jul 25 17:45:01 Archie kernel: mmc0: cannot verify signal voltage switch
Jul 25 17:45:01 Archie kernel: mmc0: tried to reset card
Jul 25 17:45:01 Archie kernel: mmcblk0: unknown error -22 sending read/write command, card status 0x900
Jul 25 17:45:01 Archie kernel: blk_update_request: I/O error, dev mmcblk0, sector 0
Jul 25 17:45:01 Archie kernel: FAT-fs (mmcblk0): unable to read boot sector
Jul 25 17:45:18 Archie kernel: mmc0: card 0002 removed
|
|
|
07-25-2016, 10:52 AM
|
#8
|
Senior Member
Registered: Oct 2003
Posts: 3,018
|
Can you verify that this card works with windows and/or any other linux distro? I would try a livecd like gparted:
http://gparted.sourceforge.net/
This will eliminate if there is some problem with your card/reader. If you google around a bit you will see reports of similar problems with particular brands of sd cards and particular readers. That could be a kernel/driver module issue. That's almost certainly the case if you can get the sd card working with another linux distro with a different kernel and not in Arch.
If you can get the sd card properly detected in the gparted livecd, I would try deleting all the partitions on the sd card using gparted and then create one large FAT32 partition on the drive and format it. If you can get the card properly detected under windows but not linux, I would again try to delete all partitions and create a one large FAT32 partition and format. Those error messages indicate problems reading from sector 0, logical block 0 which is where the mbr resides. There may be something corrupted in the mbr which is causing the problem. Repartitioning and reformatting will rewrite the mbr with a proper partition table.
|
|
1 members found this post helpful.
|
07-25-2016, 04:22 PM
|
#9
|
LQ Newbie
Registered: Jul 2016
Distribution: Arch linux
Posts: 25
Original Poster
Rep: 
|
I used a free partition tool for windows to find I had 2 partitions on the SD card a FAT32 followed by an ext4.
I remember forming that partition using dd. I think I did not know what I was doing back then and probably that messed it up somehow.
I have repartioned the SD card to one big fat FAT32 fs. BUT I still can't get it to mount.
|
|
|
07-25-2016, 05:29 PM
|
#10
|
Senior Member
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,908
|
What is the system/distribution you are using to try and mount?
Very few systems actually have a direct reader (Raspberry PI style).
For that to boot (ARM) requires the fat filesystem to reside on the device as the first partition. This is because the ARM boot code directly reads the kernel into memory - and it only knows fat. For some ARM distributions the FAT filesystem is never mounted - only the root partition. The only time you need to mount it (as /boot btw) is to update the kernel.
A single fat filesystem is not usable with OSMRC - it requires the ext4 root filesystem (and its capabilities, which fat doesn't have).
The second partition is the root filesystem.
If you are plugging the sdcard in using a USB adapter, it will only show up as one of the sd devices. To mount it you have to use the /devs/sd name (or the UUID/LABEL/ or a /dev/disk/by-id name)
|
|
|
07-25-2016, 06:43 PM
|
#11
|
Moderator
Registered: Aug 2002
Posts: 26,757
|
Regardless of how the card is partitioned I would of expected fdisk or lsblk to output some info. Is this a dual boot machine? Are you using the same reader for both operating systems? Is the read built in or USB?
After you partitioned the card did you format it? Is it still usable from windows?
|
|
|
07-26-2016, 03:23 AM
|
#12
|
LQ Newbie
Registered: Jul 2016
Distribution: Arch linux
Posts: 25
Original Poster
Rep: 
|
The machine I'm using contains only one OS and that is Arch Linux x86 architecture (so not dual boot, I got windows on another machine).
It is definitely still visible to and usable by windows.
The machine has a built-in SD card reader, so I use an SD card adapter to fit my micro SD card.
|
|
|
07-26-2016, 03:34 AM
|
#13
|
LQ Addict
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 24,253
|
based on post #7 I would say it was not inserted properly, there is a hardware (reader) related issue or probably just the contacts should be cleaned.
Can you try another card? Another SD card adapter?
Sometimes there is a switch on the adapter (read only/read-write), can you check it too?
|
|
|
07-26-2016, 10:45 AM
|
#14
|
LQ Newbie
Registered: Jul 2016
Distribution: Arch linux
Posts: 25
Original Poster
Rep: 
|
I have two 8GB micro sd cards that fail to mount.
I have another 4GB micro SD card that mounts just fine, all using the same adapter.
here's the output of lsblk and fdisk with the 4GB micro SD card:
Code:
lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 931.5G 0 disk
├─sda1 8:1 0 512M 0 part /ESP
├─sda2 8:2 0 30G 0 part /
├─sda3 8:3 0 300G 0 part /home
└─sda4 8:4 0 12G 0 part [SWAP]
sr0 11:0 1 1024M 0 rom
mmcblk0 179:0 0 3.7G 0 disk
├─mmcblk0p1 179:1 0 243M 0 part
└─mmcblk0p2 179:2 0 3.4G 0 part
Code:
fdisk -l
Disk /dev/sda: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 79203D58-31EC-4720-AFEE-CADA6A0209F2
Device Start End Sectors Size Type
/dev/sda1 2048 1050623 1048576 512M EFI System
/dev/sda2 1050624 63965183 62914560 30G Linux filesystem
/dev/sda3 63965184 693110783 629145600 300G Linux filesystem
/dev/sda4 693110784 718276607 25165824 12G Linux swap
Disk /dev/mmcblk0: 3.7 GiB, 3904897024 bytes, 7626752 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x000f0776
Device Boot Start End Sectors Size Id Type
/dev/mmcblk0p1 2048 499711 497664 243M c W95 FAT32 (LBA)
/dev/mmcblk0p2 501760 7626751 7124992 3.4G 83 Linux
here's the excerpt of journalctl for the 4GB micro SD card (same adapter)
Code:
Jul 26 18:36:24 Archie kernel: mmc0: new high speed SDHC card at address 3f57
Jul 26 18:36:24 Archie kernel: mmcblk0: mmc0:3f57 SE04G 3.64 GiB
Jul 26 18:36:24 Archie kernel: mmcblk0: p1 p2
no issues here whatsoever
|
|
|
07-26-2016, 10:58 AM
|
#15
|
Moderator
Registered: Aug 2002
Posts: 26,757
|
Either the card reader can not read 8GB cards or that particular 8GB card.
Could be a limitation of the card reader module.
If you are using a USB card reader on the windows box try it on the linux box.
|
|
|
All times are GMT -5. The time now is 07:22 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|