Gentoo Archives: gentoo-amd64

From: Duncan <1i5t5.duncan@×××.net>
To: gentoo-amd64@l.g.o
Subject: [gentoo-amd64] Re: upgrade an old system
Date: Mon, 04 May 2009 12:11:07
Message-Id: pan.2009.05.04.12.10.44@cox.net
In Reply to: [gentoo-amd64] upgrade an old system by Raffaele BELARDI
1 Raffaele BELARDI <raffaele.belardi@××.com> posted 49FEAA27.1040708@××.com,
2 excerpted below, on Mon, 04 May 2009 10:41:11 +0200:
3
4 > I need to bring up-to-date a Sempron gentoo box (march=k8) which was not
5 > updated for more than one year. At first I was hoping to use the binpkg
6 > generated on my main system (Athlon64 X2, march=athlon64) to do a quick
7 > update, but the arch's are not compatible.
8
9 march=k8 (aka opteron, aka athlon64, aka athlon-fx) is supposed to be a
10 synonym, that is, identical to march=athlon64 (and the other akas
11 above). However, newer gcc versions also have march=k8-sse3, which will
12 NOT be compatible with the older K8s. Then there's amdfam10 (aka
13 barcelona), which is newer still, including SSE4A, which won't be
14 compatible with the older k8 or k8-sse3.
15
16 So march=k8 should be just fine with march=athlon64, provided of course
17 that you didn't use other CFLAGS which might be incompatible, including
18 -sse3.
19
20 But what what's much more likely to be happening is that your portage is
21 too old to work with a newer tree and/or the newer profile the new
22 machine is on. That's particularly true if you were on stable, not
23 ~arch, as stable portage is already somewhat behind the latest features,
24 in addition to that year. In particular, if you have an old pre-
25 cascading profiles portage, it's stale indeed. If the old profile is
26 still around, perhaps you can update just portage, first.
27
28 It's also possible that the linked glibc or other (libstdc++ for C++
29 apps, ABI affecting CFLAGS such as -mregparm=X) is too different.
30
31 FWIW for the future, I'd suggest updating at least every six months or
32 so, just to keep from getting in such binds. But six-month updates are
33 already likely to be more difficult than necessary. Three-month updates
34 are the most I'd want to go on a routine basis. By a year out, indeed,
35 grabbing the latest stage tarball and going from there, as you discuss
36 below, is getting to be the most viable option.
37
38 > So I started an emerge -uDv system, it complained about linux-utils
39 > blocking coreutils, I unmerged the first one but had to interrupt the
40 > emerge with a shutdown, then the system failed to boot due to missing
41 > 'mount' executable...
42 >
43 > What I'll do now is boot from CD, save the old /etc, reinstall the
44 > system from a recent stage3, then use distcc to do a quicker emerge
45 > world. But while the main system has gcc-4.3.2, the stage3 contains
46 > gcc-4.2.1. According to distcc instructions, gcc should be the same
47 > version on all systems. So I probably need to update the gcc on the old
48 > system before starting the distcc. This will be LONG.
49 >
50 > Any other options I have?
51
52 As discussed above, it's likely your archs aren't incompatible after
53 all. Even the -sse3 versions might be compatible on many basic packages,
54 those relatively unlikely to use floating point. That binpkg idea might
55 just work after all, at least for coreutils and the like, once you're
56 using a reasonably modern portage, as you should be from a liveCD and/or
57 stage tarball.
58
59 Also, I haven't used a stage tarball in some time and don't believe I
60 ever used the Gentoo LiveCD (I did the install from Mandrake Linux,
61 chrooting into the stage after unpack). Thus I'm not sure of the precise
62 details, but it may well be possible to do a quickpkg of the basic
63 coreutils on the CD or from the stage, then set ROOT= appropriately and
64 use the stage's or CD's portage to install that coreutils binpkg to the
65 main system.
66
67 Also note that the binpkgs are tar.bz2 tarballs, with some extra metadata
68 glued on the end. Thus, in a recovery scenario such as this, once you
69 have a compatible binpkg, you can simply untar it directly over the
70 existing filesystem (taking care not to destroy config files, if any,
71 back them up, etc, or extract only part of the archive, excluding say
72 /etc and /usr/share).
73
74 Another alternative, if you trust a specific Gentoo/amd64 user, is to ask
75 them to create a binpkg for you, specifying USE and CFLAGS as needed.
76 The newer machines should be able to build the older stuff, once the
77 CFLAGS, etc are set correctly. Of course, you need to trust said user to
78 give you a "good" binary, not some sort of malware. Then they can email
79 it to you, or stick it somewhere you can FTP it, or whatever.
80
81 --
82 Duncan - List replies preferred. No HTML msgs.
83 "Every nonfree program has a lord, a master --
84 and if you use the program, he is your master." Richard Stallman

Replies

Subject Author
Re: [gentoo-amd64] Re: upgrade an old system Raffaele BELARDI <raffaele.belardi@××.com>
Re: [gentoo-amd64] Re: upgrade an old system Raffaele BELARDI <raffaele.belardi@××.com>