LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 09-30-2007, 12:07 PM   #1
leprkhn
LQ Newbie
 
Registered: Dec 2006
Posts: 27

Rep: Reputation: 15
Read-Only file system


i have a 3GB USB stick.
A Patriot Exporter.
in windows i took and .iso image and extracted its contents to the USB stick. Everything worked fine (the stick ran just like the CD). Now, however, i would like to use the USB stick for something else.
The problem is... the stick is now write-protected.
windows just choked when i tried to do anything to it.
so i figured i'd be able to take care of it in linux.

i can't.

i've tried mounting it and deleting everything.
i tried fdisk, which tells me that it cannot write to the disk or the partition table.
i even tried shred /dev/sdb. and it tells me "failed to open for writing: Read-only file system"

i don't really know what else to do.
any suggestions?
 
Old 09-30-2007, 12:29 PM   #2
Peacedog
LQ Guru
 
Registered: Sep 2003
Location: Danville, VA
Distribution: Slackware, Windows, FreeBSD, OpenBSD, Mac OS X
Posts: 5,296

Rep: Reputation: 168Reputation: 168
Hi leprkhn, I've got a stick that actually has a slide lock similar to a floppy that "write protects" it. Could this be the case?
Good luck. ;-)

Last edited by Peacedog; 09-30-2007 at 12:30 PM. Reason: Forgot my usual greeting. ;-)
 
Old 09-30-2007, 12:33 PM   #3
leprkhn
LQ Newbie
 
Registered: Dec 2006
Posts: 27

Original Poster
Rep: Reputation: 15
ah right, i had thought the same thing.
unfortunately, unless the switch has been hidden well enough to elude my close inspection, that's not the case.

thanks though.
 
Old 09-30-2007, 12:33 PM   #4
SciYro
Senior Member
 
Registered: Oct 2003
Location: hopefully not here
Distribution: Gentoo
Posts: 2,038

Rep: Reputation: 51
Assuming the stick is plugged in and you can see its contents, what does the output of "mount" have to say about it?

Also, what does "ls -l /dev/sdb" have to say?
 
Old 09-30-2007, 12:38 PM   #5
Peacedog
LQ Guru
 
Registered: Sep 2003
Location: Danville, VA
Distribution: Slackware, Windows, FreeBSD, OpenBSD, Mac OS X
Posts: 5,296

Rep: Reputation: 168Reputation: 168
In addition to answering SciYro's post you might try this.

http://alien.slackbook.org/dokuwiki/...original_state

Good luck. ;-)
 
Old 09-30-2007, 12:43 PM   #6
SciYro
Senior Member
 
Registered: Oct 2003
Location: hopefully not here
Distribution: Gentoo
Posts: 2,038

Rep: Reputation: 51
No need to bother, if the results of what i requested come back as a expect (a read only iso filesystem, impossible to modify), then the only answer i think is to create a new filesystem for it, which your link explains nicely.
 
Old 09-30-2007, 12:44 PM   #7
leprkhn
LQ Newbie
 
Registered: Dec 2006
Posts: 27

Original Poster
Rep: Reputation: 15
ok
first off (if it matters) im running kubuntu.

when mounting:
<code>sudo mount /dev/sdb /mnt/hd</code>

it says:

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

ls -l returns:

brwxrwxrwx 1 root plugdev 8, 16 2007-09-30 10:07 /dev/sdb
 
Old 09-30-2007, 12:51 PM   #8
leprkhn
LQ Newbie
 
Registered: Dec 2006
Posts: 27

Original Poster
Rep: Reputation: 15
@peacedog:

the link you provided sounded like just the thing, but when i enter fdisk it still tells me that it will not be able to write to the partition table. this is the output from fdisk:

leprkhn@kubuntu:~$ fdisk /dev/sdb
You will not be able to write the partition table.

Command (m for help): p

Disk /dev/sdb: 4160 MB, 4160749568 bytes
128 heads, 62 sectors/track, 1024 cylinders
Units = cylinders of 7936 * 512 = 4063232 bytes

This doesn't look like a partition table
Probably you selected the wrong device.

Device Boot Start End Blocks Id System
/dev/sdb1 ? 98052 241891 570754815+ 72 Unknown
Partition 1 has different physical/logical beginnings (non-Linux?):
phys=(357, 116, 40) logical=(98051, 51, 11)
Partition 1 has different physical/logical endings:
phys=(357, 32, 45) logical=(241890, 104, 51)
Partition 1 does not end on cylinder boundary.
/dev/sdb2 ? 21257 265212 968014120 65 Novell Netware 386
Partition 2 has different physical/logical beginnings (non-Linux?):
phys=(288, 115, 43) logical=(21256, 30, 47)
Partition 2 has different physical/logical endings:
phys=(367, 114, 50) logical=(265211, 52, 42)
Partition 2 does not end on cylinder boundary.
/dev/sdb3 ? 235621 479576 968014096 79 Unknown
Partition 3 has different physical/logical beginnings (non-Linux?):
phys=(366, 32, 33) logical=(235620, 18, 30)
Partition 3 has different physical/logical endings:
phys=(357, 32, 43) logical=(479575, 39, 39)
Partition 3 does not end on cylinder boundary.
/dev/sdb4 ? 363620 363627 27749+ d Unknown
Partition 4 has different physical/logical beginnings (non-Linux?):
phys=(372, 97, 50) logical=(363619, 12, 25)
Partition 4 has different physical/logical endings:
phys=(0, 10, 0) logical=(363626, 11, 33)
Partition 4 does not end on cylinder boundary.

Partition table entries are not in disk order

Command (m for help)


looks a little goofy to me, but im a newb.
 
Old 09-30-2007, 01:05 PM   #9
Peacedog
LQ Guru
 
Registered: Sep 2003
Location: Danville, VA
Distribution: Slackware, Windows, FreeBSD, OpenBSD, Mac OS X
Posts: 5,296

Rep: Reputation: 168Reputation: 168
Did you follow the instructions in the link above?
Good luck. ;-)
 
Old 09-30-2007, 01:21 PM   #10
leprkhn
LQ Newbie
 
Registered: Dec 2006
Posts: 27

Original Poster
Rep: Reputation: 15
yessir i did follow the instructions in the link.


leprkhn@kubuntu:~$ sudo dd if=/dev/zero of=/dev/sdb bs=512 count=1
1+0 records in
1+0 records out
512 bytes (512 B) copied, 2.2349e-05 seconds, 22.9 MB/s
leprkhn@kubuntu:~$ sudo fdisk /dev/sdc
You will not be able to write the partition table.

Command (m for help): n
You must delete some partition and add an extended partition first

it goes downhill from there.

fdisk cannot delete partitions.
 
Old 09-30-2007, 02:24 PM   #11
AAnarchYY
Member
 
Registered: Sep 2004
Location: Carlisle, MA
Distribution: Debian 8
Posts: 419

Rep: Reputation: 30
try using a different partition tool, like cfdisk.
 
Old 09-30-2007, 03:14 PM   #12
leprkhn
LQ Newbie
 
Registered: Dec 2006
Posts: 27

Original Poster
Rep: Reputation: 15
cfdisk (a tool that i am totally unfamiliar with) also tells me that it cannot write to the disk.

ill have to read the man page i guess.
 
Old 09-30-2007, 03:27 PM   #13
Peacedog
LQ Guru
 
Registered: Sep 2003
Location: Danville, VA
Distribution: Slackware, Windows, FreeBSD, OpenBSD, Mac OS X
Posts: 5,296

Rep: Reputation: 168Reputation: 168
You could wipe the whole stick with dd then try using fdisk.

Code:
dd if=/dev/zero of=/dev/sdX conv=notrunc
Replace sdX with whatever your drive actually is.
Good luck. ;-)
 
Old 09-30-2007, 03:50 PM   #14
leprkhn
LQ Newbie
 
Registered: Dec 2006
Posts: 27

Original Poster
Rep: Reputation: 15
leprkhn@kubuntu:~$ sudo dd if=/dev/zero of=/dev/sdc conv=notrunc
Password:
dd: opening `/dev/sdc': Read-only file system
leprkhn@kubuntu:~$ fdisk /dev/sdc
You will not be able to write the partition table.


still not working.
thanks for trying though!
 
Old 09-30-2007, 04:09 PM   #15
Peacedog
LQ Guru
 
Registered: Sep 2003
Location: Danville, VA
Distribution: Slackware, Windows, FreeBSD, OpenBSD, Mac OS X
Posts: 5,296

Rep: Reputation: 168Reputation: 168
What happens if you remove the drive and reinsert it? You could try to remount it read/write.
Code:
mount -o remount,rw
Good luck. ;-)

Last edited by Peacedog; 09-30-2007 at 04:20 PM.
 
  


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
web server (fedora core 5) became read-only file system after i upload a file nggs8411 Linux - Server 1 03-26-2007 10:23 AM
How to read .chm file in fedora, can't mount ntfs file system ishti_du Linux - Newbie 12 03-06-2007 04:27 AM
'Read-only file system' when untar a tar.bz2 file yinglcs Linux - General 1 02-18-2006 10:12 PM
Read Only File System ptreves Linux - Newbie 1 10-24-2004 03:21 PM
Change from Read only to Read Write File System? justiceisblind Linux - Newbie 3 03-03-2002 08:23 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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