Jump to content

weird problem -> kernel panic & lost files


Guest christof
 Share

Recommended Posts

Guest christof

I was running a script that would create a photopage and does some conversions on jpegs, so my cpu was busy.

after about an hour my kernel just randomly paniked, I did not find anything in the logs

(neither kernel.log nor syslog, nor messages)

except that an anonymous ftp-connect happened about 5 minutes before that crash and that disconnected just before it.

I am running proftpd on Mandrake 9.1, P3 450.

 

After doing fsck on my partitions I was able to boot again, the problem is: several files are missing.

When I do: rpm -Va I get a lot of missing files...

How can I restore them? or just isntall them automatically? there are about 500 files missing...

 

As you can see I do not have a clue why this happened, the ftp-thing did not look like anything special, so I do not really think the crash is related to it.. its just an observation ;)

 

so far for my first question ;)

 

the second one:

I have several folders with rpm's that can be installed from my computer in the whole lan.

I update these folders regularily using wget.

The problem is: after a while the new and the old versions of teh rpm exist on my harddrive which is a waste of space...

How can I automatically keep the new rpm's and delete the outdated ones?

Link to comment
Share on other sites

After doing fsck on my partitions I was able to boot again, the problem is: several files are missing.

When I do: rpm -Va I get a lot of missing files...

How can I restore them? or just isntall them automatically? there are about 500 files missing...

reinstall the affected packages with "rpm -Uvh package"; that should be enough

 

btw many of them might be just dev files, so I guess that you shouldn't care about those ones.

the second one:

I have several folders with rpm's that can be installed from my computer in the whole lan.

I update these folders regularily using wget.

The problem is: after a while the new and the old versions of teh rpm exist on my harddrive which is a waste of space...

How can I automatically keep the new rpm's and delete the outdated ones?

There are many ways to do this, the first one that comes to my mind will depend on how you download them, plain wget or a script that uses wget. In the later case you can add some bits of code to compare the already downoladed packages with the new available ones, then after downloading each of the new ones you can remove the old version.

Link to comment
Share on other sites

Guest christof

As for now the downloading is just with plain wget which Iwant to change in order to delete the outdated files. But I do not think you got my question right (or I did not clarify it enough ;) )

The question was: how do I find out, which packkage is the newer one using a script?

 

 

and for the first one: I do not know, in what packages the missing files were in. Even if I knew that, I could not imagine reinstalling them by rpm -Uvh manually.. since it is a looongs list...

Is there a way to retrieve the version numbers and the name of the package from the rpms? using ls, grep, sort and cut for a comparison like that is probably not safe enough due to the differences in the naming convetniosn of each source...

Link to comment
Share on other sites

The question was: how do I find out, which packkage is the newer one using a script?

I knew which is the question, I just outlined what you should do.

 

To clarify a bit more, you can do something like this:

packagedate='rpm -qp --qf %{BUILDTIME}'



if [[ $(${packagedate} package_A) -lt $(${packagedate} package_B) ]];

then 

    echo package_A is older than package_B

else

    echo package_B is older than package_A

fi

 

When using/mudding with rpm files is always a good help to read the 'man rpm' page

 

and for the first one: I do not know, in what packages the missing files were in. Even if I knew that, I could not imagine reinstalling them by rpm -Uvh manually.. since it is a looongs list...

Is there a way to retrieve the version numbers and the name of the package from the rpms? using ls, grep, sort and cut for a comparison like that is probably not safe enough due to the differences in the naming convetniosn of each source...

no need to use complicated stuff, just read the man page (section query), you should find out what you are looking for

 

btw, to find missing files, the best way I know is (as root):

~# rpm -Va --nodeps --nomd5 --noscripts | grep missing | grep -v "/dev/" | tee missing_files.list

maybe using this way you'll notice that the number of missing files is a bit lower ;)

 

Then you can find out which packages have missing files by:

~# rpm -qf $(awk '{print $NF}' missing_files.list) | uniq

 

HTH

Link to comment
Share on other sites

After posting the above message I run the last two commands here in my system to check it. The results are:

 

187 missing files

 

which belong to only

 

12 rpm packages

 

After checking those files I've found out that _none_ of them are essential nor used by the programs I currently use, so doesn't deserve the effort of reinstalling those 12 packages (which, btw, is not such a big deal)

 

HTH ;)

Link to comment
Share on other sites

Guest christof

lucky you..

here there are files missing from about 150 packages

among them fonts, XFree, gcc, glibc

 

so I'll do teh two commandas up there and deinstall all packages that are listet with --nodepx and isntall them thereafter... hopefully tht'll work ;)

 

Edit:

thanks for your help.. now everything is woring again the way it should...

Link to comment
Share on other sites

  • 2 months later...
Guest christof

I wrote a script that does the work for me now..

using the software-sources from urpmi:

here it is:

 

The Problem is:

during the MDK 9.1-setup it runs out of space in the virtual root-file-system.

as a workaround I moved the /etc-folder to /mnt/setupetc which was on my harddrive - my real root partition and simply linked /etc to /mnt/setupetc

 

this solution has an issue - when finishing the setup it does not umount my root partition which is mounted in /mnt -> the filesystem gets corrupted

after repairing it there are some files missing that are important for the system to run

so i use this script to regain them...

 

well it would be here, if I knew how to past stuff from an aterm/eterm/xterm to opera..

Anyone who wants to see it send me an email please..[/code]

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...