LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 03-24-2007, 03:19 PM   #1
tallmtt
Member
 
Registered: Jun 2005
Location: Georgia, USA
Distribution: Arch, Gentoo, Ubuntu
Posts: 91

Rep: Reputation: 15
I need to reformatt a usb that gives me: Read-only filesystem


I am coming to believe my problem is unique!

I was given a usb disk (64mb) by an organization. They were jerks and modified it slightly.

When you insert it in linux, it is automatically loaded as 2 disks (usb1, usb2) where usb1 is a directory with a piture, Autorun.inf, and a binary file called browserrun.exe. In windows this partition loads automatically as a cdrom and displays the picture. I want to remove the partition.

I umount the partition and fdisk it (fdisk /dev/sda) and I get:

"You will not be able to write the partition table."

and the message is correct

I have tried remounting with " -o rw " but get the message:

"mount: block device /dev/sda is write-protected, mounting read-only"

The filesystem is vfat.

Please help me!!! I just want to delete the partition and enlarge the other one.
 
Old 03-24-2007, 03:34 PM   #2
uselpa
Senior Member
 
Registered: Oct 2004
Location: Luxemburg
Distribution: Slackware, OS X
Posts: 1,507

Rep: Reputation: 46
USB disks often have some kind of button which you can push or slide to write-protect them.
 
Old 03-24-2007, 10:21 PM   #3
tallmtt
Member
 
Registered: Jun 2005
Location: Georgia, USA
Distribution: Arch, Gentoo, Ubuntu
Posts: 91

Original Poster
Rep: Reputation: 15
Thanks for your quick reply, this particular usb disk does not have a switch. In fact, the one partition loads up read-only, and the other loads up read-write.

thanks anyways - Any other ideas???
 
Old 03-24-2007, 10:58 PM   #4
Junior Hacker
Senior Member
 
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687

Rep: Reputation: 59
Stick the USB drive in, it should show up in fstab or if you have KDE you may also have kdiskfree which will tell you which device it is, such as /dev/sda if you have ATA hard drive, /dev/sdb if you have one sata drive. Once you know which device it is, even if it says /dev/sda1 and /dev/sda2 for the two partitions, you know it is /dev/sda.
From a terminal, you can use dd to wipe it with zeros, then you will need to re-partition and re-format.

dd if=/dev/zero of=/dev/sda conv=notrunc

This should wipe all info including write protection and MBR.

Last edited by Junior Hacker; 03-24-2007 at 11:06 PM.
 
Old 03-24-2007, 11:47 PM   #5
tallmtt
Member
 
Registered: Jun 2005
Location: Georgia, USA
Distribution: Arch, Gentoo, Ubuntu
Posts: 91

Original Poster
Rep: Reputation: 15
That sounds promising, I tried a dd command I found earlier and it did not work. Will try it in the morning.

The one reservation I have is that it loads up with under two devices (sde, sdf1). It is the sde that is the problem. I think if I can wipe it, I will be able to do what I need to with the drive - so I'm crossing my fingers

Thanks, I will update my results.

Last edited by tallmtt; 03-24-2007 at 11:50 PM.
 
Old 03-25-2007, 12:16 AM   #6
Junior Hacker
Senior Member
 
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687

Rep: Reputation: 59
lol!

That put me in a spin, it's listing it as two different devices, not two partitions. There must be some customizing in the MBR.
 
Old 03-26-2007, 05:31 PM   #7
dracolich
Senior Member
 
Registered: Jul 2005
Distribution: Slackware
Posts: 1,173

Rep: Reputation: 47
Sounds to me like one of the "smart" drives, like U3. If that's the case the only way to remove the read-only partition is with a format utility that you should be able to get from the disk vendor's website. Also, in this case only the first partition would be read-only. The second partition should be able to mount as read-write and have all but a few MB of the total capacity.
 
Old 07-09-2007, 11:09 AM   #8
tallmtt
Member
 
Registered: Jun 2005
Location: Georgia, USA
Distribution: Arch, Gentoo, Ubuntu
Posts: 91

Original Poster
Rep: Reputation: 15
I don't know anything about "smart" drives, but with prices so low this "free" usb drive of only 64MB is too annoying to keep messing with. Thanks for all of your help
 
  


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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I have: Root has Read-Write, user has read only for the boot filesystem? xmrkite Linux - Software 6 10-16-2008 04:31 AM
Read-Only filesystem kahnakha Slackware 10 04-21-2007 07:09 AM
read only filesystem lardino Linux - Newbie 17 08-11-2004 06:22 AM
read-only filesystem the_gorf Red Hat 1 06-29-2004 11:27 PM
how do I change the filesystem from read-only to read-write? les_chow Linux - Newbie 5 05-26-2004 03:14 PM


All times are GMT -5. The time now is 05:59 PM.

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