Ask Your Question
0

can not copy any file to micro SD card on Fedora 20

asked 2014-08-17 12:12:33 -0500

mohanprakash gravatar image

updated 2015-03-28 10:30:59 -0500

I am suddenly unable to copy any file to any micro SD card on Fedora 20. On some cards there is no paste option. On others the file copy progress is shown to be successful but the file is actually not copied. I can however copy files from the micro SD card to my computer. Earlier I could copy from my computer to micro SD card well.

edit retag flag offensive close merge delete

Comments

1

Have you tried running fsck on one of them to see if it has any effects? You might also run dmesg after inserting an SD card any trying to copy something to it, and put the last lines of its output here.

hedayat gravatar imagehedayat ( 2014-08-17 13:43:19 -0500 )edit

when I try to copy from the terminal using cp command, the response is 'cannot create regular file . . . read only file system'. How do I run fsck on the microSD card? Is /dev/sda1 the memory card?

mohanprakash gravatar imagemohanprakash ( 2014-08-17 22:30:41 -0500 )edit

I could not change permissions of the folder /run/media/mohan/292E-1D15 (which is the memory card) either. The response is 'read only file system'. How do I change it from a read only file system to a normal writable file system?

mohanprakash gravatar imagemohanprakash ( 2014-08-17 22:37:28 -0500 )edit
1

There is a reason that it is read-only, it is usally because of corrupted file system (or hardware error). Please provide dmesg output as I said. No, SD card will be /dev/sdb1 or /dev/sdc1/ (or higher) depending on the number of storage devices in your system.

hedayat gravatar imagehedayat ( 2014-08-18 04:52:33 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2014-08-22 00:28:32 -0500

mohanprakash gravatar image

updated 2014-08-22 03:33:19 -0500

abadrinath gravatar image

This problem was automatically solved when I put my micro SD card into my android device. I don't know why but now I am able to copy files to this memory card from Fedora 20. Maybe there was some problem with the file system which the android OS automatically resolved. When you put an SD card in Android, it formats it FAT32. So, technically, instead of needing to insert the SD card into the Android or if you have an iPhone, please follow the following steps:

IMPORTANT: This will remove all data, please back up

If the SD card is mounted, you will need to unmount it, or the formatting process will not occur. To find out if it is mounted, execute the command df -h. If you see any /dev/sdd1 or something similar (not /dev/sda*, please), note that down. In this example, we have an SD card on the last line:

Filesystem      Size  Used Avail Use% Mounted on
/dev/sda10       96G  4.9G   87G   6% /
devtmpfs        2.9G     0  2.9G   0% /dev
tmpfs           2.9G   13M  2.9G   1% /dev/shm
tmpfs           2.9G  4.9M  2.9G   1% /run
tmpfs           2.9G     0  2.9G   0% /sys/fs/cgroup
tmpfs           2.9G   16K  2.9G   1% /tmp
/dev/sda9       9.5G  118M  8.9G   2% /boot
/dev/sda11       20G  1.2G   17G   7% /var
/dev/sda13      294G  2.9G  276G   2% /home
/dev/sdd1        63G  4.0K   63G   1% /mnt/sdcardexample

So, to unmount it,

$ umount /dev/sdd1

Then, you will need to format it FAT32 or vfat in Linux. To accomplish that, there is the mkfs command. It is very useful in formatting partitions, which we need. For more information, look at the manpage of mkfs using:

$ man mkfs

or even

$ mkfs --help

Right now, we will need to format it FAT32, so the command line argument would be -t. As shown in the man page and the --help (help page), you will need to use this syntax:

$ mkfs -t [FORMAT] [MOUNTPOINT]

So, the command for our example would be:

$ mkfs -t vfat /dev/sdd1

Let it do its job. In the meantime, have a cuppa!

After it's done, go back and remount your SD card. At this point, I suggest taking your SD card out and plugging it back in. For some reason, it might not work when it has not been plugged out (happened to @hello). Then, to mount the SD card after it's been plugged in:

$ mount /dev/sdd1 /mnt/sdcardexample

If you want a tutorial on mount, please visit:

http://www.ehow.com/how_7165724_mount-sd-card-linux.html

That's it! It should be fixed (without having an Android)!

If you don't own an Android, don't go out buy an Android just for formatting an SD card :P.

Have fun!

edit flag offensive delete link more

Comments

Yeah, it probably formatted it FAT, please check out my edit. Added tutorial.

abadrinath gravatar imageabadrinath ( 2014-08-22 02:30:35 -0500 )edit

IMPORTANT: This will remove all data, please back up.

abadrinath gravatar imageabadrinath ( 2014-08-22 03:32:36 -0500 )edit

AFAIK, Android does not format SD cards automatically (and I'd blame it if it did). However, if there is some problem with the SD, Android will tell the user that SD card is not OK and asks if the user wants it to be formatted.

So, if the SD is fixed by merely inserting it into an Android device without any kind of prompt for the user, it should have not formatted it. And if formatting fixes the problem, fsck should do it too.

hedayat gravatar imagehedayat ( 2014-08-22 06:22:52 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2014-08-17 12:12:33 -0500

Seen: 2,462 times

Last updated: Mar 28 '15