Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Architecture Upgrade x86 -> x86_64
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
TrentonAdams
n00b
n00b


Joined: 16 Aug 2008
Posts: 64

PostPosted: Wed Jan 28, 2009 11:34 pm    Post subject: Architecture Upgrade x86 -> x86_64 Reply with quote

Hi Guys,

Is it possible to do architecture upgrades? For example, is there anything stopping me from booting a gentoo CD, changing my make.conf, issuing a rebuild with emptytree, recompiling the kernel, and then rebooting?

Thanks.
Back to top
View user's profile Send private message
Inodoro_Pereyra
Advocate
Advocate


Joined: 03 Nov 2006
Posts: 2631
Location: En la otra punta del cable

PostPosted: Thu Jan 29, 2009 12:18 am    Post subject: Reply with quote

No, you can't do that. The only way will be to start from scratch using a 64 bits livecd.

Cheers!
_________________
Mi Blog.

Si no fuera por C, estaríamos escribiendo programas en BASI, PASAL y OBOL.
Back to top
View user's profile Send private message
emerald
Tux's lil' helper
Tux's lil' helper


Joined: 31 Jul 2005
Posts: 113

PostPosted: Thu Jan 29, 2009 12:31 am    Post subject: Reply with quote

It might be possible but it's no simple task, you'd need a crosscompiler to build the new kernel for amd64, build the toolchain with it too, reboot the system using the amd64 kernel (still using 32bit userland), change CHOST and make.conf and then bootstrap the system using the already built amd64 toolchain (watch out for lib/lib32/lib64 dirs and symlinks!). Afterwards rebuild your system (emerge -e system), and rebuild world, possibly twice to clean out any references to old 32bit things. You'll probably meet problems, but hardly anybody who'd help you with it ;)
That's the general way to go, the details you'll have to figure out by yourself. But it's probably way easier to get your make.conf settings (USE flags and other settings like LINGUAS, ...) and your world file and start from cratch. Several config files in /etc will differ between x86 and amd64, mostly /lib -> /lib64 changes.
_________________
Knowledge is scary....

... running Gentoo Linux ...
... and Windows in a 'small corner'(C) - i.e. vmware - :D ...
System Profile

Don't open the Red Door !
Back to top
View user's profile Send private message
defenderBG
l33t
l33t


Joined: 20 Jun 2006
Posts: 817

PostPosted: Thu Jan 29, 2009 1:36 am    Post subject: Reply with quote

on an 64bit /lib is a symlink to /lib64, so... I dont expect any "/lib -> /lib64 changes".
Back to top
View user's profile Send private message
d2_racing
Bodhisattva
Bodhisattva


Joined: 25 Apr 2005
Posts: 13047
Location: Ste-Foy,Canada

PostPosted: Thu Jan 29, 2009 2:03 am    Post subject: Reply with quote

Inodoro_Pereyra wrote:
No, you can't do that. The only way will be to start from scratch using a 64 bits livecd.

Cheers!


In fact, it's the best way and the only way.
Back to top
View user's profile Send private message
TrentonAdams
n00b
n00b


Joined: 16 Aug 2008
Posts: 64

PostPosted: Thu Jan 29, 2009 6:20 pm    Post subject: Reply with quote

d2_racing wrote:
Inodoro_Pereyra wrote:
No, you can't do that. The only way will be to start from scratch using a 64 bits livecd.

Cheers!


In fact, it's the best way and the only way.

Okay, so is there any gotchas I should look out for? For one, I did notice that my profiles are all x86 based. How would I set my profile to an x86_64?
Back to top
View user's profile Send private message
d2_racing
Bodhisattva
Bodhisattva


Joined: 25 Apr 2005
Posts: 13047
Location: Ste-Foy,Canada

PostPosted: Thu Jan 29, 2009 9:04 pm    Post subject: Reply with quote

AMD64 actually :P

Code:

Portage 2.1.4.5 (default/linux/amd64/2008.0/desktop, gcc-4.1.2, glibc-2.6.1-r0, 2.6.25-gentoo-r7 x86_64)
=================================================================
System uname: 2.6.25-gentoo-r7 x86_64 Intel(R) Core(TM)2 Quad CPU Q9550 @ 2.83GHz
Timestamp of tree: Fri, 24 Oct 2008 02:34:01 +0000
app-shells/bash:     3.2_p33
dev-java/java-config: 1.3.7, 2.1.6
dev-lang/python:     2.5.2-r7
dev-util/cmake:      2.4.6-r1
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r2
sys-devel/automake:  1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1-r1
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.23-r3
ACCEPT_KEYWORDS="amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=nocona -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-O2 -march=nocona -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks metadata-transfer sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="fr_CA.UTF-8"
LC_ALL="fr_CA.UTF-8"
LDFLAGS="-Wl,-O1"
LINGUAS="fr"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X acl acpi alsa amd64 avi berkdb bluetooth branding bzip2 cairo cdr cli cracklib crypt cups dbus divx dri dvd dvdr dvdread eds emboss encode esd evo fam firefox foomaticdb fortran gdbm gif gpm gstreamer gtk hal iconv ipv6 isdnlog jpeg kde kdeenablefinal kerberos ldap libnotify mad midi mikmod mmx mp3 mpeg mudflap multilib ncurses nls nptl nptlonly ogg opengl openmp oss pam pcre pdf perl png ppds pppd python qt3 qt3support qt4 quicktime readline reflection sdl session spell spl sse sse2 ssl startup-notification svg sysfs tcpd tiff truetype unicode usb userlocales vorbis xml xorg xv zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="fr" USERLAND="GNU" VIDEO_CARDS="vesa nvidia"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY


If you reinstall your box with the AMD64 stage 3, then you will have the x86_64 profile with the AMD64.
Back to top
View user's profile Send private message
TrentonAdams
n00b
n00b


Joined: 16 Aug 2008
Posts: 64

PostPosted: Mon Feb 02, 2009 9:43 pm    Post subject: Reply with quote

So, you're saying that I should overlay the stage 3 tarball overtop, and then recompile with empty tree? Obviously after backing up /etc/ to be safe. A co-worker had actually suggested that as well.

Thanks.
Back to top
View user's profile Send private message
desultory
Bodhisattva
Bodhisattva


Joined: 04 Nov 2005
Posts: 9410

PostPosted: Tue Feb 03, 2009 6:43 am    Post subject: Reply with quote

TrentonAdams wrote:
So, you're saying that I should overlay the stage 3 tarball overtop, and then recompile with empty tree?
No. Make backups of you configuration files and user data, then do a proper reinstall. While it is possible to switch between x86 and amd64 it is highly impractical and not something to try unless you already know how to do it, regardless of the amount of guidance you can get during the process.
TrentonAdams wrote:
Obviously after backing up /etc/ to be safe.
Make a full set of backups, not just /etc/, that way if things do not go as planned you can simplyt restore an image of the previously working system and all of the data associated with it.
TrentonAdams wrote:
A co-worker had actually suggested that as well.
They are wrong, it would result in a moderate mess at best.
Back to top
View user's profile Send private message
djdunn
l33t
l33t


Joined: 26 Dec 2004
Posts: 810

PostPosted: Tue Feb 03, 2009 1:07 pm    Post subject: Reply with quote

reinstall isn't the only way

technically all you have to do is change the your make.conf add the lib64 and link lib to /lib64 add a /lib32 directory to /root copy contents of /lib to /lib32, AND make sure your make.conf is correct and emerge -e system && emerge -e world. and it should go off without a hitch

its not exactly suggested by me, but its not impossible its really early in the morning i think i might be missing a step i think if you do what i say you gonna get a ton of commands not found

the tricky part is changing the chost its generally not kosher but possible
_________________
“Music is a moral law. It gives a soul to the Universe, wings to the mind, flight to the imagination, a charm to sadness, gaiety and life to everything. It is the essence of order, and leads to all that is good and just and beautiful.”

― Plato
Back to top
View user's profile Send private message
mv
Watchman
Watchman


Joined: 20 Apr 2005
Posts: 6749

PostPosted: Tue Feb 03, 2009 1:22 pm    Post subject: Reply with quote

djdunn wrote:
reinstall isn't the only way

Practically, it is the only way.
Quote:
technically all you have to do is ...

This is false, because your 32-Bit Toolchain will never produce 64-Bit code. You either have to bring up manually some 64-Bit toolchain or you have to do tricky cross-compiling (just using corresponding CFLAGS is not enough, you have to install a cross-compiler and make sure that is used). If you want multilib, things are even much harder. Reinstallation definitely is faster than any such hacks (which are full of traps).
Back to top
View user's profile Send private message
djdunn
l33t
l33t


Joined: 26 Dec 2004
Posts: 810

PostPosted: Tue Feb 03, 2009 1:29 pm    Post subject: Reply with quote

yeah your gonna need to cross compile its a lot of hassle probably not anywhere worth being worth the effort
_________________
“Music is a moral law. It gives a soul to the Universe, wings to the mind, flight to the imagination, a charm to sadness, gaiety and life to everything. It is the essence of order, and leads to all that is good and just and beautiful.”

― Plato
Back to top
View user's profile Send private message
TrentonAdams
n00b
n00b


Joined: 16 Aug 2008
Posts: 64

PostPosted: Tue Feb 03, 2009 4:27 pm    Post subject: Reply with quote

desultory wrote:
TrentonAdams wrote:
So, you're saying that I should overlay the stage 3 tarball overtop, and then recompile with empty tree?
No. Make backups of you configuration files and user data, then do a proper reinstall. While it is possible to switch between x86 and amd64 it is highly impractical and not something to try unless you already know how to do it, regardless of the amount of guidance you can get during the process.
TrentonAdams wrote:
Obviously after backing up /etc/ to be safe.
Make a full set of backups, not just /etc/, that way if things do not go as planned you can simplyt restore an image of the previously working system and all of the data associated with it.
TrentonAdams wrote:
A co-worker had actually suggested that as well.
They are wrong, it would result in a moderate mess at best.

Well, a tar.gz of / is something I always do before reinstalling. But, a tar.gz of just etc is quicker to get access to the configurations.

I may try it anyhow, just to see how it works out. If I can't get it working, then I won't worry about it, and I'll just re-install. :D
Back to top
View user's profile Send private message
emerald
Tux's lil' helper
Tux's lil' helper


Joined: 31 Jul 2005
Posts: 113

PostPosted: Tue Feb 03, 2009 4:41 pm    Post subject: Reply with quote

TrentonAdams wrote:

I may try it anyhow, just to see how it works out. If I can't get it working, then I won't worry about it, and I'll just re-install. :D


In this naive attempt it will definitely fail, no need to even try it. Without proper understanding of the differences of the arches, the differences in gentoo between those arches, careful planning of the transition and thoughts about possible problems it will definitely not succeed or in the unlikely case of at least partly succeeding it will leave hell alot of cruft in the system so it's simply not worth it.
_________________
Knowledge is scary....

... running Gentoo Linux ...
... and Windows in a 'small corner'(C) - i.e. vmware - :D ...
System Profile

Don't open the Red Door !
Back to top
View user's profile Send private message
TrentonAdams
n00b
n00b


Joined: 16 Aug 2008
Posts: 64

PostPosted: Tue Feb 03, 2009 6:20 pm    Post subject: Reply with quote

Everything you said emerald tells me that I SHOULD try this. Sounds like a lot of fun, and some learning. That is the reason we have Professional Development days where I work. To learn, and do research.

So, is there some documentation somewhere that shows the differences between the architecture setups? That would probably be helpful in this endeavour to learn more about gentoo.
Back to top
View user's profile Send private message
emerald
Tux's lil' helper
Tux's lil' helper


Joined: 31 Jul 2005
Posts: 113

PostPosted: Tue Feb 03, 2009 6:53 pm    Post subject: Reply with quote

If you want to try i'd really recommend installing amd64 and x86 in a virtual machine or another partition to get to know the system first.
Next you should get very comfortable with cross compilers, build working kernels for another architectures. To get to know the multilib setup and configuration in amd64 is recommendable too, which will probably help in your conversion attempt too.
You should be able to get a stage1 gentoo running without problems since you will have to bootstrap your system, probably by hand. Get to know the packages from the system set, you may have to build part or all of them using a cross compiler.
Configuring a kernel (recommended without genkernel) for x86 and amd64 should not be a problem for you either.

There are probably many more tips for such an endeavour, i can't get more in my mind now since it's already really much to do/to know.

Good luck in your attempt :D


When i have some spare time on my hands i'll gonna try such conversion too, it's simply... too interesting :D
_________________
Knowledge is scary....

... running Gentoo Linux ...
... and Windows in a 'small corner'(C) - i.e. vmware - :D ...
System Profile

Don't open the Red Door !
Back to top
View user's profile Send private message
SLBMEH
Apprentice
Apprentice


Joined: 16 Aug 2003
Posts: 299
Location: Pittsburgh, PA

PostPosted: Fri Feb 13, 2009 12:33 am    Post subject: Reply with quote

it can definately be done... when i did it, i rolled back my glibc and gcc versions as well... which is a very bad combination... i made my own bootstrap scripts similar to the LFS scripts needed to get some binary packages and then rebuilt... you need to do some serious tricking of portage... but it can be done, definately not the fastest way...
_________________
Steve - Semper Fi
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum