Issues with SD cards

Issues Related to Hardware (Sound, Video, Printers, Scanners, Webcams, Touchpads, Keyboards, Sensors, Drives, GRUB, etc.)

Moderator: Moderators

Issues with SD cards

Postby germanobax » Mon May 06, 2013 5:41

Hello,
I've installed Sabayon this weekend and my brand new SD card won't mount or if it does it gets corrupted after unmounting:

I tried to format it to unjournalled Ext4 and also Ext2, and in both cases I can mount it once, write stuff to it, and after unmounting, it won't mount again.

I've then formatted it using the SD card formatter utility which can be downloaded in https://www.sdcard.org/downloads. It works fine on Window$ 7 but not on Sabayon. Once I mount it, all I see are corrupted files. Everything looks normal once the card is accessed by Windows though, which is quite surprising.

So I tried another SD card which I've been using for some time in my camera. This one won't even mount. Interestingly enough, this one has no partitions and all I have is a /dev/mmblk (with the previous SD Card I would also have a /dev/mmblkp01). It also works fine on windows.

I've also tried to use the SD cards on Arch linux, and on a different laptop, but had the same issues.

Has anyone here experienced similar problems and if yes, what can be done to make my SD cards work?
Thank you
germanobax
Baby Hen
 
Posts: 2
Joined: Mon May 06, 2013 5:15

Re: Issues with SD cards

Postby germanobax » Mon May 06, 2013 8:02

For the record, I believe the information posted on this thread of the gentoo forums may solve the issue.
http://forums.gentoo.org/viewtopic-p-7144196.html

I'm going to test it once I get home and post the results.

The only drawback is that this won't answer why an ext4 formatted sdcard refuses to work. Any tip on how to make a sdcard work with ext4 will be highly appreciated.
germanobax
Baby Hen
 
Posts: 2
Joined: Mon May 06, 2013 5:15

Re: Issues with SD cards

Postby Fitzcarraldo » Mon May 06, 2013 9:43

All the SD cards I have tried (mine and my colleagues') work fine in my main laptop running Gentoo ~amd64 KDE and in two other laptops of mine running SL ~amd64 Xfce, but my SD cards are formatted as FAT32, not any of the Linux file systems. If I get some free time I'll format one as ext4 just to see if I experience the same as you.
User avatar
Fitzcarraldo
Sagely Hen
 
Posts: 7985
Joined: Sat Mar 10, 2007 5:40
Location: United Kingdom

Re: Issues with SD cards

Postby Fitzcarraldo » Mon May 06, 2013 21:15

OK, I've now had a chance to format one of my FAT32 SD cards to ext4. I used GParted to format a 16 GB SD card to ext4 and give the ext4 partition a label ("TOSHIBA"). I did this on an Acer Aspire 5536 running 64-bit SL Xfce. GParted shows the SD card (/dev/sdb) as follows:

Code: Select all
Partition     File System   Label     Size        Used        Unused      Flags
-------------------------------------------------------------------------------
unallocated   unallocated              4.00 MiB   -           -
/dev/sdb1     ext4          TOSHIBA   14.89 GiB   503.79 MiB  14.40 GiB
unallocated   unallocated              6.80 MiB   -           -


The ext4 partition on the SD card works perfectly, BUT I had to do one thing first in order to make it accessible from my user account, as it was owned by the root user. After mounting the SD card via the Xfce GUI, I had to change the owner as follows:

Code: Select all
aspire5536 ~ # cd /run/media/fitzcarraldo
aspire5536 fitzcarraldo # ls
TOSHIBA
aspire5536 fitzcarraldo # chmod +rw TOSHIBA/
aspire5536 fitzcarraldo # chown fitzcarraldo:fitzcarraldo TOSHIBA/
aspire5536 fitzcarraldo # ls -la TOSHIBA/
total 20
drwxr-xr-x  3 fitzcarraldo fitzcarraldo  4096 May  6 19:58 .
drwxr-x---+ 3 root         root            60 May  6 20:21 ..
drwx------  2 root         root         16384 May  6 19:58 lost+found

I could then copy files to and from the SD card, unmount it, remove it, insert it and remount it, etc. Everything works consistently, and the files were not corrupted.

Here are a few details of the SD card after I formatted /dev/sdb1 to ext4:

Code: Select all
aspire5536 fitzcarraldo # blkid /dev/sdb1
/dev/sdb1: UUID="9e280a4f-af08-40d6-819d-3645eaf519ad" TYPE="ext4" LABEL="TOSHIBA"
aspire5536 fitzcarraldo # df /dev/sdb1
Filesystem     1K-blocks  Used Available Use% Mounted on
/dev/sdb1       15234652 71080  14383020   1% /run/media/fitzcarraldo/TOSHIBA
aspire5536 fitzcarraldo # fdisk -l /dev/sdb1

Disk /dev/sdb1: 16.0 GB, 15985750016 bytes, 31222168 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

aspire5536 fitzcarraldo #
User avatar
Fitzcarraldo
Sagely Hen
 
Posts: 7985
Joined: Sat Mar 10, 2007 5:40
Location: United Kingdom


Return to Hardware

Who is online

Users browsing this forum: No registered users and 1 guest