FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo User

 
 
LinkBack Thread Tools
 
Old 02-12-2010, 06:55 PM
Alan Mackenzie
 
Default How should I clean up my broken system?

Hi, Gentoo!

As reported in other threads, my new PC had a broken RAM stick in it.
As a result, an unknown proportion of installed binaries are flaky. One
non-functioning binary is probably GCC.

What I'd like to do is reinstall every binary, yet without erasing any
configuration info, whose creation was so arduous.

Where does portage keep it's list of installed packages? What do I have
to do to persuade portage it has _no_ installed packages before doing
'rm -rf *' in /bin, /sbin, /usr/bin, /usr/sbin?

Has anybody any other tips to offer me for this operation?

--
Alan Mackenzie (Nuremberg, Germany).
 
Old 02-12-2010, 06:55 PM
Volker Armin Hemmann
 
Default How should I clean up my broken system?

On Freitag 12 Februar 2010, Alan Mackenzie wrote:
> Hi, Gentoo!
>
> As reported in other threads, my new PC had a broken RAM stick in it.
> As a result, an unknown proportion of installed binaries are flaky. One
> non-functioning binary is probably GCC.
>
> What I'd like to do is reinstall every binary, yet without erasing any
> configuration info, whose creation was so arduous.
>
> Where does portage keep it's list of installed packages?

/var/db/pkg

> What do I have
> to do to persuade portage it has _no_ installed packages before doing
> 'rm -rf *' in /bin, /sbin, /usr/bin, /usr/sbin?

--emtpytree

>
> Has anybody any other tips to offer me for this operation?

tar up /etc.
 
Old 02-12-2010, 08:21 PM
Kyle Bader
 
Default How should I clean up my broken system?

>> Has anybody any other tips to offer me for this operation?
>
> tar up /etc.

Make sure the tar can extract on another system. Backups that haven't
been tested are not backups!

--

Kyle
 
Old 02-12-2010, 09:52 PM
Neil Bothwick
 
Default How should I clean up my broken system?

On Fri, 12 Feb 2010 13:21:18 -0800, Kyle Bader wrote:

> >> Has anybody any other tips to offer me for this operation?
> >
> > tar up /etc.
>
> Make sure the tar can extract on another system. Backups that haven't
> been tested are not backups!

/etc/ is CONFIG_PROTECTed, so emerge -e world will do just what the OP
wants, rebuild everything without touching the configs.

Of course, a backup of /etc is always a handy thing to have around anyway,


--
Neil Bothwick

In the begining, there was nothing.
 
Old 02-12-2010, 10:46 PM
William Kenworthy
 
Default How should I clean up my broken system?

"equery check package" compares current with the as installed checksum
(or something like that!) for the packages files.

emerge -ep world > a
edit "a" to add "equery check " before each package name
run "sh a > b" and got hrough the list in b to see whats broke - lots of
debris - config files etc will show as failing a checksum, so ignore
them. Also ".a" libraries may not be broke, but a side effect of
lafilefixer - need to check that one. prelink apparently doesnt affect
(or maybe updates) the checksum.

I am sure someone probably has a utility able to automate the process -
anyone?

BillK

e.g.,
myth2 ~ # equery check gcc
[ Checking sys-devel/gcc-4.3.4 ]
!!! /usr/libexec/gcc/x86_64-pc-linux-gnu/4.3.4/f951 has incorrect md5sum
!!! /usr/lib/gcc/x86_64-pc-linux-gnu/4.3.4/32/libgfortran.so.3.0.0 has
incorrect md5sum
!!! /usr/lib/gcc/x86_64-pc-linux-gnu/4.3.4/libgcc.a has incorrect md5sum
!!! /usr/lib/gcc/x86_64-pc-linux-gnu/4.3.4/libmudflapth.so.0.0.0 has
incorrect md5sum
!!! /usr/share/gcc-data/x86_64-pc-linux-gnu/4.3.4/locale/tr/LC_MESSAGES/gcc.mo has incorrect md5sum
!!! /usr/lib/gcc/x86_64-pc-linux-gnu/4.3.4/32/libgfortran.a has
incorrect md5sum
!!! /etc/env.d/gcc/x86_64-pc-linux-gnu-4.3.4 has incorrect md5sum
!!! /usr/lib/gcc/x86_64-pc-linux-gnu/4.3.4/include/g
++-v4/bits/boost_concept_check.h has incorrect md5sum
!!! /usr/libexec/gcc/x86_64-pc-linux-gnu/4.3.4/tree1 has incorrect
md5sum
!!! /usr/share/gcc-data/x86_64-pc-linux-gnu/4.3.4/locale/es/LC_MESSAGES/gcc.mo has incorrect md5sum
* 944 out of 954 files good
myth2 ~ #

Yeah my gcc is broke and wont rebuild


On Fri, 2010-02-12 at 19:55 +0000, Alan Mackenzie wrote:
> Hi, Gentoo!
>
> As reported in other threads, my new PC had a broken RAM stick in it.
> As a result, an unknown proportion of installed binaries are flaky. One
> non-functioning binary is probably GCC.
>
> What I'd like to do is reinstall every binary, yet without erasing any
> configuration info, whose creation was so arduous.
>
> Where does portage keep it's list of installed packages? What do I have
> to do to persuade portage it has _no_ installed packages before doing
> 'rm -rf *' in /bin, /sbin, /usr/bin, /usr/sbin?
>
> Has anybody any other tips to offer me for this operation?
>
--
William Kenworthy <billk@iinet.net.au>
Home in Perth!
 
Old 02-13-2010, 06:27 AM
Alan McKinnon
 
Default How should I clean up my broken system?

On Friday 12 February 2010 21:55:29 Alan Mackenzie wrote:
> Hi, Gentoo!
>
> As reported in other threads, my new PC had a broken RAM stick in it.
> As a result, an unknown proportion of installed binaries are flaky. One
> non-functioning binary is probably GCC.
>
> What I'd like to do is reinstall every binary, yet without erasing any
> configuration info, whose creation was so arduous.
>
> Where does portage keep it's list of installed packages? What do I have
> to do to persuade portage it has _no_ installed packages before doing
> 'rm -rf *' in /bin, /sbin, /usr/bin, /usr/sbin?
>
> Has anybody any other tips to offer me for this operation?

First get a working compiler installed. There are many ways, here's what I
think is the easiest:

Boot into a Gentoo LiveCD, chroot into your install, and emerge -k the gcc
tarball on the CD.

Reboot into the actual install, synce the portage tree and

emerge -e world

That will rebuild everything, including gcc.

The paranoid might want to emerge gcc itself on it's own first so that
rebuilding world is done with the same gcc version as what it will become (gcc
is not built first when you rebuild world, all sort of toolchain tools and
parsers are earlier in the list). Personally, I don't do that - there is an
actual chance that using an old compiler to build a new compiler may lead to
incompatibility issues, but the risk is extremely small and rare, and it's
never bitten me.

--
alan dot mckinnon at gmail dot com
 
Old 02-13-2010, 06:28 AM
Alan McKinnon
 
Default How should I clean up my broken system?

On Saturday 13 February 2010 00:52:32 Neil Bothwick wrote:
> On Fri, 12 Feb 2010 13:21:18 -0800, Kyle Bader wrote:
> > >> Has anybody any other tips to offer me for this operation?
> > >
> > > tar up /etc.
> >
> > Make sure the tar can extract on another system. Backups that haven't
> > been tested are not backups!
>
> /etc/ is CONFIG_PROTECTed, so emerge -e world will do just what the OP
> wants, rebuild everything without touching the configs.
>
> Of course, a backup of /etc is always a handy thing to have around anyway,

For this case, it's probably easier to just tar /etc/ and untar it back later.

The OP then doesn't have to deal with 600+ conf-update complaints


--
alan dot mckinnon at gmail dot com
 
Old 02-13-2010, 04:51 PM
Alan Mackenzie
 
Default How should I clean up my broken system?

Hi, Alan,

On Sat, Feb 13, 2010 at 09:27:15AM +0200, Alan McKinnon wrote:
> On Friday 12 February 2010 21:55:29 Alan Mackenzie wrote:

> > As reported in other threads, my new PC had a broken RAM stick in it.
> > As a result, an unknown proportion of installed binaries are flaky.
> > One non-functioning binary is probably GCC.

> > What I'd like to do is reinstall every binary, yet without erasing
> > any configuration info, whose creation was so arduous.

> > Where does portage keep it's list of installed packages? What do I
> > have to do to persuade portage it has _no_ installed packages before
> > doing 'rm -rf *' in /bin, /sbin, /usr/bin, /usr/sbin?

> > Has anybody any other tips to offer me for this operation?

> First get a working compiler installed. There are many ways, here's
> what I think is the easiest:

> Boot into a Gentoo LiveCD, chroot into your install, and emerge -k the gcc
> tarball on the CD.

> Reboot into the actual install, synce the portage tree and

> emerge -e world

> That will rebuild everything, including gcc.

Thanks! In the end, I just used the gcc I had on the system anyway; it
wasn't broken. I first did 'emerge -e gcc', which took an hour, then did
'emerge -e world', which took ~2 hours 30 mins.

I was being a bit paranoid. The reason I "gave up" on the installation
CD was I failed to find out how to start my LVM2 voluble logics, or
whatever they're called.

I'm now back on track, setting up my PC. Thanks!

> The paranoid might want to emerge gcc itself on it's own first so that
> rebuilding world is done with the same gcc version as what it will
> become (gcc is not built first when you rebuild world, all sort of
> toolchain tools and parsers are earlier in the list). Personally, I
> don't do that - there is an actual chance that using an old compiler to
> build a new compiler may lead to incompatibility issues, but the risk
> is extremely small and rare, and it's never bitten me.

There was that apocryphal tale of the origianl Unix hacker who hardwired
a backdoor login into the system, and hacked cc to _keep_ inserting the
backdoor each time the system was built, and to keep this hack in cc each
time cc was compiled. Whew!

> --
> alan dot mckinnon at gmail dot com

--
Alan Mackenzie (Nuremberg, Germany).
 
Old 02-13-2010, 05:50 PM
Stroller
 
Default How should I clean up my broken system?

On 13 Feb 2010, at 17:51, Alan Mackenzie wrote:

...
There was that apocryphal tale of the origianl Unix hacker who
hardwired
a backdoor login into the system, and hacked cc to _keep_ inserting
the
backdoor each time the system was built, and to keep this hack in cc
each

time cc was compiled. Whew!


This is completely OT, but:

- Not apocryphal.
- KenThompson.

http://c2.com/cgi/wiki?TheKenThompsonHack

http://cm.bell-labs.com/who/ken/trust.html

Stroller.
 
Old 02-13-2010, 07:43 PM
Neil Bothwick
 
Default How should I clean up my broken system?

On Sat, 13 Feb 2010 09:28:57 +0200, Alan McKinnon wrote:

> > /etc/ is CONFIG_PROTECTed, so emerge -e world will do just what the OP
> > wants, rebuild everything without touching the configs.
> >
> > Of course, a backup of /etc is always a handy thing to have around
> > anyway,
>
> For this case, it's probably easier to just tar /etc/ and untar it back
> later.
>
> The OP then doesn't have to deal with 600+ conf-update complaints

Run conf-update and press a then d


--
Neil Bothwick

I've got a mind like a... a... what's that thing called?
 

Thread Tools




All times are GMT. The time now is 10:41 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org