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
 
LinkBack Search this Thread
Old 09-06-2004, 01:59 AM   #1
OC_eobard
Member
 
Registered: May 2004
Distribution: Slackware 10.2, Ubuntu 6.10
Posts: 94

Rep: Reputation: 15
/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.
 
Old 09-06-2004, 07:50 AM   #2
chii-chan
Member
 
Registered: Sep 2003
Location: chikyuu (E103N6)
Distribution: Redhat 8.0 (2.4.25-custom), Fedora Core 1 (2.4.30-custom)
Posts: 357

Rep: Reputation: 30
To undelete file you can try "debugfs" command. It works fine with ext2 file system, but it won't work with ext3 file system.
 
Old 09-06-2004, 09:30 AM   #3
dsegel
Member
 
Registered: Aug 2004
Location: Davis, California
Distribution: Gentoo, always Gentoo.
Posts: 159

Rep: Reputation: 30
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'.
 
Old 09-06-2004, 09:35 AM   #4
dsegel
Member
 
Registered: Aug 2004
Location: Davis, California
Distribution: Gentoo, always Gentoo.
Posts: 159

Rep: Reputation: 30
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.
 
Old 09-06-2004, 11:48 AM   #5
OC_eobard
Member
 
Registered: May 2004
Distribution: Slackware 10.2, Ubuntu 6.10
Posts: 94

Original Poster
Rep: Reputation: 15
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.
 
Old 09-06-2004, 03:32 PM   #6
dsegel
Member
 
Registered: Aug 2004
Location: Davis, California
Distribution: Gentoo, always Gentoo.
Posts: 159

Rep: Reputation: 30
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.
 
Old 09-06-2004, 03:50 PM   #7
OC_eobard
Member
 
Registered: May 2004
Distribution: Slackware 10.2, Ubuntu 6.10
Posts: 94

Original Poster
Rep: Reputation: 15
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.
 
Old 09-06-2004, 04:01 PM   #8
OC_eobard
Member
 
Registered: May 2004
Distribution: Slackware 10.2, Ubuntu 6.10
Posts: 94

Original Poster
Rep: Reputation: 15
...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.
 
Old 09-06-2004, 04:57 PM   #9
dsegel
Member
 
Registered: Aug 2004
Location: Davis, California
Distribution: Gentoo, always Gentoo.
Posts: 159

Rep: Reputation: 30
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?
 
Old 09-06-2004, 05:02 PM   #10
dsegel
Member
 
Registered: Aug 2004
Location: Davis, California
Distribution: Gentoo, always Gentoo.
Posts: 159

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

Code:
chmod u+rw /var/log/*
 
Old 09-07-2004, 01:33 AM   #11
OC_eobard
Member
 
Registered: May 2004
Distribution: Slackware 10.2, Ubuntu 6.10
Posts: 94

Original Poster
Rep: Reputation: 15
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)
 
Old 09-07-2004, 01:48 AM   #12
OC_eobard
Member
 
Registered: May 2004
Distribution: Slackware 10.2, Ubuntu 6.10
Posts: 94

Original Poster
Rep: Reputation: 15
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....
 
Old 09-07-2004, 08:59 AM   #13
dsegel
Member
 
Registered: Aug 2004
Location: Davis, California
Distribution: Gentoo, always Gentoo.
Posts: 159

Rep: Reputation: 30
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.
 
Old 09-07-2004, 11:16 AM   #14
OC_eobard
Member
 
Registered: May 2004
Distribution: Slackware 10.2, Ubuntu 6.10
Posts: 94

Original Poster
Rep: Reputation: 15
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.
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Deleted /var/log/messages, can't log any files-iptables chingyenccy Linux - Newbie 7 02-27-2005 04:03 PM
Strange results in /var/log/apache/access.log subt13 Linux - Security 2 08-03-2004 01:21 PM
xstart: Cannot move old "/var/log/XFree86.0.log.old" linuxgamer09483 Linux - Newbie 2 02-18-2004 07:52 PM
pppd logging to /var/log/ppp.log problem mrtwice Linux - Software 1 01-10-2004 05:38 PM
iptables, changing log file from /var/log/messages acid2000 Linux - Networking 3 03-11-2003 08:38 PM


All times are GMT -5. The time now is 06:54 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration