[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Running apt*, help needed



Dennis Wicks wrote:
> All info was given in previous posts. To reiterate, Debian 5.0,
> intel 32 bit 2 machines, identical, one works, one doesn't, gets
> segmentation faults and/or relocation error on every command.
> Mounted "bad" root on "good" machine, tried to do dpkg -i to install
> libraries for apt but get segmentation fault. What next??

This is one of those fiendishly tedious problems to fix.  I think we
are working off of the assumption that some critical file is corrupted
and that is causing your segfaults.  And it is preventing you from
simply correcting the problem.

You said you had another system that was virtually identical.  In that
case I would use rsync to copy my known good system files into the
known bad system.  But things really need to be compatible or your
system will be quite destroyed instead of quite repaired.

You have mounted the bad disk on the good system.  I would be paranoid
and try some manual tests first.  I would run md5sum across files in
/lib on both disks and then crosscheck that they are the same.  I
doubt they would be 100% the same but if they were mostly the same
then that would convince me that I have compatible systems.  But if
there were no matches at all then I would be suspicious that they are
not compatible due to versions, architectures, whatever.  Measure
twice and cut once.

If you are convinced that they are compatible and that they are truly
mostly identical systems then you should be able to rsync directories
from your good system to your bad and repair it.  I would do one
directory at a time and stop once the problem is solved.  I would
work through this list one directory at a time.

  /boot
  /lib
  /lib64
  /lib32
  /sbin
  /bin
  /usr/lib
  /usr/sbin
  /usr/bin
  /etc

Hopefully you won't need /etc copied because that will truly have
smashed your bad system.  At that point I would be thinking it is a
hardware problem.

Being paranoid I would work back up each directory before updating
it.  I would compare the differences between them.  The above list is
basically the entire system part of the system without any user data
portion of it.

Most likely one machine will have a package installed that isn't on
the other one.  The extra files won't really hurt but are untidy.
Later you could install and remove the package to cause a complete
cleanup.

A problem for copying between two systems will be differences in uid
numbers for non-root system users.  The root user is always id 0 but
other non-root system users will get assigned numbers particular to
your system in the order in which packages were installed.  One might
be 101 and another might be 102 and they might be flipped on another
system.  After a simply copy you should get a system that isn't
segfaulting but perhaps with a subsystem such as mail or cron or ntp
or something that isn't owned by the right uid on that system.
Keeping a list of all files that are not owner and group root:root so
that they can be reset later would be good.  You can reset the
ownership to the right uid later.

Good luck!

Bob

Attachment: signature.asc
Description: Digital signature


Reply to: