[opensuse] dd on an SD card gives: Read-only file system
I have an SD card on /dev/sde. The command "findmnt -l" does not show anything mounted on /dev/sde*'. I am the root user. "ls -l /dev/sde*" shows: brw-rw---- 1 root disk 8, 64 Feb 1 13:43 /dev/sde brw-rw---- 1 root disk 8, 65 Feb 1 13:43 /dev/sde1 So apparently the device is writable. I checked the lock switch on the SD card which is unlocked. After that I want to write an image on the SD card using dd with of=/dev/sde, however I always get: dd: failed to open ‘/dev/sde’: Read-only file system I am using openSUSE 13.1, which is fully updated. When I mount the SD card, which is mounted as a vfat device, I am also unable to write on the device. Any suggestions? -- fr.gr. member openSUSE Freek de Kruijf -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Op zaterdag 1 februari 2014 10:33:10 schreef Cristian Rodríguez:
El 01/02/14 10:19, Freek de Kruijf escribió:
Any suggestions?
The physical SD card lock is probably toggled on.
I already wrote that and I checked it (double). However, I have a USB device that takes an SD card and together it is a USB stick. Using that I used kpartionmanager to check the vfat32 partition, which gave an error. However I used the application to write a new partition table on the SD card and after that I was able to use dd to write my image to the SD card in the USB device. After writing a new partition table on the SD card, I still could not write to the SD card with the SD interface in my system. When I insert the SD card in the SD interface device, I can read its content OK, however I can not write to the device. The SD device is (using lsusb): Bus 003 Device 002: ID 0bda:0151 Realtek Semiconductor Corp. Mass Storage Device (Multicard Reader) -- fr.gr. member openSUSE Freek de Kruijf -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Sat, Feb 1, 2014 at 9:38 AM, Freek de Kruijf <freek@opensuse.org> wrote:
Op zaterdag 1 februari 2014 10:33:10 schreef Cristian Rodríguez:
El 01/02/14 10:19, Freek de Kruijf escribió:
Any suggestions?
The physical SD card lock is probably toggled on.
I already wrote that and I checked it (double).
However, I have a USB device that takes an SD card and together it is a USB stick. Using that I used kpartionmanager to check the vfat32 partition, which gave an error. However I used the application to write a new partition table on the SD card and after that I was able to use dd to write my image to the SD card in the USB device.
After writing a new partition table on the SD card, I still could not write to the SD card with the SD interface in my system. When I insert the SD card in the SD interface device, I can read its content OK, however I can not write to the device.
The SD device is (using lsusb): Bus 003 Device 002: ID 0bda:0151 Realtek Semiconductor Corp. Mass Storage Device (Multicard Reader)
It is sounding like a kernel driver issue to me. Either you have a unsupported device, or there is a bug. In this case the "device" I'm talking about is the multicard reader, not the actual SD card. I'd open a bugzilla, but it might take a while to get that resolved. Greg -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
В Sat, 01 Feb 2014 14:19:50 +0100 Freek de Kruijf <freek@opensuse.org> пишет:
I have an SD card on /dev/sde. The command "findmnt -l" does not show anything mounted on /dev/sde*'. I am the root user. "ls -l /dev/sde*" shows: brw-rw---- 1 root disk 8, 64 Feb 1 13:43 /dev/sde brw-rw---- 1 root disk 8, 65 Feb 1 13:43 /dev/sde1 So apparently the device is writable.
Permissions on device nodes are not related to whether physical device is writable or not. They simply control who is allowed to open device node with intention to write. If permissions do not allow, such open would fail even before attempting to touch device, that's all.
I checked the lock switch on the SD card which is unlocked. After that I want to write an image on the SD card using dd with of=/dev/sde, however I always get: dd: failed to open ‘/dev/sde’: Read-only file system I am using openSUSE 13.1, which is fully updated.
When I mount the SD card, which is mounted as a vfat device, I am also unable to write on the device.
Which strongly suggests that your card for some reasons is read-only.
Any suggestions?
-- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Sat, 2014-02-01 at 14:19 +0100, Freek de Kruijf wrote:
I have an SD card on /dev/sde. The command "findmnt -l" does not show anything mounted on /dev/sde*'. I am the root user. "ls -l /dev/sde*" shows: brw-rw---- 1 root disk 8, 64 Feb 1 13:43 /dev/sde brw-rw---- 1 root disk 8, 65 Feb 1 13:43 /dev/sde1 So apparently the device is writable. I checked the lock switch on the SD card which is unlocked. After that I want to write an image on the SD card using dd with of=/dev/sde, however I always get: dd: failed to open ‘/dev/sde’: Read-only file system I am using openSUSE 13.1, which is fully updated.
When I mount the SD card, which is mounted as a vfat device, I am also unable to write on the device.
<snip> Have you tried writing as root? This will definitely confirm whether it is writeable. Sudhir -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Op zondag 2 februari 2014 03:24:54 schreef Sudhir Anand:
On Sat, 2014-02-01 at 14:19 +0100, Freek de Kruijf wrote:
I have an SD card on /dev/sde. The command "findmnt -l" does not show anything mounted on /dev/sde*'. I am the root user. ^^^^ "ls -l /dev/sde*" shows: brw-rw---- 1 root disk 8, 64 Feb 1 13:43 /dev/sde brw-rw---- 1 root disk 8, 65 Feb 1 13:43 /dev/sde1 So apparently the device is writable. I checked the lock switch on the SD card which is unlocked. After that I want to write an image on the SD card using dd with of=/dev/sde, however I always get: dd: failed to open ‘/dev/sde’: Read-only file system I am using openSUSE 13.1, which is fully updated.
When I mount the SD card, which is mounted as a vfat device, I am also unable to write on the device.
<snip>
Have you tried writing as root? This will definitely confirm whether it is writeable.
Sudhir
See above. -- fr.gr. member openSUSE Freek de Kruijf -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Le 02/02/2014 13:21, Freek de Kruijf a écrit :
Op zondag 2 februari 2014 03:24:54 schreef Sudhir Anand:
On Sat, 2014-02-01 at 14:19 +0100, Freek de Kruijf wrote:
I have an SD card on /dev/sde. The command "findmnt -l" does not show anything mounted on /dev/sde*'. I am the root user.
first thank you quoting the command findmnt that I didn't know and give a much cleaner display than df! then did you notice /dev/sdx is *not* a mount point, but a device?
When I mount the SD card, which is mounted as a vfat device, I am also unable to write on the device.
do you mean you used findmnt *after* mounting the card? do fdisk -l show the card? or fdisk /dev/sde? It's unsual to have a file system on a raw non partionned device (even if it should be allowed) example for me (part of fdisk -l): Disque /dev/sde : 7948 Mo, 7948206080 octets, 15523840 secteurs Unités = secteur de 1 × 512 = 512 octets Taille de secteur (logique / physique) : 512 octets / 512 octets taille d'E/S (minimale / optimale) : 512 octets / 512 octets Type d'étiquette de disque : dos Identifiant de disque : 0x00000000 Périphérique Amorçage Début Fin Blocs Id. Système /dev/sde1 8192 15523839 7757824 b W95 FAT32 and after mounting it, findmnt > f.txt gives └─/mnt /dev/sde1 vfat rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro I remember after having used imagewriter to writer an opensuse image to my sd card, I had the name opensuse impossible to remove, even after formatting with mkfs jdd -- http://www.dodin.org -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Op zondag 2 februari 2014 13:42:06 schreef jdd:
Le 02/02/2014 13:21, Freek de Kruijf a écrit :
Op zondag 2 februari 2014 03:24:54 schreef Sudhir Anand:
On Sat, 2014-02-01 at 14:19 +0100, Freek de Kruijf wrote:
I have an SD card on /dev/sde. The command "findmnt -l" does not show anything mounted on /dev/sde*'. I am the root user.
first thank you quoting the command findmnt that I didn't know and give a much cleaner display than df!
You'r welcome.
then did you notice /dev/sdx is *not* a mount point, but a device?
of course.
When I mount the SD card, which is mounted as a vfat device, I am also unable to write on the device.
do you mean you used findmnt *after* mounting the card?
I did both. I just wanted to explain that the device was not mounted when I tried to write the image to the device using dd.
do fdisk -l show the card? or fdisk /dev/sde? It's unsual to have a file system on a raw non partionned device (even if it should be allowed)
# fdisk -l /dev/sde Disk /dev/sde: 3980 MB, 3980394496 bytes, 7774208 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 Disk label type: dos Disk identifier: 0x00005c80 Device Boot Start End Blocks Id System /dev/sde1 2048 155647 76800 c W95 FAT32 (LBA) /dev/sde2 160650 417689 128520 82 Linux swap / Solaris /dev/sde3 417690 7759394 3670852+ 83 Linux
and after mounting it, findmnt > f.txt gives
└─/mnt /dev/sde1 vfat rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname =mixed,errors=remount-ro
I got: │ ├─/var/run/media/freek/BOOT /dev/sde1 vfat ro,nosuid,nodev,relatime,uid=1000,gid=100,fmask=0022,dmask=0077,codepage=437,iocharset=i │ └─/var/run/media/freek/root /dev/sde3 ext2 ro,nosuid,nodev,relatime
jdd
-- fr.gr. member openSUSE Freek de Kruijf -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Le 02/02/2014 15:15, Freek de Kruijf a écrit :
Op zondag 2 februari 2014 13:42:06 schreef jdd:
do you mean you used findmnt *after* mounting the card?
I did both. I just wanted to explain that the device was not mounted when I tried to write the image to the device using dd.
ok, nice
Device Boot Start End Blocks Id System /dev/sde1 2048 155647 76800 c W95 FAT32 (LBA) /dev/sde2 160650 417689 128520 82 Linux swap / Solaris /dev/sde3 417690 7759394 3670852+ 83 Linux
I got:
│ ├─/var/run/media/freek/BOOT /dev/sde1 vfat ro,nosuid,nodev,relatime,uid=1000,gid=100,fmask=0022,dmask=0077,codepage=437,iocharset=i │ └─/var/run/media/freek/root /dev/sde3 ext2 ro,nosuid,nodev,relatime
good. How did you mount them, with command line or with dolphin? (the mount point is unusual) can you mount any on /mnt, if necessary as --bind, to see if the permission probem can be excluded? problems mounting windows partition is often due to a bad umounting (from windows). The only fix I know is to mount them again *in windows* and umount them cleanly, it needs sometime *minutes* to have the file system umo_unted really and be able to remove the card from the computer there should not be any problem with ext2, beside an eventual fsck I forgot to ask what the dd copy is. did you already did it or do you want to do it now (like it seems through the subject)? I beg if you want to dd *to* the card, it's content is not important, so can you modify it in any way (fdisk, mkfs, rm)? did you try imagewriter(from opensuse)? not that this should change anything :-) jdd -- http://www.dodin.org -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Op zondag 2 februari 2014 16:28:21 schreef jdd:
Le 02/02/2014 15:15, Freek de Kruijf a écrit :
I got:
│ ├─/var/run/media/freek/BOOT /dev/sde1 vfat ro,nosuid,nodev,relatime,uid=1000,gid=100,fmask=0022,dmask=0077,codepage=4 37,iocharset=i │ └─/var/run/media/freek/root /dev/sde3 ext2 ro,nosuid,nodev,relatime
good. How did you mount them, with command line or with dolphin? (the mount point is unusual)
I used Dolphin, which means it is mounted like above.
can you mount any on /mnt, if necessary as --bind, to see if the permission probem can be excluded?
I can and when I do I get: # mount /dev/sde3 /mnt mount: /dev/sde3 is write-protected, mounting read-only The fact that the device is write-protected, is the problem. The SD card is not write protected. So how can I make the device /dev/sde3 not write- protected or rather /dev sde when I use dd to write an image to the device.
problems mounting windows partition is often due to a bad umounting (from windows). The only fix I know is to mount them again *in windows* and umount them cleanly, it needs sometime *minutes* to have the file system umo_unted really and be able to remove the card from the computer
It has never been used on a Windows machine. The SD card is used to boot from by a Raspberry Pi.
there should not be any problem with ext2, beside an eventual fsck
I forgot to ask what the dd copy is. did you already did it or do you want to do it now (like it seems through the subject)?
See above.
I beg if you want to dd *to* the card, it's content is not important, so can you modify it in any way (fdisk, mkfs, rm)?
did you try imagewriter(from opensuse)? not that this should change anything :-)
No. The problem is that somehow the device is defined as read-only. Maybe something in udev that does that. -- fr.gr. member openSUSE Freek de Kruijf -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Le 02/02/2014 23:06, Freek de Kruijf a écrit :
Op zondag 2 februari 2014 16:28:21 schreef jdd:
I used Dolphin, which means it is mounted like above.
ok
The fact that the device is write-protected, is the problem. The SD card is not write protected.
when I insert a write protected card I get in dmesg: [ 1365.057433] sd 8:0:0:0: [sdf] 15523840 512-byte logical blocks: (7.94 GB/7.40 GiB) [ 1365.058534] sd 8:0:0:0: [sdf] Write Protect is on [ 1365.058537] sd 8:0:0:0: [sdf] Mode Sense: 03 00 80 00 [ 1365.059521] sd 8:0:0:0: [sdf] No Caching mode page found [ 1365.059524] sd 8:0:0:0: [sdf] Assuming drive cache: write through [ 1365.062268] sd 8:0:0:0: [sdf] No Caching mode page found [ 1365.062270] sd 8:0:0:0: [sdf] Assuming drive cache: write through [ 1365.075964] sdf: sdf1 So how can I make the device /dev/sde3 not write-protected or rather /dev/sde when I use dd to write an image to the device. did you try an other card? just in case it's the reader that have a problem? some are mechanics, some are optics and may be can be dusty?
It has never been used on a Windows machine. The SD card is used to boot from by a Raspberry Pi.
is there a format option in the rapsberry or is it completely empty?
No. The problem is that somehow the device is defined as read-only. Maybe something in udev that does that.
most real problems are hardware related. I would try usb flash disk or external card reader you can also boot a live system and see if it's better, and if yes, try an other user created for this purpose jdd -- http://www.dodin.org -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Don't know if this have any value, but who knows? http://answers.yahoo.com/question/index?qid=20080310092638AAj06k8 jdd -- http://www.dodin.org -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Op maandag 3 februari 2014 09:26:44 schreef jdd:
Don't know if this have any value, but who knows?
http://answers.yahoo.com/question/index?qid=20080310092638AAj06k8
Putting a tape on the notch at the other side of write-protect switch on the SD card did not help. I am afraid it is build into the Realtek device. As I wrote before I have an USB device which takes the SD card and using that I can write on the SD card. -- fr.gr. member openSUSE Freek de Kruijf -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Le 03/02/2014 12:00, Freek de Kruijf a écrit :
As I wrote before I have an USB device which takes the SD card and using that I can write on the SD card.
then the card reader is faulty (hardware), clean it or change it :-( jdd -- http://www.dodin.org -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Mon, 03 Feb 2014 12:07:50 +0100 jdd <jdd@dodin.org> wrote:
Le 03/02/2014 12:00, Freek de Kruijf a écrit :
As I wrote before I have an USB device which takes the SD card and using that I can write on the SD card.
then the card reader is faulty (hardware), clean it or change it :-(
Not necessarily true. Very unlikely if any other media is not also write-protected. It seems more likely that the media's controller firmware is buggy and somehow flipped the write-protect bit during the write process. There is a possibility that some of the data being written to it was interpreted as a command to flip the write-protect bit. You can try flipping it back with a utility that can send commands to the controller or copy the data to a new device from a different vendor and hope none of it is again interpreted as commands. No idea where to find such a utility but they do exist. It's likely much easier to just replace it. jd -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 02/02/2014 01:42 PM, jdd wrote:
first thank you quoting the command findmnt that I didn't know and give a much cleaner display than df!
well, findmnt is made for displaying information about mount entries, while df is made for displaying file system statistics. ;-) Have a nice day, Berny -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
participants (8)
-
Andrey Borzenkov
-
Bernhard Voelker
-
Cristian Rodríguez
-
Freek de Kruijf
-
Greg Freemyer
-
jdd
-
jdebert
-
Sudhir Anand