LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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 05-03-2004, 07:20 AM   #1
SaurianOverlord
LQ Newbie
 
Registered: May 2004
Posts: 6

Rep: Reputation: 0
Exclamation FAT32 partition ro...but not mounted ro


OK, i'm not a complete newb to linux, but i'm not certain where else to go with this one, so bear with me.

I recently installed Mandrake 10 Community (about a month ago) and have been very pleased with it so far. However, there is a problem with one of my FAT32 partitions on my second HD.

My first HD is all partitioned for linux, no FAT partitions. The second consists only of two partitions, both FAT32; the second partition works fine, and the first one was working until now. I'm suddenly denied write access, EVEN AS ROOT. File managers as well as terminal commands (such as 'rm') insist that the disk/file system is read-only. The partition is NOT mounted ro (i have checked mtab and fstab) and permissions should be giving full access to my user account. This happened suddenly...quite literally overnight, without rebooting or remounting (neither of those helped it, either). What gives?

Incidentally, my home directory seemed to have changed permissions as well, but simply changing them back as root seems to have fixed that problem. Could that be related, and how the bloody hell did this happen in the first place?

I really hope someone has an idea here. I'm going completely nuts searching for an answer.

~robert
 
Old 05-03-2004, 09:05 PM   #2
SaurianOverlord
LQ Newbie
 
Registered: May 2004
Posts: 6

Original Poster
Rep: Reputation: 0
fstab

In case people are thinking i'm either stupid or full of crap, these are the lines from my fstab file that pertain to my second drive, the FAT partitions.

/dev/hdb5 /mnt/win_c2 vfat umask=0,iocharset=iso8859-1,codepage=850 0 0
/dev/hdb6 /mnt/win_d2 vfat umask=0,iocharset=iso8859-1,codepage=850 0 0


As you'll note, both of these partitions are mounted with the exact same options. The second one works fine. The first one, hdb5 (win_c2), is the one i'm having trouble with. For example, the rm command reports:

rm: cannot remove `(filename)': Read-only file system

And, as i said, this happens as a user AND as root. I've been working on this for two days now and haven't gotten anywhere; i'll try anything i haven't already.

~robert
 
Old 05-26-2004, 09:11 PM   #3
.oOZe.
LQ Newbie
 
Registered: May 2004
Location: Vancouver, BC
Distribution: FC14
Posts: 16

Rep: Reputation: 2
Having similar trouble here.

The drive (single XP fat32 partition) belongs to a friend of mine who's computer would only reset every time windows tried to load...it would reach the Promise Ultra66 detection...detect the drives and reboot.

I originally booted into knoppix and ran testdisk to fix the damaged boot record and incorrect partition, mounted rw just fine then did a virus scan with fsav (1500+!! virii & backdoors cleaned) which seemed to fix things up.

Booted into XP Pro ...ran f-prot (dos based) anti-virus, found nothing more, did some clean up in HKCU../../Run and RunOnce etc...nothing drastic or system threatening. Ran Windows update, adaware and the like..all went well. Got his STB Bt878 TV tuner card working, which he was never able to do in XP..it took some searching to get operational. In other words, I spent quite a bit of time (4+ hours) working on the system and was monitoring traffic on my router/firewall coming to and from this box...nothing unusual.

Decided to run trendmicro's housecall virus detection as a last check before shutting it down. It found one more virus (of course I can't recall which one...damn). Went to sleep and when i woke up the system was locked up. Had to do a reset and XP complained of missing or corrupt C:/windows/system32/config.

This brings me to where i am now with the problem you mentioned.

I can mount the drive with the exact same fstab options and i get no complaint.
mount says:
Code:
/dev/hde1 on /mnt/hde1 type vfat (rw,umask=0,iocharset=iso8859-1,codepage=850)
I checked out /mnt/hde1/windows/system32/config and found some very unusual entries:

Code:
root@ttyp0[config]# ll -h
total 7.8G
-rwxrwxrwx    1 root     root         3.8G Nov 22  1937 ??????<?.m?
-r-xr-xr-x    1 root     root            0 Dec 23  2022 ??????i?.??t
-rwxrwxrwx    1 root     root            9 Jan  1  1980 ??.?
-rwxrwxrwx    1 root     root            9 Jan  1  1980 ??.?
-rwxrwxrwx    1 root     root            9 Jan  1  1980 ??.?
-rwxrwxrwx    1 root     root            9 Jan  1  1980 ??.?
-rwxrwxrwx    1 root     root         409K Jan  1  1980 <?8?<?8?.@??
-r-xr-xr-x    1 root     root            0 Dec 31  1979 ??l?x?t?.???
-rwxrwxrwx    1 root     root         512K May 26 04:55 AppEvent.Evt
-rwxrwxrwx    1 root     root          64K Nov 15  2002 SecEvent.Evt
-rwxrwxrwx    1 root     root         512K May 26 04:55 SysEvent.Evt
-rwxrwxrwx    1 root     root         512K May 26 04:55 default
-rwxrwxrwx    1 root     root          88K Nov 15  2002 default.sav
-rwxrwxrwx    1 root     root         6.2M Mar 17  1980 n.t
drwxrwxrwx    0 root     root            0 Jan  2  1980 q?o?????.???
-rwxrwxrwx    1 root     root         256K May 26 04:55 sam
-rwxrwxrwx    1 root     root         1.0K May 26 04:56 sam.log
-rwxrwxrwx    1 root     root         256K May 26 04:55 security
-rwxrwxrwx    1 root     root         1.0K May 26 05:09 security.log
-rwxrwxrwx    1 root     root          18M May 26 04:55 software
-rwxrwxrwx    1 root     root         616K Nov 15  2002 software.sav
-rwxrwxrwx    1 root     root         4.0M May 26 04:57 system
-rwxrwxrwx    1 root     root         380K Nov 15  2002 system.sav
drwxrwxrwx   14 root     root          16K Nov 15  2002 systemprofile
-rwxrwxrwx    1 root     root         2.1G Oct  8  1953 t.?b?
-rwxrwxrwx    1 root     root         2.1G Oct 23  1937 ?b?.?b?
I cannot move, delete or modify any of the files on this partition and
if i try to view, using less etc., any of the oddly named files in the above directory I get a read error.
As well using:

file n.t

for example, spits out:

n.t: ERROR: cannot read `n.t' (Input/output error)

Another thing that may be worth mentioning is that i inadvertently did:

fdisk /dev/hde1

instead of:

fdisk /dev/hde

and it reported:
Code:
Disk /dev/hde1: 27.4 GB, 27414825984 bytes
255 heads, 63 sectors/track, 3332 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

     Device Boot      Start         End      Blocks   Id  System
     /dev/hde1p1   ?       48437      119493   570754815+  72  Unknown
     Partition 1 does not end on cylinder boundary.
     /dev/hde1p2   ?       10501      131013   968014120   65  Novell Netware 386
     Partition 2 does not end on cylinder boundary.
     /dev/hde1p3   ?      116395      236907   968014096   79  Unknown
     Partition 3 does not end on cylinder boundary.
     /dev/hde1p4   ?      179626      179629       27749+   d  Unknown
     Partition 4 does not end on cylinder boundary.

     Partition table entries are not in disk order
athough I am not sure if this is just due to adding the "1" at the end that is messing with fdisk or if this is part of the problem.


Any clues here appreciated. A bit stumped on this one.

Thanks,
Greg
 
Old 05-26-2004, 09:29 PM   #4
SaurianOverlord
LQ Newbie
 
Registered: May 2004
Posts: 6

Original Poster
Rep: Reputation: 0
finally, a reply

I don't seem to have the same situation with the wierd filenames on that partition, and i haven't seen what fdisk says about it. But yes, we're definitely dealing with the same issue here.

I was beginning to wonder if i was the only one who would ever have this problem. I haven't solved it yet, so i'm really hoping someone comes up with an idea. Pretty soon i'm just going to back up the important stuff and reformat the partition, if i even can (it might not let me do that either; i'd try repartitioning but only as a last resort, as i'd be incredibly upset if the other partition on that drive was lost).

The strange thing is that i'm now running Mandrake 10.0 Official (instead of Community), and completely reinstalled Mandrake on my primary drive, including my home directory. It didn't change a f***ing thing about that partition.

Running out of ideas...someone, please, tell me this can be fixed!

Last edited by SaurianOverlord; 05-26-2004 at 09:35 PM.
 
Old 05-27-2004, 06:12 PM   #5
.oOZe.
LQ Newbie
 
Registered: May 2004
Location: Vancouver, BC
Distribution: FC14
Posts: 16

Rep: Reputation: 2
this is bizarre...both dos and winxp recovery console cannot read this disk at all.
I am currently running spinrite on the drive to check for defects....19 hrs to go.

Google is turning up nothing but questions...no solutions so far.


BTW...DON'T try using FIXBOOT in Windows recovery console...It created a 8Mb "FAT12"
partition....very useful!
 
Old 05-27-2004, 06:59 PM   #6
mcd
Member
 
Registered: Aug 2003
Location: Denver, CO
Distribution: CentOS, Debian
Posts: 825

Rep: Reputation: 33
since no one else seems to be responding, maybe I can help you narrow it down. try a couple things...

post the output of these three commands

ls -al /mnt
ls -al /mnt/win_c2
ls -al /mnt/win_d2

which should show exactly what permissions the files have (it's possible the permission for /mnt itself got changed, or /mnt/win_c2, etc), which might help give us a clue what to try next.

also, you could try editing your /etc/fstab like this:

/dev/hdb5 /mnt/win_c2 vfat defaults,user,umask=000 0 0

this is what i use for my fat32 drive, and it's worked for me. i understand that yours used to work no problem, but it's worth trying a new method just to help narrow down the problem. (needless to say, once you edit fstab, umount and mount again).
 
Old 05-27-2004, 07:03 PM   #7
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Also, please submit the output of the mount command. Just typing mount with no options will list all of the mounted devices and how they are mounted.

Try unmounting it and mounting it using the diskdrake program. You need to run it as root. Su to root then enter diskdrake or execute kdesu diskdrake.

Last edited by jschiwal; 05-27-2004 at 07:06 PM.
 
Old 05-29-2004, 10:06 AM   #8
.oOZe.
LQ Newbie
 
Registered: May 2004
Location: Vancouver, BC
Distribution: FC14
Posts: 16

Rep: Reputation: 2
Thanks, but I had already done permission/ownership checks and all seemed fine.
As well, mount was listing essentially the same thing as I was putting in /etc/fstab,
and indicated 'rw' status. I even tried using chattr -i on a few files to no avail.

Tried it without the Promise Ultra66 controller, just using the onboard IDE,
under Suse9 instead of Knoppix, mounted as a slave instead of master and
on another linux box...same thing.

However, I have to get this system back up and running so I just dumped all the
data my friend wanted to keep..only a few lost documents.. and zeroed the disk
using the Maxtor/Quantum disk utility, which BTW, reported no problems with the
disk, partition, cables et al and passed a full disk test...Spinrite tests passed too.
As well ran an 8hr Memtest which came out clean.

Strange problem, hopefully you have some luck finding a way around this. I have
run out of time myself.

Thanks to all,
Greg
 
Old 06-12-2004, 02:58 PM   #9
shorty_boy
Member
 
Registered: Oct 2003
Location: Oak Harbor, WA
Distribution: Debian Unstable
Posts: 94

Rep: Reputation: 16
Damn windows XP hardcrash

well i have an ati all in wonder card and i noticed that when i watch tv for an extended period of time, windows locks up and crashes super hard. WEll this last time windows crashed, and then my hdd started clicking on and off. No, when it satys on, neither windows nor linux can detect the hdd (windows says that it needs to be reformatted, linux says it canno mount due to the unknown file system). This happened with another harddrive of my that also crashed hard due to long tv hours, but it never cut off and on like this one, it just clicked. So here is my set up
I run win xp pro(separate hd *master*in ntfs) and fedora core 1(separate hd *master* in ext 3) and 100gig (separate hd *slave* in fat32 aka vfat). AS u can see i have an elaborate setup. i have a hotswap bay that i shuffle the masters with and i have one hdd that stays in the comp. it is my go between with linux and win. i use it so that incase lin or win goes, my stuff will still be there. but as you see i cannot. So i have another question:
Is it possible to use fdisk to create an new partition table. Wouldn't that fool the os into thinking that the hdd is fromatted into that file system? i am not an expert with fdisk so that is why i am asking. i have 30+ gigs of stuff (15gigs of irreplaceable stuff) and it would be nice if i could salvage it before i send the hdd in to get it replaced (i used the westerndigital data life stuff and it said that the disk fail..so it is underwaranty, but first i have to backup my stuff!).
Can ne 1 help us?
 
Old 06-12-2004, 03:34 PM   #10
.oOZe.
LQ Newbie
 
Registered: May 2004
Location: Vancouver, BC
Distribution: FC14
Posts: 16

Rep: Reputation: 2
I don't think fdisk will help with that...although not positive.
I would use testdisk
You can search for and recover lost partitions and replace bad boot records with a backup
or create a new one etc. You can even browse the directory structure of found partitions
to be sure you have the right one.
There are examples (highly recommended!!) on the site which are quite easy to follow.


Good luck
Greg

edit: I would recommend using the linux version as opposed to the DOS version....i tried it once and it crapped out...the linux version has always worked well for me

Last edited by .oOZe.; 06-12-2004 at 03:36 PM.
 
Old 06-12-2004, 04:02 PM   #11
SaurianOverlord
LQ Newbie
 
Registered: May 2004
Posts: 6

Original Poster
Rep: Reputation: 0
on a different box, even?

On a different box...slave instead of master...all those other methods of connecting, and you got the same thing?? Of course, clearly, with multiple OSes treating it the same way, it must be a problem with the disk itself. But i'm glad to at least hear that completely nuking the disk will do it...hopefully i can get away with just formatting the partition.

Before i mention my latest results as requested, i should explain that when i upgraded (actually, a reformat and new install) Mandrake, it did change the names of my FAT mount points from win_c2 and win_d2 to win_d and win_e, respectively.

I had looked at "mount" output before. It states that hdb5 is mounted on win_d with the same options that are in my fstab file (see my second post). After unmounting and mounting using diskdrake, it simply says it is mounted with "(defaults)," which i'm assuming is the same thing (remounting didn't change anything, either).

However, "ls -al" did report something different. For win_e, it lists all the directory permissions as "drwxrwxrwx," whereas on win_d it lists them as "drwxr-xr-x." So is this some sort of permissions issue after all? If so, how do i change them? I've already tried every way i know of; attempts return the error that permissions can't be changed due to it being a "read-only filesystem," same as when i try to delete a file.

Hopefully this will tell somebody something. I'm getting more and more confused by this, and i really miss having that partition available (that's one of my big chunks of free space!).

~robert
 
Old 06-16-2004, 05:12 PM   #12
SaurianOverlord
LQ Newbie
 
Registered: May 2004
Posts: 6

Original Poster
Rep: Reputation: 0
solution! (almost)

Well, it's more extreme than i would have liked, and it's still not completely fixed, but...

I backed up everything important to a DVD+RW and fired up diskdrake. Deleted the partition, created a new one, formatted, mounted. Still can't change permissions with chmod. BUT, i can write to the partition as root now!

So, the problem is even more weird and frustrating now, but at least i can use it in the meantime. If anyone has any more ideas, i'd really appreciate them.

~robert
 
Old 06-16-2004, 09:56 PM   #13
Electro
LQ Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
You can use gpart and sfdisk to recreate the partition tables. Before you use these programs on the main drive, I suggest making an image first and then try it out on the image. Use gpart to guess the partitions and what sectors do they use. Then use sfdisk to reconstruct the partition table from the information that gpart gave you. Though gpart works best if there is only one partition and it is a primary partition.

To write to the drive, make sure the directory can be written by everybody before you mount a drive to it. Either 666 or 777.

You may want to run scandisk on the healthy partition. You could have corrupted data on that partition.

You may want to try data recovery programs. I found PC Inspector File Recovery from Convar, but you need Windows.

The possiblity of getting your files back is about 1% because you have changed the hard drive. It could not hurt to try.

After you are done, zero out the whole entire drive a few times using dd in Linux.
 
Old 06-17-2004, 05:13 PM   #14
shorty_boy
Member
 
Registered: Oct 2003
Location: Oak Harbor, WA
Distribution: Debian Unstable
Posts: 94

Rep: Reputation: 16
Talking thanks oooze

man, i recommend testdisk. it restored my partitions and nothing is missing...yay
 
Old 06-17-2004, 06:34 PM   #15
SaurianOverlord
LQ Newbie
 
Registered: May 2004
Posts: 6

Original Poster
Rep: Reputation: 0
fixed.

Wouldn't you know it, that actually worked. I couldn't do that before either for some reason, so i didn't think to try it. But changing the permissions before mounting has apparently fixed the problem. I won't be surprised if i have to do it every time i reboot (even though that should have nothing to do with it), but it's good enough for now.

Anyway, like i said, i backed everything up, so i'm not concerned with whether or not i can recover anything (which i surely can't after repartitioning and using the partition again). I did scare the crap out of myself when i couldn't see anything on the other partition on that drive (27GB of MP3s...yikes!); imagine my relief when i realized diskdrake had unmounted it while changing the first partition, and hadn't remounted it.

diskdrake did report an error when i first attempted to simply resize the partition, but i can't remember what it was. Hopefully it's irrelevant now, but if it comes up again, i'll post it.

Thanks for all suggestions; i'm glad this is finally fixed.

~robert
 
  


Reply



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
Mounted read-write Fat32 partition suddenly becomes read-only?? hohead Linux - General 8 04-05-2007 12:17 PM
NTFS partition cannot be mounted after converting from FAT32 aweir14150 Mandriva 5 01-27-2005 03:11 PM
problem executing scripts on mounted fat32 partition roald Linux - General 8 06-14-2004 06:02 AM
Making mounted FAT32 partition writable by all jrittvo Fedora 14 06-07-2004 02:39 AM
permissions and mounted fat32 partition ianunderwood Linux - Newbie 8 06-25-2003 05:17 AM

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

All times are GMT -5. The time now is 10:09 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
Open Source Consulting | Domain Registration