LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   My son is innocent! (https://www.linuxquestions.org/questions/slackware-14/my-son-is-innocent-382988/)

mjjzf 11-16-2005 10:52 AM

What do the sensors say about your temperature? Try doing
cat /proc/acpi/thermal_zone/THRM/temperature
- doesn't have to be as root. If the temperature is already at a high level, updatedb could be the thing that would put it over the edge.

Seiken 11-16-2005 11:02 AM

cat: /proc/acpi/thermal_zone/THRM/temperature: No such file or directory
~$ cd /proc/acpi
-bash: cd: /proc/acpi: No such file or directory

:(

piete 11-16-2005 12:06 PM

Alrighty then, let's have a look at this. For expediency's sake, I shall give you the commands and tell you precisely how to use them, but i would have a look at the man pages for them, too, to double what we're gonna do =)

First off, a manual disk check:

1. I do manual checks (when necessary) from a boot disk (you can use disk 1 of your Slackware system for our purposes), but I feel sure you should be able to do it from within the system. Anyway, it doesn't hurt using a boot disk, since you'll be checking the root partition, and you don't really want it mounted at the time anyway.

2. Boot Slack disk1, you should find yourself at a console. The command you need is `fsck`. fsck itself is only a frontend to the other file checkers, check the man pages to be sure you know what you're after. I'll run through an example, below.

Because I don't know what filesystem you're using or how your box is set up, I will make the assumptions that you're using ext2 and your root partition is /dev/hda1. It should cover the basics enough to get you started, at any rate. If you need more help, we can cross that bridge when we get to it.

The filesystem check on ext2 is called either `fsck -t ext2`, `fsck.ext2` or it's actual binary `e2fsck`. I wil be using e2fsck, which has it's own associated man-page, and you won't get too confused then, I hope ;)

The commands that are used to check consistency in the boot scripts can be found in /etc/rc.d/rc.S .

3. We want to check a disk for errors and attempt recovery on any errors we find.

Code:

      #e2fsck -pccfkv
I highly recommend you `man e2fsck` to see what I'm doing; but basically we're running a badblock checker, in verbose mode, that will attempt to automatically fix any errors.

Please please please, if anyone knows better - tell me! I would be happy running this on my machine, but, I don't wanna wreck someone elses!

Secondly, reinstallation (and location!) of updatedb

Basically, `cat /var/log/packages/* | grep updatedb` will get you the location of updatedb, but ... i always found that a bit of a pain, so I adapted it and turned it into a script:

Code:

#!/bin/bash

for nfile in $1
do
        if [ -f "$nfile" ]
        then
                if [ `cat $nfile | grep $2 | wc -l` -ge 1 ]
                then
                        echo "Found in ${nfile}:"
                        cat $nfile | grep $2
                fi
        fi
done

This copy that into a file (I call mine "findme") and then run it like this:

Code:

      #findme "/var/log/packages/*" updatedb
It'll return something that looks like this:

Code:

piete@Melchior:~$ scripts/findme "/var/log/packages/*" updatedb
Found in /var/log/packages/dcron-2.3.3-x86_64-1:
dcron: with cron, such as the nightly indexing with updatedb.
Found in /var/log/packages/slocate-2.7-x86_64-1:
etc/updatedb.conf.new
usr/man/man1/updatedb.1.gz

So, I reckon you need to reinstall the slocate package (uhm, please ignore the fact that I'm using a 64-bit machine, you want to reinstall slocate-i486) to fix updatedb.

I hope I've covered everything you need to set you straight, but you know where we are if you need additional help!

Good luck, and I hope to hear you're problems are all gone next time I read a message from you ;)
- Piete "Oh no not another essay" ...

=D

folkenfanel 11-16-2005 05:50 PM

two crazy things
 
Hi there

First, my mother at a version i am forbidden to say (but it's over 40) keeps crashing Windows in a cybercafe. It doesn't happen in Linux.

My girlfriend does crash everything at version 23.6 ;)

Second, you should think about installing a video camera in front of the monitor and record everything. (this is what i would do). I did it, indeed, and I found interesting things ;)

May the Force be with you!

Seiken 11-16-2005 09:34 PM

I use reiserfs.. I read the man page for reiserfsck, and it suggested I run reiserfsck --check --logfile check.log /dev/hda2 (since hda2 is where my / is located.)

Now, what I don't understand is how I'm supposed to write a logfile when booting from CD. But anyway, that doesn't even matter because I booted from Slack CD1 and ran reiserfsck --check /dev/hda2 (no logfile) and it told me it couldn't see a reiserfs superblock or something like that, and wanted me to run with the --rebuild-sb option. Before doing that, I figured I should probably ask about it on here first.

piete 11-17-2005 07:18 AM

Having a squint at the reiserfsck man page it doesn't appear that --rebuild-sb is inherantly destructive. I know I would be happy running it, but again, it's not my box and I don't run reiserfs =/

Not stunningly robust, but this little script will backup some of your config files.
http://www.kaear.co.uk/linux/sysbackup.sh

If i recall correctly, edit the SAVE variable in the script to point to where you want stuff saved (because it destroys the directory to empty it, make sure you give it a path that DOES NOT already exist) then run it with `sysbackup.sh --backup`.

For a more complete backup, copy /etc, any configs you've editted outside of /etc, and any MySQL databases you have out of / and somewhere more secure.

I reckon there's a 95% chance that there's nothing wrong with your filesystem (although why it can't find a valid superblock is a bit of a worry) and there's some other problem with your box, but, there's always that 5% chance that there is something else wrong and you risk loosing data.

I'm not trying to be a scaremonger, just trying to warn you of possibilities.

If you've got everything backed up and safe to mess with, then, give the --rebuild-sb a go.

- Piete.

chrisortiz 11-17-2005 11:17 AM

do you have your slackware boot disk handy?

reboot with that and run fsck with your root mounted as read-only


btw, i'm with Dr. Phil and Nurce Nacy on this one


Quote:

First of all, A 2 year old should NEVER EVER be left to run around and do whatever they want!!!!!!!!!!!!!!!!!
use duct tape and Nyquill, but when they get around version 4.3 they develop an immunity to both.

Seiken 11-17-2005 11:48 AM

Hey folks,

So here's what happened... I booted from the Slack 10.2 Install Disc 1, and tried "reiserfsck --check /dev/hda2" again. For whatever reason, it worked this time. It ran a check and told me that I had 5 fatal errors that would only be corrected with the --rebuild-tree option. So I bit down and ran "reiserfsck --rebuild-tree /dev/hda2." It ran its course, said it corrected all the errors, and returned me to my # prompt. I ejected the Slack CD, and gave the 3-finger salute. The PC booted just fine! I installed the slocate package, ran a "touch /var/lib/slocate/slocate.db" and then an "updatedb" and it all worked.

So if this happens again, it'll probably be time to replace this old 20 GB hard drive.

Thanks for all the help guys. I learned stuff!

mjjzf 11-17-2005 03:11 PM

As a final comment, I would like to commend people for this discussion - very good advice, very good encouragement, ending up with a good solution. That is what makes this community no. 1.


All times are GMT -5. The time now is 10:36 PM.