LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices

Reply
 
LinkBack Search this Thread
Old 07-14-2004, 05:52 PM   #1
Arodef
Member
 
Registered: Apr 2004
Distribution: Centos, Fedora
Posts: 122

Rep: Reputation: 16
USB drive not working properly, read only device? (USB key storage device)


I'm using Fedora Core 1. I configured my system to work with the usb key by adding the following to /etc/fstab:

/dev/sda1 /mnt/usbkey auto defaults,noauto,user 0 0


However the device is very flaky. I can read from it fine, however when I try to write to the card I get a message saying the "destination disk is read-only." This usually occurs after I've already written data to the usbkey. But once it happens, it seems I can never write to it again.

As a workaround I've been formatting the card in Windows to fat16, and then I'm able to write to the usb drive again until the read only problem happens again. What is the command to format the usb drive in linux? I wold like to use FAT so I can use the usbkey in both Windows and Linux. Thanks.
 
Old 07-14-2004, 08:31 PM   #2
kilgoretrout
Senior Member
 
Registered: Oct 2003
Posts: 2,284

Rep: Reputation: 136Reputation: 136
Try changing your fstab entry to this:

/dev/sda1 /mnt/usbkey vfat umask=0,user,iocharset=iso8859-1,codepage=850,noauto,quiet 0 0

For formatting the device in linux, open a console and as root run:

# mkfs -t msdos /dev/sda1
 
Old 06-01-2006, 08:18 PM   #3
feight
LQ Newbie
 
Registered: Jul 2003
Location: Peoria, IL.
Distribution: Ubuntu Hoary 5.04 amd64 and Suse 10.0 x86_64
Posts: 3

Rep: Reputation: 0
Holy hand-grenade... thank you so very much. I had been trying to figure out how to make my 60GB iAudio X5 MP3 player work in linux since I had to reformat it.
I couldn't format it with anything but NTFS in Windows XP because XP will not let you format anything with more than 32GB of storage with anything else. I found Swissknife and used that... only to find that it worked but was using a variation of FAT that was not readable in Linux...
 
Old 10-10-2006, 11:39 PM   #4
bsurfin
Member
 
Registered: May 2004
Location: Kalispell Montana
Distribution: Kubuntu ( Current Version )
Posts: 112

Rep: Reputation: 15
Question, I have Slackware 10.2 and the 2.4.31 kernal, I even have my usb printer & Scanner working, Would
"/dev/sda1 /mnt/usbdrive vfat umask=0,user,iocharset=iso8859-1,codepage=850,noauto,quiet 0 0"
also work to setup a usb hard drive, and is that all I need to do to setup the device ? or what would you recommend ?

Last edited by bsurfin; 10-11-2006 at 01:29 AM.
 
Old 10-11-2006, 10:57 AM   #5
kilgoretrout
Senior Member
 
Registered: Oct 2003
Posts: 2,284

Rep: Reputation: 136Reputation: 136
/dev/sda1 should correspond to the device file for the FAT32 partition you are mounting on your usb hard drive. That's usually the case, but not always. For example, if you have a sata drive with a primary partition, that would be sda1, not you usb hard drive. In that case, your first primary partition on the usb drive would probably be sdb1. It really depends on how your system is set up hardware wise and how the external drive is partitioned. You also have to have the proper modules loaded to detect a usb mass storage device. I believe they are loaded automatically in slack 10.2.

To check all this out is pretty easy. With the external hard drive not turned on, open a console and as root run:

# fdisk -l

That will list all the partitions that your system recognizes whether mounted or not. Now connect and turn on your external usb hard drive. Give it a moment to spin up and rerun:

# fdisk -l

You should see the new printout for your external hard drive which will list the partition structure and device file designation for the drive. If not, post back; you probably don't have the necessary usb/scsi modules loaded. If you do see it, you can adapt the line I gave to correspond to the device file you want to mount on the external hard drive.
 
Old 10-11-2006, 10:03 PM   #6
bsurfin
Member
 
Registered: May 2004
Location: Kalispell Montana
Distribution: Kubuntu ( Current Version )
Posts: 112

Rep: Reputation: 15
I did fdisk -l just like you said, and it was there /dev/sda1 .
I added "/dev/sda1 /mnt/usbdrive vfat umask=0,users,iocharset=iso8859-1,codepage=850,noauto,quiet 0 0" to the fstab and I got an error message, something like /mnt/usbdrive does not exist, so I clicked on the /mnt directory, right clicked, created a new folder, renamed it usbdrive, I went back to system icon and clicked, and vioala it now works great, I tweaked permissions and It is now working perfectly !

Thanks for the help guys...
 
Old 10-12-2006, 08:22 AM   #7
bsurfin
Member
 
Registered: May 2004
Location: Kalispell Montana
Distribution: Kubuntu ( Current Version )
Posts: 112

Rep: Reputation: 15
As for the DVD+rw, it does not have an sda#, what would you suggest for that ?
 
Old 10-12-2006, 10:33 AM   #8
Xerop
Member
 
Registered: Jan 2004
Distribution: Suse, Red Hat
Posts: 129

Rep: Reputation: 15
use fat32 if possible I know both linux and windows support it.
fat in general is not a very stable system so properly dismount it after use.
 
Old 10-13-2006, 08:38 AM   #9
kilgoretrout
Senior Member
 
Registered: Oct 2003
Posts: 2,284

Rep: Reputation: 136Reputation: 136
Quote:
As for the DVD+rw, it does not have an sda#, what would you suggest for that ?
Not sure what you want or what your problem is. You may want to start a new thread as this one is two years old. The fstab entry for a cdrom or dvd writer in slackware usually looks like this:

/dev/hd* /mnt/cdrom auto noauto,user,ro 0 0

where "hd*" corresponds to the device file for the drive.
 
Old 10-13-2006, 07:44 PM   #10
bsurfin
Member
 
Registered: May 2004
Location: Kalispell Montana
Distribution: Kubuntu ( Current Version )
Posts: 112

Rep: Reputation: 15
That helps, thank you...
 
Old 05-05-2008, 12:10 PM   #11
firemankurt
LQ Newbie
 
Registered: Jul 2006
Location: Ferndale WA USA
Distribution: MEPIS 6
Posts: 20

Rep: Reputation: 0
USB drive mounts readonly

One of my USB drives started mounting read only no matter the system settings in kubuntu.

Did
Code:
fdisk -l
found that the partition table got messed up.
Code:
Partition 1 has different physical/logical endings
Backed up drive

reformated as FAT 32

Now work fine.

Hope this helps someone.
 
Old 12-31-2009, 10:21 PM   #12
michaelk
Moderator
 
Registered: Aug 2002
Posts: 11,531

Rep: Reputation: 674Reputation: 674Reputation: 674Reputation: 674Reputation: 674Reputation: 674
cdarrah010,
I have reported your posts to be moved to their own thread. Its best to start a new thread instead of posting a reply to an old one which is really unrelated to yours. Some flash drives like Imations are not partitioned and do not have a MBR or partition table. I own a couple of them and the output of fdisk -l looks basically the same. You should be able to mount the drive using /dev/sdc instead of /dev/sdc1. Is your drive automounting but it is read only?
 
Old 01-01-2010, 06:53 AM   #13
cdarrah010
LQ Newbie
 
Registered: Dec 2009
Posts: 14

Rep: Reputation: 0
I probably will have to repartition it.... How would i go about doing such a thing?

And yes it will automatically mount without having to touch the terminal

Last edited by cdarrah010; 01-01-2010 at 06:56 AM.
 
Old 01-01-2010, 06:55 AM   #14
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Slackware 14.0
Posts: 8,464

Rep: Reputation: 877Reputation: 877Reputation: 877Reputation: 877Reputation: 877Reputation: 877Reputation: 877
Quote:
I probably will have to repartition it.... How would i go about doing such a thing?
You can use gparted, should be included in your distro
 
Old 01-01-2010, 07:32 AM   #15
cdarrah010
LQ Newbie
 
Registered: Dec 2009
Posts: 14

Rep: Reputation: 0
i try to reformat to fat32 in gparted by clicking delete partition, then hitting New, clicking fat32 for the filesystem and hitting create. i get a error stating that it

could not create new fat32 file system >
mkdosfs -f32 -v -n "" /dev/sdc1
mkdosfs 3.0.3 (18 May 2009)
mkdosfs: unable to open /dev/sdc1

which i don't know why it would want to open it because it was just deleted by the system... I feel a little bit like windows was designed for noobs like me...lol
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
forcing a USB device to use usb-storage eantoranz Linux - Hardware 1 11-13-2004 07:44 AM
get USB storage device working under Mandrake 10.0 ditch* Linux - Hardware 6 09-29-2004 05:55 AM
Assign one USB-storage device to one device file Misel Linux - Hardware 1 08-28-2004 03:52 AM
Variables invloved with working camera/usb storage device connection jimdaworm Slackware 2 04-25-2004 11:12 AM
how can I mount this device: da0: <USB 2.0 Storage Device alkad_mzu *BSD 2 11-15-2003 06:15 PM


All times are GMT -5. The time now is 02:09 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