Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I have two machines. One of which started to act strange lately (aptitude segfaulting, apt requiring a library named lkbm.qo.6). As the broken machine is not vital to me, I don't want to squash and reinstall it from scratch, but to investigate the problem however long it takes.

So, I have second machine thats acting fine so I would like to scan all installed packages on the broken machine and have the libs hash checked against the good ones.

Of course I can write a script for that, but I wanted to be sure that nobody else has solved that already.

The point is that I don't trust the broken machine. While it being intruded by an outsider is unlikely in this situation I would love to have a solution that would work even then.

(I'd love to add a validation tag, but could not find one.)

share|improve this question
    
Have a look here: askubuntu.com/questions/9463/… –  goldilocks Jan 8 at 12:22
    
@goldilocks but debsums itself may be somehow compromised on the misbehaving machine. –  Joseph R. Jan 8 at 12:26
    
@JosephR. but it's easy to check debsums offline (on a known-to-be-good machine) –  umläute Jan 8 at 20:16
    
@umläute Interesting. Can you please elaborate? –  Joseph R. Jan 8 at 20:24
    
@umläute would you care to add the approach to use debsums offline as an answer? Sounds like exactly what I want to do. –  Angelo Fuchs Jan 9 at 9:07

1 Answer 1

If you want, for example, check md5sum for all file in /bin, you can:

  • mount you /bin dir from broken machine into the good machine and then run a check with executables on the good machine.

Example:

for i in `ls /mounted/bin` 
        do
        md5sum /bin/$i >> broken.txt
        done

for i in `ls /bin` 
        do
        md5sum /bin/$i >> good.txt
        done

cmp broken.txt good.txt

But i'm not sure that this is what you are asking for....

share|improve this answer
    
Good approach. Unfortunately the two don't run the same system (debian squeeze vs. debian wheezy) So using my own md5sums won't work. –  Angelo Fuchs Jan 8 at 18:42
    
Could you create a virtual machine? –  maurelio79 Jan 9 at 17:19
    
Yes, but I'd rather use md5sums from the package system. –  Angelo Fuchs Jan 10 at 8:24

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.