Friday, 6 February 2015

[ubuntu] Micro SD Cards are loading as read only - not sure how to fix - Ubuntu 14 topic






I'm currently trying to format the SD so that I could install Deb Wheezy onto it, though I might use the NOOBs installer as it's meant to be really simple and I haven't tried it yet. It currently has RetroPie on it.


I was trying to format and setup the partitions using fdisk, and ran into the problems that follow.


I've experienced similar[ish] problems earlier in the week from my phones SD card; I couldn't copy files onto it as it had been mounted as read only. This is what lead me to believe there was a fault on the computers side rather than the SD cards.


I've tried to format the SD card using [this guide]( http://qdosmsq.dunbar-it.co.uk/blog/...-raspberry-pi/ ) but mine seemed to bugger it at the last stage as I got the message :


Command (m for help): w
fdisk: unable to write /dev/mmcblk0: Bad file descriptor

I think that this means the filesystem is read only, which is weird that it only popped up at the last stage, but then thats the write stage, so perhaps it makes perfect sense...




If I grep in /dev I can see that the SD Card is there :

vco@geoHP:/dev$ a | grep mmc
brw-rw---- 1 root disk 179, 0 Feb 6 12:33 mmcblk0
brw-rw---- 1 root disk 179, 1 Feb 6 12:52 mmcblk0p1
brw-rw---- 1 root disk 179, 2 Feb 6 12:33 mmcblk0p2
vco@geoHP:/dev$


And I can see that In GParted : [SD Location](https://lh4.googleusercontent.com/gN...=w1188-h366-no) as well as the error message GParted displays [about the file system being read only]( https://lh4.googleusercontent.com/-v...-h450-no/a.png ) that's the same [for both partitions](https://lh3.googleusercontent.com/-y...-h452-no/b.png )


I had a similar problem with another SD Card, so I'm inclined to think that this is an issue with Linux rather than the card, that some setting has somehow been set to use SD Cards as read only... not sure how or why. (Note - the SD Card definitely isn't physically 'locked' on the Micro SD Card adaptor)






Any advice much appreciated ;)


*******


edit 1 : turns out that the fat16 partition was mounted, I guess the ext4 was the only was that showed up as mounted in the finder window... not sure what difference that makes


*****


edit 2 - I repeated the fdisk steps after unmounting the other partition and got the same error message as previously. I might try just wiping in GParted.


******
edit 3 - GParted didn't do anything differently, [similar error message](https://lh6.googleusercontent.com/cL...=w1158-h798-no). No reason why it would I guess.


*******


edit 4 - [here's the full error message from gparted](https://lh3.googleusercontent.com/-Z...-h390-no/a.png)


*******


edit 5 - I've fount the following command [from this post]( http://askubuntu.com/a/47547 ) :


sudo mount -o remount,rw '/media/SGTL MSCN'


I don't really get what it's doing though, I thought that I'd be mounting something from `/dev` **to** `/media`....

******


edit 6 - I've just tried the following without any progress :


vco@geoHP:~$ sudo mount -w /dev/mmcblk0 /media/sdcard/
[sudo] password for vco:
mount: block device /dev/mmcblk0 is write-protected but explicit `-w' flag given
vco@geoHP:~$







*****


edit 8 - I tried to use `dd` on this after unmounting the SD card with the following (and similar) error :




vco@geoHP:/$ sudo umount /dev/mmcblk0p2 /dev/mmcblk0p1
vco@geoHP:/$ sudo mount | grep mmc
vco@geoHP:/$ sudo dd if=/dev/zero of=/dev/mmcblk0
dd: failed to open ‘/dev/mmcblk0’: Read-only file system
vco@geoHP:/$






*****


edit 9 - I've tried to mount the SD card from `/dev/mmcblk0` using `mount -w` but I get the following :



sudo mount -w /dev/mmcblk0 /media/sdcard/
mount: block device /dev/mmcblk0 is write-protected but explicit `-w' flag given
vco@geoHP:/$



********


edit 10 - [from this post here](http://unix.stackexchange.com/questi...nt116810_79309) I'm going to try and reboot the machine.


******


edit 11 - after rebooting the SD card is still mounted as read only


*****


edit 12 - it does this for other SD cards as well, [here's GParted with a different card](https://lh3.googleusercontent.com/-a...-h461-no/a.png)






No comments:

Post a Comment