blu.org  wiki

Mounting a SD card as RW still give RO filesystem

View: New views
4 Messages — Rating Filter:   Alert me  

Mounting a SD card as RW still give RO filesystem

by dj_segfault :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I'm trying to copy files from my laptop onto the MicroSD card for my
cellphone using a card reader.  This has worked before, but now no
matter what I do, it says it's a read only filesystem.

david@lexa:~$ l /mnt/tmp
total 8
drwxrwxrwx 2 root root 4096 2009-09-27 01:42 .
drwxr-xr-x 3 root root 4096 2009-09-27 01:42 ..

david@lexa:~$ sudo mount /dev/sdd1 /mnt/tmp/ -o 'rw,user'

david@lexa:~$ l /mnt/tmp
ls: cannot access /mnt/tmp/Video: Input/output error
total 1220
drwxr-xr-x 21 root root  32768 1969-12-31 19:00 .
drwxr-xr-x  3 root root   4096 2009-09-27 01:42 ..
-rwxr-xr-x  1 root root  16228 2009-01-19 11:09 0901_arisia.docx
drwxr-xr-x  4 root root  32768 2009-07-15 23:43 Application Data
drwxr-xr-x  3 root root  32768 2008-02-16 08:13 Backups
...
drwxr-xr-x  2 root root  32768 2007-08-02 01:03 testdir
drwxr-xr-x  4 root root  32768 2009-08-24 02:09 .Trash-1000
d?????????  ? ?    ?         ?                ? Video
drwxr-xr-x  2 root root  32768 2009-01-19 23:07 Windows
drwxr-xr-x  2 root root  32768 2007-07-23 11:07 wmdrm
-rwxr-xr-x  1 root root    296 2009-01-20 01:04 WMPInfo.xml

david@lexa:~$ touch /mnt/tmp/me
touch: cannot touch `/mnt/tmp/me': Read-only file system

david@lexa:~$ sudo touch /mnt/tmp/me
touch: cannot touch `/mnt/tmp/me': Read-only file system

david@lexa:~$ mount | grep /mnt/tmp
/dev/sdd1 on /mnt/tmp type vfat (rw,noexec,nosuid,nodev)


So it's mounted rw, and I can't even write to it as root.

Any clues?  Thanks.
_______________________________________________
Discuss mailing list
Discuss@...
http://lists.blu.org/mailman/listinfo/discuss

Re: Mounting a SD card as RW still give RO filesystem

by Dan Ritter-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Mon, Nov 02, 2009 at 11:58:50AM -0500, David Kramer wrote:
> I'm trying to copy files from my laptop onto the MicroSD card for my
> cellphone using a card reader.  This has worked before, but now no
> matter what I do, it says it's a read only filesystem.
>
>
> So it's mounted rw, and I can't even write to it as root.

Does it have a write-protect switch on it?

-dsr-

--
http://tao.merseine.nu/~dsr/eula.html is hereby incorporated by reference.
You can't defend freedom by getting rid of it.
_______________________________________________
Discuss mailing list
Discuss@...
http://lists.blu.org/mailman/listinfo/discuss

Re: Mounting a SD card as RW still give RO filesystem

by dj_segfault :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Dan Ritter wrote:
> On Mon, Nov 02, 2009 at 11:58:50AM -0500, David Kramer wrote:
>> I'm trying to copy files from my laptop onto the MicroSD card for my
>> cellphone using a card reader.  This has worked before, but now no
>> matter what I do, it says it's a read only filesystem.
>>
>>
>> So it's mounted rw, and I can't even write to it as root.
>
> Does it have a write-protect switch on it?

No, this is a MicroSD card.  The ones about the size of your fingernail.

And the phone can write to it.

_______________________________________________
Discuss mailing list
Discuss@...
http://lists.blu.org/mailman/listinfo/discuss

Re: Mounting a SD card as RW still give RO filesystem

by Grant M.-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

David Kramer wrote:
> david@lexa:~$ l /mnt/tmp
> ls: cannot access /mnt/tmp/Video: Input/output error
> total 1220
<..snip..>
> d?????????  ? ?    ?         ?                ? Video
<..snip..>
> david@lexa:~$ sudo touch /mnt/tmp/me
> touch: cannot touch `/mnt/tmp/me': Read-only file system
>
> david@lexa:~$ mount | grep /mnt/tmp
> /dev/sdd1 on /mnt/tmp type vfat (rw,noexec,nosuid,nodev)


I can't say for sure, as you didn't include the OS/version, but on
RHEL4-5/CentOS, the mount command lies - if the filesystem was remounted
due to filesystem errors, mount reports it as how it was mounted
originally. My guess is that if you again run an ls of the device, those
????? will have gone away, but I'm speaking from my prior experiences.

>From what I've seen in the past, what you have here are filesystem
errors - check /var/log/messages. I bet it will show fs errors, and will
show that it re-mounted the device read-only. You may also find some
associated hardware error, but that's not always the case.

Grant M,
--
Grant Mongardi
Senior Systems Engineer
NAPC

gmongardi@...
http://www.napc.com/
blog.napc.com
781.894.3114 phone
781.894.3997 fax

NAPC | technology matters


_______________________________________________
Discuss mailing list
Discuss@...
http://lists.blu.org/mailman/listinfo/discuss