LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-20-2015, 08:55 AM   #1
COFFEE BOY
LQ Newbie
 
Registered: Nov 2015
Posts: 4

Rep: Reputation: Disabled
Post 2 cruzer blades have become read only, lsof, pmount and umount will not solve the problem


my cruzer blade 32 and 64 gb drives have suddenly become read only. Pmount, umount and lsof cannot solve this, lsof cannot give accurate information, so cannot get pid. is there any other way to solve this problem?
 
Old 12-20-2015, 09:10 AM   #2
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 6,869

Rep: Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247
Are you able to access the drives but cannot write to them?
What changes were made since you last used them, if any?
Did you try a filesystem check? Are they both Linux filesystems?
 
1 members found this post helpful.
Old 12-20-2015, 09:37 AM   #3
COFFEE BOY
LQ Newbie
 
Registered: Nov 2015
Posts: 4

Original Poster
Rep: Reputation: Disabled
read only problem

I am using ubuntu 15.10. how do you do a file system check on flash drives
 
Old 12-20-2015, 05:43 PM   #4
fido_dogstoyevsky
Member
 
Registered: Feb 2015
Location: Victoria, Australia
Distribution: Slackware 14.1
Posts: 82

Rep: Reputation: 48
Are you able to write to them as root (eg by saving a file to them after sudo)?
 
Old 12-22-2015, 08:59 AM   #5
COFFEE BOY
LQ Newbie
 
Registered: Nov 2015
Posts: 4

Original Poster
Rep: Reputation: Disabled
thanks, I did not know you could do that. - how do you do that?
 
Old 12-22-2015, 12:17 PM   #6
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,258

Rep: Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947
How do you know they're read only? What is the output of "mount"? What about "sudo -i; echo blah > /mnt/drive/file", replacing /mnt/drive with the mount location of the drive.
 
Old 12-22-2015, 04:42 PM   #7
fido_dogstoyevsky
Member
 
Registered: Feb 2015
Location: Victoria, Australia
Distribution: Slackware 14.1
Posts: 82

Rep: Reputation: 48
Edited to correct a mistake:
Quote:
Originally Posted by COFFEE BOY View Post
thanks, I did not know you could do that. - how do you do that?
You can (for example) copy a file from the hard drive to the Cruzer. I assume you don't have the root password set and so need to use the sudo command.
If the Cruzer is mounted as /dev/sdb1 and you want to copy the file testfile.txt, open a terminal and navigate to the directory which contains textfile.txt and enter
Code:
 sudo cp testfile.txt /run/media/username/devicename
("username" in the path is your username and "devicename" is the identifier for the Cruzer) where /run/media/username/devicename is the mount point of the USB drive (in my installation of Slackware, it may be different in Ubuntu but you can find it from the GUI using your file manager). On my PC, for example, the mount point for a Sandisk drive inserted by user boris is /run/media/boris/B013-238C .

You will be asked for your user password. If the file is copied then the problem is caused by your not having permission to write to the drive as a normal user.

Apologies for the error.

Last edited by fido_dogstoyevsky; 12-23-2015 at 12:30 AM.
 
Old 12-22-2015, 05:41 PM   #8
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,258

Rep: Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947
Quote:
Originally Posted by fido_dogstoyevsky View Post
You can (for example) copy a file from the hard drive to the Cruzer. I assume you don't have the root password set and so need to use the sudo command.
If the Cruzer is mounted as /dev/sdb1 and you want to copy the file testfile.txt, open a terminal and navigate to the directory which contains textfile.txt and enter
Code:
 sudo cp testfile.txt /dev/sdb1
You will be asked for your user password. If the file is copied then the problem is caused by your not having permission to write to the drive as a normal user.
You can't copy the file straight to the raw device, you need to copy it to the mount point.
 
Old 12-23-2015, 12:32 AM   #9
fido_dogstoyevsky
Member
 
Registered: Feb 2015
Location: Victoria, Australia
Distribution: Slackware 14.1
Posts: 82

Rep: Reputation: 48
Quote:
Originally Posted by suicidaleggroll View Post
You can't copy the file straight to the raw device, you need to copy it to the mount point.
Oooops!

I can only blame posting before having the day's first cup of coffee. Thanks for the heads up, I've edited the post.
 
Old 12-23-2015, 09:29 AM   #10
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: CentOS
Posts: 2,957

Rep: Reputation: 1267Reputation: 1267Reputation: 1267Reputation: 1267Reputation: 1267Reputation: 1267Reputation: 1267Reputation: 1267Reputation: 1267
Quote:
Originally Posted by suicidaleggroll View Post
You can't copy the file straight to the raw device, you need to copy it to the mount point.
Actually you can, and you will overwrite the filesystem header on that device -- probably not what you wanted to do.
 
  


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
how to solve solve broken shell problem prasanth.george Red Hat 1 01-21-2011 10:48 AM
how to read lsof output command many file open by root ??? b-RAM Linux - Newbie 2 10-05-2009 03:40 AM
ivman -> pmount problem deadlinx Ubuntu 6 12-10-2008 01:10 PM
Cruzer Flash Drive Problem: Can't Write only Read guerrascience Linux - Hardware 3 08-26-2008 03:21 AM
pmount problem: no write permissions for non root users akirashinigami Linux - Laptop and Netbook 4 07-13-2008 07:24 PM


All times are GMT -5. The time now is 10:39 PM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration