Gentoo Archives: gentoo-amd64

From: Duncan <1i5t5.duncan@×××.net>
To: gentoo-amd64@l.g.o
Subject: [gentoo-amd64] Re: system broken?
Date: Wed, 10 Dec 2008 13:46:09
Message-Id: pan.2008.12.10.13.45.57@cox.net
In Reply to: Re: [gentoo-amd64] Re: system broken? by Ben de Groot
1 Ben de Groot <yngwin@g.o> posted 493FB175.3050204@g.o,
2 excerpted below, on Wed, 10 Dec 2008 13:09:25 +0100:
3
4 > Martin Herrman wrote:
5 >> thanks a lot for this link! This seems to be exactly the issue I have
6 >> (and also caused by the wish to have GCC 4.3). I will downgrade glibc
7 >> (and gcc) to have a stable system again.
8 >
9 > Except you can't downgrade glibc. It won't work. So your best bet is to
10 > get a tarball of portage-2.1.6 (or 2.2_rc17) from someone with a
11 > functioning ~amd64 system. (I myself am stuck on ~x86 for the moment.)
12
13 Well, you can, but not directly.
14
15 Surely you have an emergency boot method, either (like me) a backup root
16 partition that you snapshot from your working one periodically when you
17 know the system's working pretty smoothly (which means you've rebooted
18 since your last merges so you know you can), or a LiveCD of some sort,
19 maybe a Gentoo LiveCD, maybe something else, that you can boot to and
20 mount your broken system partitions from? That's the basis from which to
21 start. If you don't have such an emergency boot solution, how do you
22 expect to recover in the event you have a broken boot?
23
24 When I had a problem with glibc and needed to downgrade, I simply stuck
25 the appropriate root=/dev/whatever on the kernel command line from grub,
26 and booted to my backup root partition. The way I'm setup, that gives me
27 the exact working system I had at that point, and can mount either my
28 normal or backup /home and other data partitions, so I'm still fully
29 operational. I was able to mount my my normal root from the backup,
30 along with my packages partition, then set ROOT= to point to the normal
31 working partition, and emerge -K an appropriate binpkged glibc over top
32 of the broken one. I must admit I was a bit apprehensive about it as I'd
33 never used portage's ROOT= setting before, and after all this is glibc
34 we're talking about, but it worked fine, and I was then able to reboot
35 back into my normal root again.
36
37 Another alternative as long as glibc isn't so broken you can't run
38 anything, is to hand-edit the ebuild to kill the downgrade blocker bit of
39 the script.
40
41 Finally, as posted elsewhere, it's also possible to start with a stage
42 tarball once again as a known good starting point, then emerge --
43 emptytree @system to get back to a current system. This is sort of the
44 equivalent of an OS reinstall on other OSs/distributions and it works
45 quite well. Of course, it helps if you make a backup of your /etc before
46 you do it, so you can quickly recover overwritten config files.
47
48 So there's ways to downgrade glibc. You just have to be smarter than the
49 child-safety-locks portage has in place to prevent you from doing it
50 inadvertently and breaking a system further, as doing so after remerging
51 a bunch of packages thus linking them to the new glibc might do. But if
52 you have a backup to operate from if necessary, you don't have to worry
53 so much about breaking a system which is probably already partially
54 broken or you'd not be having to worry about downgrading glibc.
55
56 --
57 Duncan - List replies preferred. No HTML msgs.
58 "Every nonfree program has a lord, a master --
59 and if you use the program, he is your master." Richard Stallman

Replies

Subject Author
Re: [gentoo-amd64] Re: system broken? Martin Herrman <martin@×××××××.nl>