LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Mandriva (http://www.linuxquestions.org/questions/mandriva-30/)
-   -   possible file system corruption (http://www.linuxquestions.org/questions/mandriva-30/possible-file-system-corruption-451672/)

beosmr.x 06-05-2006 12:56 AM

possible file system corruption
 
I use mandriva 2006. Since it doesnt shutdown properly after the background goes blue with the x cursor I just turn off the power and that's that. Then I restart the next day and all is good. Have been doing this for a year now. But today, something else happend. First message was in the console, mandriva didnt start as normal. I did the most obvious thing, 'startx' but I got cannot read the /tmp/.Xauthority . I did chmod 1777 /tmp but I got 'cannot do this, read-only filesystem' but obviosly my filesystem is NOT readonly. I also read that when you get the 'read only' 'cannot do this' is because of file system corruption, well I ran fsck and the result was:
/dev/volgroup00/logvol00: clean, 165780/14974976 files, 5773411/2992536 blocks

I searched web on this said deleted TEMP dir, but the temp dir is still there. This is the most closest thing I could find on the net that macthes ALL the symptoms I am having.

http://www.freelists.org/archives/ju.../msg00013.html
EXCEPT has nothing to do with PHP, as you can see.

So, what can I do. I can't start the xserver because /tmp/.Xauthority is read only which it wasnt before. My technical aptitude with linux is zero/10 so if I have to type something in make sure to spell it out completely.
Thanks, and this matter is of extreme urgency!!!

raskin 06-05-2006 01:52 AM

Could you post at least the message in the console? (maybe after another reboot) Looks like yourfile system wasn't mounted correctly and so is mounted in read-only mode.

beosmr.x 06-05-2006 09:31 AM

Quote:

Originally Posted by raskin
Could you post at least the message in the console? (maybe after another reboot) Looks like yourfile system wasn't mounted correctly and so is mounted in read-only mode.

How do I 'post the message' ? Its not like I can copy, the console output and then paste it into these forums.

raskin 06-05-2006 09:51 AM

Well, you can go to /var/log and find there some file (sys.log or messages or something) so you can post their contents (check for something private in logs, though it's not surely there). Also you can run 'dmesg > ~/log' and so ~/log will contain kernel messages. And explore /vsr/log/* , you can find there some files with fresh messages (modification time today) and post them.

beosmr.x 06-05-2006 06:21 PM

That would be nice to do except that I cant do anything to get the log files out of the hdd and have these on the forums can I?
Reasons:
The hdd is acting as 'read only' so the log files wont write in the first place. It would help a lot if people actually read and understand my question in the first place and someone who is an expert with linux find the answer to my question.

GlennsPref 06-06-2006 02:07 AM

You can copy and paste from the konsole just like any text file.

In fact it's a good way to log your own stuff, like addresses to config files and such.

It takes time to get good answers. You may try a search of this site for similar threads,

and remember the wiki and the tutes too.

Also, Google is your friend.

Emmanuel_uk 06-06-2006 02:24 AM

Quote:

It would help a lot if people actually read and understand my question in the first place and someone who is an expert with linux find the answer to my question.
It would help if you were patient with anybody helping you out of their free time.
It is not a helpdesk

Quote:

Thanks, and this matter is of extreme urgency!!!
See LQ rules

You can use lynx to access the internet in txt mode.
You can use a live distro to access the syslog

raskin 06-06-2006 02:49 AM

log files will contain last activity BEFORE crash. It may contain something, if a write-intensive process was running when you switched power off. And dmesg will almost certainly contain some information about reasons to mount read-only. Well, sorry for misleading >~/log, mount anything not corrupted (like flash). Also if you have gpm running (mouse in text mode) you can mount flash, cd to it, "cat >log" , scroll up with Shift-PgUp, select messages with mouse and then press right button - it will feed them to cat; press Ctrl-D afterwise. Also, try "mount / -o remount,rw" and post the output (preferably, again, "log" after "mount / -o remount,rw &>log" on writable media)

beosmr.x 06-06-2006 07:16 PM

delete this post

beosmr.x 06-06-2006 07:31 PM

Quote:

Originally Posted by GlennsPref
You can copy and paste from the konsole just like any text file.

In fact it's a good way to log your own stuff, like addresses to config files and such.

That would be very nice to do EXCEPT I CANT start X

Please if you don't have anything constructive to contribute don't even bother replying. I need serious support and if some members here don't know how to read my original post they shouldn't be answering in this thread!

Quote:

Originally Posted by raskin
log files will contain last activity BEFORE crash. It may contain something, if a write-intensive process was running when you switched power off. And dmesg will almost certainly contain some information about reasons to mount read-only. Well, sorry for misleading >~/log, mount anything not corrupted (like flash). Also if you have gpm running (mouse in text mode) you can mount flash, cd to it, "cat >log" , scroll up with Shift-PgUp, select messages with mouse and then press right button - it will feed them to cat; press Ctrl-D afterwise. Also, try "mount / -o remount,rw" and post the output (preferably, again, "log" after "mount / -o remount,rw &>log" on writable media)

Quote:

Originally Posted by beosmr.x
My technical aptitude with linux is zero/10 so if I have to type something in make sure to spell it out completely.

Quote:

Originally Posted by Emmanuel_uk
You can use a live distro to access the syslog

'syslog' , except I don't know where the 'syslog' in my mandriva 2006, and isnt syslog fairly generic, it could mean many many files that actually get logged. I took your suggestion and Im running from a live distro except now I need the instructions on how to get my 'syslog' .

gilead 06-06-2006 07:32 PM

raskin pointed out what was most likely the last thing to happen - something went wrong during boot (maybe even the previous shutdown, especially if you have to just power off sometimes). He also pointed out a way to get the information without typing it, by plugging in a flash drive and using the command line instead of the gui to get the info.

If you don't understand what he's saying, tell us that - don't complain how only an expert can help you. Only a psychic can help you until we see whether the logs contain information about why the file system is being mounted read only. It's been 2 days since this happened, even writing it out and typing it manually would have the info by now.

Please keep in mind that the people here aren't paid and support is provided while trying to deal with our own problems, lives, etc.

The syslog is usually in /var/log/syslog and/or /var/log/messages - if you've mounted your hard disk at /mnt/harddisk, look in /mnt/harddisk/var/log/syslog

beosmr.x 06-06-2006 07:52 PM

Quote:

Originally Posted by Emmanuel_uk
You can use a live distro to access the syslog

Okay, I went to mount hdb3 (which contains mandriva partition) to edit up the fstab file (unrelated other problem) from the kwikdisk applet from within MEPIS live CD and the task failed and came up with this error message dialog.
Code:

Called: mount /dev/hdb3
mount: I could not determine the filesystem type, and none was specified

While hdb1 and hdb2 were mounted trouble-free.

gilead 06-06-2006 08:08 PM

It may be that the file system needs checking. If you can't mount it with a command like the following (depending on what the file system is), it may need to have fsck run over it:
Code:

mount -t ext3 /dev/hdb3 /mnt/hdb3
mount -t ext2 /dev/hdb3 /mnt/hdb3
mount -t reiserfs /dev/hdb3 /mnt/hdb3
etc

The command to check the file system will be:
Code:

e2fsck /dev/hdb3
or
reiserfsck /dev/hdb3


beosmr.x 06-06-2006 08:39 PM

Quote:

Originally Posted by gilead
It may be that the file system needs checking. If you can't mount it with a command like the following (depending on what the file system is), it may need to have fsck run over it:
Code:

mount -t ext3 /dev/hdb3 /mnt/hdb3
mount -t ext2 /dev/hdb3 /mnt/hdb3
mount -t reiserfs /dev/hdb3 /mnt/hdb3
etc

The command to check the file system will be:
Code:

e2fsck /dev/hdb3
or
reiserfsck /dev/hdb3


Code:

mount -t ext3 /dev/hdb3 /mnt/hdb3
mount: wrong fs type, bad option, bad superblock on /dev/hdb3,
      missing codepage or other error
      In some cases useful info is found in syslog - try
      dmesg | tail  or so

Code:

e2fsck /dev/hdb3
e2fsck 1.39-WIP (31-Dec-2005)
Couldn't find ext2 superblock, trying backup blocks...
e2fsck: Bad magic number in super-block while trying to open /dev/hdb3

The superblock could not be read or does not describe a correct ext2
filesystem.  If the device is valid and it really contains an ext2
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
    e2fsck -b 8193 <device>

thanks for the fast reply. keep them up.

gilead 06-06-2006 09:17 PM

At this point, I'd recommend running e2fsck -b 8193 /dev/hdb3 unless you don't think the partition was ext2 or ext3 (I don't use Mandriva so I don't know what the default partition type is).

Knowing which superblock to use is the difficult part. If the value 8193 doesn't work (it's the default for 1k blocksizes), please try it with 16384 (2k blocksizes) or 32768 (4k blocksizes).


All times are GMT -5. The time now is 01:49 AM.