View previous topic :: View next topic |
Author |
Message |
rbergen n00b
Joined: 10 Aug 2003 Posts: 51
|
Posted: Fri Dec 07, 2007 7:07 pm Post subject: "Upgrading" from x86 to amd64? |
|
|
Hello,
I've been running Gentoo on a (Centrino Duo) computer with CHOST set to i686-pc-linux-gnu, and am now considering trying the amd64 profile, preferrably without installing from scratch. I know that it is physically possible to change CHOST to x86_64-pc-linux-gnu and do an emerge -e world, but I've read that changing CHOST has about the same effect to your installation as putting your harddisk in a dishwasher.
Does anyone have any information on or, even better, experience with making such a transition and end up with a working installation?
Any help is greatly appreciated.
Thanks in advance,
Rutger |
|
Back to top |
|
|
rokstar83 Guru
Joined: 09 Apr 2005 Posts: 423 Location: MD
|
Posted: Fri Dec 07, 2007 7:21 pm Post subject: |
|
|
Your best bet is to create a new partition (either using space on your current drive, another drive or another computer) and chroot into it and setup the new root parition. Then you can either wipe the old partition and copy over the new one, or boot to the new partition by passing grub a different root parameter. |
|
Back to top |
|
|
neiljw Apprentice
Joined: 12 Nov 2007 Posts: 166 Location: Telford, UK
|
Posted: Fri Dec 07, 2007 11:54 pm Post subject: Re: "Upgrading" from x86 to amd64? |
|
|
rbergen wrote: | Does anyone have any information on or, even better, experience with making such a transition and end up with a working installation? |
Yes, I've done it. It's really not difficult. Have a look here.
Remember to change your profile as well. I did it while chrooted from a 64 bit livecd. I re-compiled the kernel before re-booting. _________________ Be lucky,
Neil |
|
Back to top |
|
|
i92guboj Bodhisattva
Joined: 30 Nov 2004 Posts: 10315 Location: Córdoba (Spain)
|
Posted: Sat Dec 08, 2007 12:02 am Post subject: Re: "Upgrading" from x86 to amd64? |
|
|
neiljw wrote: | rbergen wrote: | Does anyone have any information on or, even better, experience with making such a transition and end up with a working installation? |
Yes, I've done it. It's really not difficult. Have a look here. |
Err... changing CHOST is well documented and is ok. The transition from x86 to amd64 implies migrating from 32 to 64 bits, and that is not that trivial. It is not impossible either, but it is not just as simple as changing CHOST and recompiling world. In first place, you will need a 64 bits kernel, a 64 bits toolchaing (gcc, glibc, binutils, sandbox). Of course, enable IA32 emul in your kernel as well. After booting your 64 bits kernel, you can start recompiling stuff.
To save you the pain of compiling the 64 bits toolchain using a cross compiler, you can just use binary packages to ease that part of the migration. Anyway, note that this is completely unsupported, and it something goes wrong and you screw up yourself, then you will end reinstalling from scratch anyway. |
|
Back to top |
|
|
neiljw Apprentice
Joined: 12 Nov 2007 Posts: 166 Location: Telford, UK
|
Posted: Sat Dec 08, 2007 12:50 am Post subject: Re: "Upgrading" from x86 to amd64? |
|
|
i92guboj wrote: | In first place, you will need a 64 bits kernel, |
Which is precisely why I mentioned chrooting from a 64 bit livecd. _________________ Be lucky,
Neil |
|
Back to top |
|
|
i92guboj Bodhisattva
Joined: 30 Nov 2004 Posts: 10315 Location: Córdoba (Spain)
|
Posted: Sat Dec 08, 2007 1:36 am Post subject: |
|
|
Yep, but, nonetheless, I wanted to make the remark that changing CHOST and changing from 32 to 64 bits are not the same thing, and that the later is not supported by Gentoo in any way. I am not talking about difficulty level here. I just wanted to clarify that, because a newcomer might not see what we consider evident. |
|
Back to top |
|
|
rokstar83 Guru
Joined: 09 Apr 2005 Posts: 423 Location: MD
|
Posted: Sat Dec 08, 2007 3:08 am Post subject: |
|
|
Quick question... why would he need the livecd? Can't you just create a separate partition, dump the stage tar ball in, and then chroot? Or am I missing something? |
|
Back to top |
|
|
i92guboj Bodhisattva
Joined: 30 Nov 2004 Posts: 10315 Location: Córdoba (Spain)
|
Posted: Sat Dec 08, 2007 3:39 am Post subject: |
|
|
rokstar83 wrote: | Quick question... why would he need the livecd? Can't you just create a separate partition, dump the stage tar ball in, and then chroot? Or am I missing something? |
You can't chroot into a 64 bits env from a 32 bits kernel. The underlying kernel will be the same you booted on, it doesn't matter how many times you chroot. |
|
Back to top |
|
|
njuk-njuk n00b
Joined: 24 Aug 2003 Posts: 65 Location: New York, NY
|
Posted: Wed Jan 30, 2008 7:44 pm Post subject: |
|
|
i am in a similar position of migrating a system to amd64 whose current hardware is an old x86. i'd prefer not to do a fresh install, if possible, due to current configuration settings and whatnot. i noted in the Gentoo amd64 FAQ that they say such an upgrade is impossible to do.
as has been suggested in a previous post, i was hoping to boot from an amd64 liveCD and rebuild everything. though i realize it is not the same, i was taking cues from when i've upgraded GCC from 3.x to 4.x and had to do a complete rebuild of my system starting with the toolchain (via the --emptytree flag).
the system i am migrating is a server that doesn't have a ton of packages installed on it (e.g., nothing X-related). my hope is that the rebuild, if it is possible, shouldn't take too long given the new processor and memory to which i'll be migrating. |
|
Back to top |
|
|
mv Watchman
Joined: 20 Apr 2005 Posts: 6780
|
Posted: Wed Jan 30, 2008 10:09 pm Post subject: |
|
|
njuk-njuk wrote: | i am in a similar position of migrating a system to amd64 whose current hardware is an old x86. i'd prefer not to do a fresh install, if possible, due to current configuration settings and whatnot. |
You might want to install into a new partition/harddisk: This way, your current system can always serve you as a chroot.
Quote: | i was hoping to boot from an amd64 liveCD and rebuild everything |
This will not work this way - unless you are a real expert. You would have to make sure that the whole toolchain from the livecd is used while on the other hand you want to install into your harddisk's directory. So you would need a specially prepared live CD (or copy it to a new partition and make lots of changes to it) which uses some patched form of portage to install the packages (maybe prefix-portage would work? I have no experience with it).
Unless you really know what you are doing and would be able to build your system from scratch (without any portage tools), you will probably not succeed this way. In any case, it will cost you much more time than a fresh install. (Here is just one of many difficulties which you would face: Even your current directory layout with /lib and /usr/lib being directories instead of symlinks is false. Of course, this is only one of the trivial things to change...) |
|
Back to top |
|
|
njuk-njuk n00b
Joined: 24 Aug 2003 Posts: 65 Location: New York, NY
|
Posted: Wed Jan 30, 2008 10:58 pm Post subject: |
|
|
yeah, i think i am going to simply do a fresh install.
this is a small server that mainly hosts my mail, webserver, and source code repositories. it used to be my main setup since 2000 until i built a fresh amd64 desktop box 1.5 years ago; that's when it got relegated to a small server. it has had the same gentoo system (+ updates) on it for a long time, and i was being a bit nostalgic about keeping it somewhat as it was. nostalgia is not a good enough reason, though. i updated the hardware, but don't have a spare disk right now. what i do have, though, is a ton of extra space on my desktop box. since it is small, at least i can backup the whole drive without much worry if i need a config file or something.
thanks. |
|
Back to top |
|
|
rbergen n00b
Joined: 10 Aug 2003 Posts: 51
|
Posted: Wed Feb 20, 2008 4:10 pm Post subject: |
|
|
As I'm the one who started this topic, I think it is only fair to inform y'all how I went about the transition to amd64. I can summarize it in one word: reinstall. And to be a little more elaborate: I did a complete reinstall from scratch. |
|
Back to top |
|
|
njuk-njuk n00b
Joined: 24 Aug 2003 Posts: 65 Location: New York, NY
|
Posted: Wed Feb 20, 2008 8:49 pm Post subject: |
|
|
rbergen wrote: | As I'm the one who started this topic, I think it is only fair to inform y'all how I went about the transition to amd64. I can summarize it in one word: reinstall. And to be a little more elaborate: I did a complete reinstall from scratch. |
yep, that's what i ended up doing: fresh and clean install. the install itself, like all other gentoo installs, was fine but it took me a bit of time getting it reconfigured similar to my old setup. all in all, though, it was reasonably painless in the end, just took a chunk of time out of a few days. |
|
Back to top |
|
|
|