Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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.
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.
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:
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.
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.
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!
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:
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).
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.
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?
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
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!).
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.
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.