LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 01-14-2013, 07:31 PM   #1
bvbellomo
LQ Newbie
 
Registered: Dec 2012
Posts: 25

Rep: Reputation: Disabled
USB drive is read only


I have a USB card reader with my camera card. It mounts read only, and I have no idea how to write to it. It worked fine on my old system (arch) before reformatting, and I am new to Slackware. Running as root doesn't make any difference.
 
Old 01-14-2013, 08:55 PM   #2
NyteOwl
Member
 
Registered: Aug 2008
Location: Nova Scotia, Canada
Distribution: Slackware, OpenBSD, others periodically
Posts: 512

Rep: Reputation: 138Reputation: 138
If the card reader wrote to the cards under Arch it should work in Slackware. How are you mounting it and with what permissions?
 
Old 01-14-2013, 10:43 PM   #3
bvbellomo
LQ Newbie
 
Registered: Dec 2012
Posts: 25

Original Poster
Rep: Reputation: Disabled
I haven't done anything to configure how it mounts. If I plug it in, it mounts automatically and shows up read only. I suppose I could try to use the 'mount' command to mount it differently to a different path, but that seems like the wrong solution. I assume 'root' being unable to write to the drive rules out permission issues.
 
Old 01-14-2013, 11:06 PM   #4
Mike_M
Member
 
Registered: Mar 2011
Location: California
Distribution: Slackware
Posts: 116

Rep: Reputation: 50
It may be mounted read only due to the type of filesystem being used. What filesystem is the card in question using?
 
Old 01-15-2013, 03:14 AM   #5
griswald
LQ Newbie
 
Registered: Aug 2007
Posts: 11

Rep: Reputation: 0
If it's NTFS and the drive is over 4GB you will need to install ntfs-3g
 
Old 01-15-2013, 05:39 AM   #6
KenJackson
Member
 
Registered: Jul 2006
Location: Maryland, USA
Distribution: Fedora, Arch
Posts: 572

Rep: Reputation: 64
You could try (of course replacing /media/dir with the actual):
Code:
mount -o remount,rw /media/dir
Also note that some filesystems (ext2 and jfs I think) support the mount option "errors=remount-ro". This causes, as you might guess, the filesystem to be remounted read-only when there's any error. I believe the device itself can be marked to default with this option, which the manufacturer may have done (assuming you didn't reformat it).

If that's the case, I think you can change the default to "errors=continue" with the tune2fs program. Or you can add a line to /etc/fstab to explicitly mount it the way you want.
 
Old 01-15-2013, 07:13 AM   #7
cmcanulty
LQ Newbie
 
Registered: Sep 2009
Posts: 26

Rep: Reputation: 0
2 more things to try 1)this one almost stumped me until I realized one USB drive gad a sliding lock on it or 2) this often works when the mount issue is screwed up takes a few minutes
sudo killall udisks

sudo apt-get install udisks libgdu0 gnome-disk-utility policykit-desktop-privileges --reinstall
 
Old 01-15-2013, 07:18 AM   #8
Mike_M
Member
 
Registered: Mar 2011
Location: California
Distribution: Slackware
Posts: 116

Rep: Reputation: 50
Quote:
Originally Posted by cmcanulty View Post

sudo apt-get install udisks libgdu0 gnome-disk-utility policykit-desktop-privileges --reinstall
That's not going to work very well on Slackware.
 
3 members found this post helpful.
Old 01-15-2013, 08:37 AM   #9
bvbellomo
LQ Newbie
 
Registered: Dec 2012
Posts: 25

Original Poster
Rep: Reputation: Disabled
The card in question is FAT32
 
Old 01-15-2013, 08:48 AM   #10
rokytnji
Senior Member
 
Registered: Mar 2008
Location: Waaaaay out West Texas
Distribution: AntiX 13 , Various Puppys (MacPup,Slack0),MX-14
Posts: 2,572
Blog Entries: 16

Rep: Reputation: 827Reputation: 827Reputation: 827Reputation: 827Reputation: 827Reputation: 827Reputation: 827
Might want to post the output of

Code:
cat /etc/fstab
with the card reader and flashcard plugged in after a reboot with device plugged in. /etc/fstab handles read write permissions.

Code:
# cat /etc/fstab
# Pluggable devices are handled by uDev, they are not in fstab
UUID= / auto defaults,noatime 1 1
proc /proc proc defaults 0 0
devpts /dev/pts devpts mode=0622 0 0
# Dynamic entries below
UUID=343942EB578098A9 /media/sda1 ntfs-3g noauto,users,noexec,uid=1000,gid=users,dmask=002,fmask=113,relatime 0 0
UUID=676d70d7-1c41-449b-be0f-2e04df874d86 /media/sda3 ext4 noauto,users,exec,relatime 0 0
UUID=a70b8580-b61d-4732-8109-b6f883ab58de swap swap sw,pri=1 0 0
UUID=454f0f9b-3885-4a59-a3d8-eefe9bef04e6 /media/sda6 ext4 noauto,users,exec,relatime 0 0
UUID=6439e2f7-c8a3-4ced-b422-0a29827738d4 /media/sda7 ext4 noauto,users,exec,relatime 0 0
UUID=69f5ae2f-b286-455a-ab50-6440b01a21f4 /media/sda8 ext4 noauto,users,exec,relatime 0 0
/dev/cdrom /media/cdrom udf,iso9660 noauto,users,exec,ro 0 0
/dev/sr0 /media/cdrom udf,iso9660 noauto,users,exec,ro 0 0
# Added by antiX
/dev/sda8        /media/sda8      ext4       noauto,exec,relatime,users      0 0
# Added by antiX
/dev/sda5        swap             swap       defaults                        0 0
# Added by antiX
/dev/sda1        /media/sda1      ntfs-3g    noauto,noexec,uid=1000,gid=users,dmask=002,fmask=113,users  0 0
# Added by antiX
/dev/sda7        /media/sda7      ext4       noauto,exec,relatime,users      0 0
# Added by antiX
/dev/sda6        /media/sda6      ext4       noauto,exec,relatime,users      0 0
# Added by antiX
/dev/sda3        /media/sda3      ext4       noauto,exec,relatime,users
Edited:

Quote:
Both the mount command and the /etc/fstab mount a device as read/write unless specified as read only. Therefore, if you are having trouble reading and writing to a mounted device, you will want to check you fstab file to ensure that you have the correct permissions specified.

Last edited by rokytnji; 01-15-2013 at 08:51 AM.
 
1 members found this post helpful.
Old 01-19-2013, 11:19 AM   #11
sonichedgehog
Member
 
Registered: Oct 2007
Location: London UK
Distribution: Fedora Core 17
Posts: 296

Rep: Reputation: 32
I note that running as root doesn't`t help., which I assume means that even as root you can't write to the automounted filesystem... but have you actually tried a command-line mount as root? I think it's
Code:
mount -t vfat /dev/(your card) /media/(mountpoint)
. I have seen a usb device mounted read-only , in this case because the filesystem was damaged. Post again if this is unclear.
 
Old 01-19-2013, 12:24 PM   #12
KenJackson
Member
 
Registered: Jul 2006
Location: Maryland, USA
Distribution: Fedora, Arch
Posts: 572

Rep: Reputation: 64
And you can add the -w (or --rw or -o rw) switch to specifically mount it read/write:
Code:
mount -t vfat -w /dev/(your card) /media/(mountpoint)
 
Old 01-22-2013, 01:45 AM   #13
Graham Harris
LQ Newbie
 
Registered: Nov 2003
Distribution: RedHat
Posts: 4

Rep: Reputation: 0
I have had this a few times now, and the pattern seems to be that the USB drive is 'tainted', probably being dismounted uncleanly.

If that's the case for you, then fixing the USB drive is the easiest solution.

On linux, fsck can do this but you can also do this in Windows; right-click on the USB drive and select properties, then there's an option to test and fix the drive. That seems to do it for me.

I'm not sure there's an actual problem with the drive; just something that gets set when the drive is mounted, and not unset when hastily removed.
 
Old 01-26-2013, 12:04 PM   #14
sonichedgehog
Member
 
Registered: Oct 2007
Location: London UK
Distribution: Fedora Core 17
Posts: 296

Rep: Reputation: 32
... and if that doesn't fix it, then you may need to reconstruct the drive's filesystem using parted.

Before you delete anything, be sure to 1) backup all your files and 2) within parted, make a note of the start and end blocks of the existing partition and recreate them exactly.

Research the use of parted before you start, its moderately tricky but well worth mastering.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Read unreadable usb drive martvefun Linux - Hardware 1 03-08-2011 09:27 AM
USB drive becomes read-only again and again dominik81 Linux - Hardware 17 11-17-2010 11:38 PM
USB can not read all drive manolakis Linux - Hardware 5 12-05-2007 05:02 AM
USB flash drive (Pen drive) mounts read only prabhatsoni Linux - Hardware 24 07-02-2007 01:28 PM


All times are GMT -5. The time now is 09:14 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration