Gentoo Archives: gentoo-amd64

From: Duncan <1i5t5.duncan@×××.net>
To: gentoo-amd64@l.g.o
Subject: [gentoo-amd64] Re: Multilib or not?
Date: Fri, 21 Nov 2008 12:41:01
Message-Id: pan.2008.11.21.12.39.54@cox.net
In Reply to: Re: [gentoo-amd64] Re: Multilib or not? by Tonko
1 Tonko <tonko.mulder@×××××.com> posted
2 43ba12950811210223p4d7f5363kc6baa5a1b65e2c85@××××××××××.com, excerpted
3 below, on Fri, 21 Nov 2008 11:23:19 +0100:
4
5 > Let's just say that I would switch to the no-multilib profile. Would it
6 > be enough to just change the profile and do a emerge @system @world
7 > -auvDN ? Or are there more steps I need to take?
8
9 That's enough in general, yes. The big things to remember to remerge are
10 glibc, gcc, binutils, and sandbox (and IDR, possibly baselayout as well),
11 but of course an emerge @system should take care of all of those. If
12 you've sat thru or timed gcc and/or glibc emerges before, you should
13 immediately notice they take MUCH less time to merge now, particularly
14 glibc, because as I explained earlier, with multilib they're effectively
15 built twice, once for 32-bit and once for 64-bit.
16
17 The other thing to look at with any profile change is what default USE
18 flags may have changed, and whether you're comfortable with the changes
19 or not. Of course, switching to a no-multilib profile, some USE flags
20 are masked either in general or on specific packages, due to requiring
21 32-bit, so there'll likely be more change than a simple profile upgrade
22 would bring. If you like, you can try switching profiles without merging
23 anything, do emerge -pv @system @world, and take a look at the changes.
24 If you don't like what you see, it's easy enough to switch back before
25 you do any real emerges, since all you've done at that point is change
26 the config and take a look at what it would do.
27
28 When you're done remerging and everything, it'd probably be wise to check
29 and make sure the old lib32 dirs (I've forgotten what the were
30 specifically) and etc are all gone, but I /think/ the remerge of
31 baselayout on the new profile will handle that, unless of course you have
32 those dirs CONFIG_PROTECTed for some reason.
33
34 One other thing that again the profile should manage, but just in case it
35 doesn't... For legacy reasons, booting amd64 starts in IIRC 16-bit real-
36 mode, just as does booting x86(32). That's handled with the traditional
37 32-bit gcc. Thus, grub is masked on no-multilib. Instead, you'll use
38 grub-static. Of course, what's actually installed in the boot sector
39 doesn't change until you install grub to the boot sector yourself.
40
41 Just to make sure nothing unexpected happens in the process leaving you
42 unable to boot, be sure you have some other way to boot, a Gentoo LiveCD,
43 grub installed on a floppy or USB device, etc, and test booting from it.
44 To be real sure, disable the hard drive in your BIOS, and boot from the
45 alternative without it. If it's grub, you should be able to get to the
46 grub menu without the hard drive, tho of course you won't be able to find
47 the kernel and boot the hard drive with it disabled. If it's a LiveCD or
48 whatever, obviously you should be able to boot it, with or without the
49 hard drive. Once you know your alternative boot works, you can reenable
50 your hard drive in BIOS.
51
52 Then if you like, I think you can merge grub-static (unmerging grub in
53 the process) BEFORE you switch profiles. This will be safest since
54 you'll be doing only grub-static by itself, not everything at once. It
55 will of course install on the system, and try to install to /boot as
56 well, with an elog message saying whether it could or not. But you will
57 need to install it to the boot sector yourself. After you've done so,
58 reboot, making sure it all works, using your pre-tested alternative boot
59 if something goes wrong, but it shouldn't. Once you've installed it, you
60 can go ahead with the profile change and not have to worry about at least
61 that bit of it, since you'll have done it already.
62
63 Of course if you run LILO, it too has 32-bit components. However it
64 works rather differently. I used to use it on Gentoo back before Gentoo
65 supported it on amd64, by just using the LILO precompiled binary
66 available from its homepage. But I eventually switched to GRUB and
67 haven't kept up with LILO, so don't know the details of how Gentoo
68 manages it now. But LILO users should be pretty used to managing it
69 themselves already since Gentoo doesn't provide much help with it, and
70 because it uses an absolute pointer directly from the boot sector to each
71 of its kernel entries and the kernel won't need changed for the move to
72 the no-multilib profile, it's something they don't have to worry about
73 right during the profile switch in any case.
74
75 Meanwhile, back to the general case. There's an official Gentoo
76 Upgrading Guide with profile upgrading instructions, here:
77
78 http://www.gentoo.org/doc/en/gentoo-upgrading.xml
79
80 If you're not on a 2008.0 profile yet, you may wish to take the
81 opportunity to upgrade to that at the same time. Be sure your portage is
82 upto date, and check the specific instructions for the 2008.0 upgrade as
83 posted.
84
85 They suggest using eselect profile, but I've always done my profile
86 changes by repointing the symlink manually, here. The one thing eselect
87 profile will do is make selecting a subprofile intended as a cascaded
88 subprofile only, not a main profile, much more difficult, since it only
89 lists valid whole profiles. However, the no-multilib profile stands on
90 its own, so there's little danger of that here, and as I said, I've
91 always managed the symlink here by hand (well, normally using mc, but
92 whatever). And they list the manual method as well, for those like me
93 that prefer it. =:^)
94
95 --
96 Duncan - List replies preferred. No HTML msgs.
97 "Every nonfree program has a lord, a master --
98 and if you use the program, he is your master." Richard Stallman

Replies

Subject Author
Re: [gentoo-amd64] Re: Multilib or not? Tonko <tonko.mulder@×××××.com>