LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   /var/log/XFree86.0.log gone!!! (https://www.linuxquestions.org/questions/linux-newbie-8/var-log-xfree86-0-log-gone-227193/)

OC_eobard 09-06-2004 01:59 AM

/var/log/XFree86.0.log gone!!!
 
This morning my system wouldn't boot into Slackware. Actually I went into the partition from Mandrake and configured it to boot to console instead of X and it will do that but it won't run X. The reason /var/log/XFree86.0.log is gone, along with other files from that directory. Now I didn't delete them so I don't know what happened. My footing with Linux isn't that great yet. The solution as I see it is a reinstall but is there a command something like DOS's undelete that I can run from console to try to dig the files up from their graves? I'd prefer to figure out what went wrong and why so I can learn from this instead of doing a straight reinstall but I'm not sure where to start.

chii-chan 09-06-2004 07:50 AM

To undelete file you can try "debugfs" command. It works fine with ext2 file system, but it won't work with ext3 file system.

dsegel 09-06-2004 09:30 AM

All the files in /var/log are gone? Is you /var on a separate partition? Maybe it wasn't mounted properly.

Post your /etc/fstab here and the output of 'df -h'.

dsegel 09-06-2004 09:35 AM

BTW, X won't fail to start just because the log file is missing - it creates a new one every time you start it up. The log file will tell you why it won't start, however.

OC_eobard 09-06-2004 11:48 AM

Ok, I'm not using ext2 so I can't use debugfs.

Here's what "ls" -ing from the /var/log directory give me as output:

Quote:

nfsd:Permission denied
uucp:Permission denied
kdm.log:Permission denied
XFree86.0.log:Permission denied
samba:Permission denied
samba.smbd:Permission denied
XFree86.0.log.old:Permission denied
spooler.2:Permission denied
scrollkeeper.log:Permission denied
apache:Permission denied
cron.2:Permission denied
samba.smbmount:Permission denied
iptraf:Permission denied
secure.2:Permission denied
maillog.2:Permission denied
cron
cron.1
cups/
debug
debug.1
debug.2
faillog
lastlog
maillog
maillog.1
messages
messages.1
packages/
removed_packages/
removed_scripts/
scripts/
secure
secure.1
setup/
spooler
spooler.1
syslog
syslog.1
syslog.2
wtmp
wtmp.1
Keep in mind I'm logged in as root as I do this, so I don't know why the permissions aren't allowed.
Here's fstab:
Quote:

/dev/hda6 swap swap defaults 0 0
/dev/hda7 / reiserfs defaults 1 1
/dev/hda8 /usr/local reiserfs defaults 1 2
/dev/hda1 /win_c vfat defaults 1 0
/dev/hda5 /win_d vfat defaults 1 0
/dev/hda9 /drake1 ext3 defaults 1 1
/dev/hda11 /drake2 ext3 defaults 1 1
/dev/cdrom /mnt/cdrom iso9660 noauto,owner,ro 0 0
/dev/fd0 /mnt/floppy auto noauto,owner 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
proc /proc proc defaults 0 0
hda9 and hda11 are my Mandrake partitions, which I made accessible to Slack because Mandrake wouldn't install properly and I wanted access to all of the files from Slackware to help hunt down the problem. Everything else is pretty standard I'd say. I made the Mandrake partitions accessible days before I had the problem, I don't think that they are the cause of the trouble.
And finally, the result of df -h:
Quote:

Filesystem Size Used Avail Use% Mounted on
/dev/hda7 3.9G 2.6G 1.3G 67% /
/dev/hda8 2.0G 384M 1.6G 20% /usr/local
/dev/hda1 2.0G 676M 1.4G 34% /win_c
/dev/hda5 24G 7.3G 17G 32% /win_d
/dev/hda9 2.9G 147M 2.6G 6% /drake1
/dev/hda11 2.2G 1.3G 807M 62% /drake2
I should add that I didn't install any new components or software around the time the problem happened. If anyone has any ideas I'd be glad to hear them.

dsegel 09-06-2004 03:32 PM

OK, so it's not a partition problem. Those errore are strange. Try doing a

ls -al /var/log

when logged in as root and post the output here.

OC_eobard 09-06-2004 03:50 PM

Ok, here's the results, in two parts:

Part 1: I get the same errors (Permission denied) regarding the same things and in the same order.

Part 2:
Quote:

total 3047
drwxr-xr-x 13 root root 1168 Sep 4 23:50 ./
drwxr-xr-x 16 root root 496 Aug 15 00:07 ../
-rw-r----- 1 root root 0 Aug 9 04:40 cron
-rw-r----- 1 root root 0 Aug 6 04:40 cron.1
drwxr-xr-x 2 root root 48 Aug 25 2003 cups/
-rw-r----- 1 root root 16288 Sep 6 16:43 debug
-rw-r----- 1 root root 1468 Aug 9 04:11 debug.1
-rw-r----- 1 root root 5840 Aug 5 18:16 debug.2
-rw-r----- 1 root root 24 Sep 6 16:43 faillog
-rw-r--r-- 1 root root 292584 Sep 6 16:43 lastlog
-rw-r----- 1 root root 20114 Sep 6 16:43 maillog
-rw-r----- 1 root root 1183 Aug 9 04:12 maillog.1
-rw-r----- 1 root root 856236 Sep 6 16:43 messages
-rw-r----- 1 root root 67888 Aug 9 04:31 messages.1
drwxr-xr-x 2 root root 17648 Aug 7 18:26 packages/
drwxr-xr-x 2 root root 48 Oct 27 1998 removed_packages/
drwxr-xr-x 2 root root 48 Oct 27 1998 removed_scripts/
drwxr-xr-x 2 root root 12496 Jul 29 19:40 scripts/
-rw-r----- 1 root root 267 Sep 6 16:43 secure
-rw-r----- 1 root root 55 Aug 8 02:32 secure.1
drwxr-xr-x 4 root root 592 Aug 14 2003 setup/
-rw-r----- 1 root root 0 Aug 9 04:40 spooler
-rw-r----- 1 root root 0 Aug 6 04:40 spooler.1
-rw-r----- 1 root root 674473 Sep 6 16:44 syslog
-rw-r----- 1 root root 47110 Aug 9 04:17 syslog.1
-rw-r----- 1 root root 243621 Aug 6 03:04 syslog.2
-rw-rw-r-- 1 root utmp 726912 Sep 6 16:43 wtmp
-rw-rw-r-- 1 root utmp 377856 Aug 5 18:16 wtmp.1
When I'm running the commands I pipe the results to a text file on my 98 data drive so I can then post them up on the web from 98 but I've noticed that the error portions don't get included in the text file, they appear on the screen. Is that normal? shouldn't all of the information, error or no, be piped into the text file?

I don't have any reason to suspect my attempts to fix my bad Mandrake install are the cause of the problem, there's too much time between the last "tweak" i attempted and the first appearance of this problem, but I'm going to try to undo the last few things I did just in case. In the mean time if anyone else has any idea's I'm listening.

OC_eobard 09-06-2004 04:01 PM

...and no go. Undoing the last few things I did to try to get Mandrake up and running 100% had no effect on my Slackware problem.

dsegel 09-06-2004 04:57 PM

Quote:

Originally posted by OC_eobard
When I'm running the commands I pipe the results to a text file on my 98 data drive so I can then post them up on the web from 98 but I've noticed that the error portions don't get included in the text file, they appear on the screen. Is that normal? shouldn't all of the information, error or no, be piped into the text file?

That's actually a good clue - it means the parts you don't see are being issued as errors rather than as output.

When you pipe the output of a program it only sends the parts that are written to STDOUT (standard out) to the pipe; if you're seeing things onscreen that aren't being sent to the pipe then they are most likely being sent to STDERR (standard error). Both STDOUT and STDERR are printed to the screen when you run commands at the command line.

So one question (at least) is, what would give your errors like

Quote:

nfsd:Permission denied
uucp:Permission denied
when you use the 'ls' command?

Are you using any command aliases? Have you changed the standard path?

dsegel 09-06-2004 05:02 PM

Just in case it is a wierd permissions problem, try this:

Code:

chmod u+rw /var/log/*

OC_eobard 09-07-2004 01:33 AM

All of the specific files listed in the errors above give me another error:

chmod: failed to get attributes of 'var/log/(whatever)': Permission denied

I'd almost think it was my hard drive going on me but 98 performs rock solid and Mandrake is just as good as ever (which isn't saying much but at least the specific problems I've been having with Drake have remained consistent)

OC_eobard 09-07-2004 01:48 AM

I just had a thought...

Does Mandrake know how to handle reiserfs format? Could booting to Drake and then doing something as simple as reading the directory (which is reiserfs) from Mandrake (which I installed on an ext3 format partition) cack something up? Mandrake only gave me the option of ext2 or ext3 when I installed, if reiserfs wasn't on the list then it seems possible it was because the version of Mandrake I have (9.2) wasn't 100% compatible with it. If so could something as simple as listing the directory contents from console (or Konqueror in X) damage the system?

^Ok I was going to post that, but then I booted to Drake and ran diskdrake and it can tell the difference between ext3 and reiserfs, so I'm assuming that Mandrake knows the difference, but I'm not sure if Mandrake is 100% compatible so I figured I should post it just incase I'm on to something. I'm taking shots in the dark at this point. Still gonna keep trying though....

dsegel 09-07-2004 08:59 AM

It sounds like you have something corrupted in the filesystem.

Try this:

Code:

shutdown -Fr
That should reboot the system with a forced fsck check. If it's still messed up after that you may want to to rename /var/log to something else and then make a new /var/log. You may have to drop to runlevel 1 to do that.

OC_eobard 09-07-2004 11:16 AM

Forcing fsck didn't change anything. Got a link to a detailed explanation of the steps I'll need to go through to rebuild /var/log? I know how to change the runlevel, but I'd like to look at all of the stages I'd need to go through and why.


All times are GMT -5. The time now is 07:49 PM.