LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
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


Reply
  Search this Thread
Old 07-24-2016, 02:36 PM   #1
AnsemEco
LQ Newbie
 
Registered: Jul 2016
Distribution: Arch linux
Posts: 25

Rep: Reputation: Disabled
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?
 
Old 07-24-2016, 03:49 PM   #2
kilgoretrout
Senior Member
 
Registered: Oct 2003
Posts: 3,018

Rep: Reputation: 400Reputation: 400Reputation: 400Reputation: 400Reputation: 400
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:
Code:
$ sudo fdisk -l
 
Old 07-25-2016, 12:39 AM   #3
AnsemEco
LQ Newbie
 
Registered: Jul 2016
Distribution: Arch linux
Posts: 25

Original Poster
Rep: Reputation: Disabled
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.
 
Old 07-25-2016, 01:43 AM   #4
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 24,253

Rep: Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964
try to take it out and insert again (probably a reboot helps)
 
Old 07-25-2016, 07:20 AM   #5
AnsemEco
LQ Newbie
 
Registered: Jul 2016
Distribution: Arch linux
Posts: 25

Original Poster
Rep: Reputation: Disabled
I did a reboot but the problem persisted.
I also noticed that my 4GB micro SD card mounts perfectly, no issues whatsoever. Strange.
 
Old 07-25-2016, 09:28 AM   #6
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 24,253

Rep: Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964
probably you can find some info in /var/log
Did you try it in another device?
 
Old 07-25-2016, 10:13 AM   #7
AnsemEco
LQ Newbie
 
Registered: Jul 2016
Distribution: Arch linux
Posts: 25

Original Poster
Rep: Reputation: Disabled
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
 
Old 07-25-2016, 10:52 AM   #8
kilgoretrout
Senior Member
 
Registered: Oct 2003
Posts: 3,018

Rep: Reputation: 400Reputation: 400Reputation: 400Reputation: 400Reputation: 400
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.
Old 07-25-2016, 04:22 PM   #9
AnsemEco
LQ Newbie
 
Registered: Jul 2016
Distribution: Arch linux
Posts: 25

Original Poster
Rep: Reputation: Disabled
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.
 
Old 07-25-2016, 05:29 PM   #10
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,908

Rep: Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513
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)
 
Old 07-25-2016, 06:43 PM   #11
michaelk
Moderator
 
Registered: Aug 2002
Posts: 26,757

Rep: Reputation: 6318Reputation: 6318Reputation: 6318Reputation: 6318Reputation: 6318Reputation: 6318Reputation: 6318Reputation: 6318Reputation: 6318Reputation: 6318Reputation: 6318
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?
 
Old 07-26-2016, 03:23 AM   #12
AnsemEco
LQ Newbie
 
Registered: Jul 2016
Distribution: Arch linux
Posts: 25

Original Poster
Rep: Reputation: Disabled
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.
 
Old 07-26-2016, 03:34 AM   #13
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 24,253

Rep: Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964
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?
 
Old 07-26-2016, 10:45 AM   #14
AnsemEco
LQ Newbie
 
Registered: Jul 2016
Distribution: Arch linux
Posts: 25

Original Poster
Rep: Reputation: Disabled
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
 
Old 07-26-2016, 10:58 AM   #15
michaelk
Moderator
 
Registered: Aug 2002
Posts: 26,757

Rep: Reputation: 6318Reputation: 6318Reputation: 6318Reputation: 6318Reputation: 6318Reputation: 6318Reputation: 6318Reputation: 6318Reputation: 6318Reputation: 6318Reputation: 6318
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Strange behaviour 2Gb SD then 16Gb micro SD in usb All in 1 micro card reader hdp160 Linux - Hardware 4 08-03-2015 06:06 AM
can't get 8-1 card reader to work {ID 058f:9360 Alcor Micro Corp. 8-in-1 Media Card } DBabo Linux - Software 28 12-06-2013 08:06 PM
mounting micro sd card of samsung 2120 configured to be connected as mass storage sumeet inani Linux - Newbie 2 07-08-2010 10:43 PM
Problem mounting micro sd Ozonecy Linux - Hardware 2 12-13-2007 06:05 AM
Trouble with mounting micro-drive Bigun Linux - Hardware 13 09-21-2003 08:41 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 07:22 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration