Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Converting from 64bit to 32bit
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on AMD64
View previous topic :: View next topic  
Author Message
Qylvaran
n00b
n00b


Joined: 28 Jan 2004
Posts: 74

PostPosted: Sun Oct 19, 2008 7:07 am    Post subject: Converting from 64bit to 32bit Reply with quote

I have an AMD64 Gentoo system which, for various reasons, I want to convert to 32bit only. I think that what I need to do is the following

1. Modify make.conf for a 32bit system.

2. Use eselect to select a 32bit profile

3.5 Recompile the kernel

3.5 emerge -e system

5. emerge -e world

(6. remove any x86-emul packages or the like)

Am I missing something that will break my system? What order should I put steps 3.5 in? Thanks a-plenty!
Back to top
View user's profile Send private message
DaggyStyle
Advocate
Advocate


Joined: 22 Mar 2006
Posts: 4971

PostPosted: Sun Oct 19, 2008 7:46 am    Post subject: Reply with quote

I recommand a clean install, it is faster and much safer, there are things that can go wrong and you wont know what to do with it.
_________________
Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein
ProjectFootball
Back to top
View user's profile Send private message
desultory
Administrator
Administrator


Joined: 04 Nov 2005
Posts: 8045

PostPosted: Sun Oct 19, 2008 8:20 am    Post subject: Reply with quote

Qylvaran wrote:
Am I missing something that will break my system?
Having inconsistent libraries and tool chain during the rebuild. While technically possible it is far more trouble to do than it is actually worth. However there is a workable alternative, given a kernel which supports 32 bit and 64 bit user space code.

  1. Use a 32 bit stage 3 to create a chroot environment, for the purposes of this overview at /32-bit/.
  2. Copy /etc/resolv.conf and the contents of /var/lib/portage/ from the host system into the corresponding locations under /32-bit/.
  3. Edit the world file, and if present and necessary world_sets, under /32-bit/ to remove the emulation packages.
  4. Copy any appropriate settings from/etc/make.conf and /etc/portage/ to the corresponding locations under /32-bit/.
  5. Bind mount /dev/, /proc/, /sys/ and /usr/portage/ under /32-bit/.
  6. Enter the chroot environment.
  7. Set an appropriate profile.
  8. Run emerge -e world, barring unusually minimal USE flags there will be conflicts which would need to be resolved in order to complete this step successfully.
  9. Boot to a live CD, or equivalently independent system.
  10. Move the /dev/, /sys/, /proc/, /root/, /home/, /usr/portage/, and possibly other directories I have neglected to mention from the installed system into /32-bit/ under the installed system.
  11. Remove everything outside of /32-bit/ from the installed system.
  12. Move everything from /32-bit/ into the root of the installed system.
Some steps are probably missing, others are incomplete, some are quite unsafe and at some point during the above procedure at least two rubber chickens are to be sacrificed, at separate times, following secret and arcane rites which must be strictly followed and may never be discussed.

In short, it is possible to do something directly analogous to what you are planning, but it is faster, easier and less error prone to just back up your data and install a 32 bit system from scratch. As a side benefit your data would be safer.
Back to top
View user's profile Send private message
appetitus
Apprentice
Apprentice


Joined: 28 Sep 2003
Posts: 209

PostPosted: Sun Oct 19, 2008 11:54 am    Post subject: Reply with quote

Make a backup and try your ideas out. Of course, you need to setup the kernel first not part way thru the effort.
_________________
Being a Gentoo user means living in a house inhabited by a family of crazed carpenters. When you wake up, the house is different. Maybe there is a new turret, or some walls have moved, or perhaps someone has removed the floor under your bed.
Back to top
View user's profile Send private message
loftwyr
l33t
l33t


Joined: 29 Dec 2004
Posts: 970
Location: 43°38'23.62"N 79°27'8.60"W

PostPosted: Sun Oct 19, 2008 2:00 pm    Post subject: Reply with quote

The nice thing about 64bit hardware is you can keep the 64bit kernel and have a 32 system in every other way and still have everything work.
_________________
My emerge --info
Have you run revdep-rebuild lately? It's in gentoolkit and it's worth a shot if things don't work well.
Celebrating 5 years of Gentoo-ing.
Back to top
View user's profile Send private message
Qylvaran
n00b
n00b


Joined: 28 Jan 2004
Posts: 74

PostPosted: Sat Oct 25, 2008 8:50 pm    Post subject: Reply with quote

I've been considering carefully what has been said here, and it looks like my best bet is to back up and install from scratch. The one problem I have with that is the lack of a wired ethernet connection, as the router is in an inaccessible (to me, anyways) area.

I suppose Installing Gentoo is where I should ask about the best way to get from start to internet on a RaLink RT2561/RT61 802.11g. Thanks for your help.
Back to top
View user's profile Send private message
devsk
Advocate
Advocate


Joined: 24 Oct 2003
Posts: 2739
Location: Bay Area, CA

PostPosted: Tue Oct 28, 2008 5:40 am    Post subject: Reply with quote

Qylvaran wrote:
I've been considering carefully what has been said here, and it looks like my best bet is to back up and install from scratch. The one problem I have with that is the lack of a wired ethernet connection, as the router is in an inaccessible (to me, anyways) area.

I suppose Installing Gentoo is where I should ask about the best way to get from start to internet on a RaLink RT2561/RT61 802.11g. Thanks for your help.
I second the chroot solution that desultory proposed. It will work because the existing 64-bit has the connection.
Back to top
View user's profile Send private message
fangorn
Veteran
Veteran


Joined: 31 Jul 2004
Posts: 1886

PostPosted: Tue Oct 28, 2008 8:14 am    Post subject: Reply with quote

Third opinion for chroot.

I used to have a 32bit install in parallel. Always installed it (and kept up to date) from a 64bit install. All you need is a free partition for the / filesystem, /home and any data directory can be mounted from the same place.

Just unpack a correct stage tarball and copy over and edit the necessary (handedited configuration files (mainly from /etc). Then turn your world file into a script installing all your apps from the 64bit system (if you want to have them all). I use this method all the time to create recent parallel instalations.
_________________
Video Encoding scripts collection | Project page
Back to top
View user's profile Send private message
Qylvaran
n00b
n00b


Joined: 28 Jan 2004
Posts: 74

PostPosted: Mon Nov 10, 2008 11:20 pm    Post subject: Reply with quote

Finally getting around to doing this thing, and I'm going with the chroot method. So far, I'm at step 8 of desultory's post, though I'm running 'USE="-X" emerge -e system' first because it seems right and proper to do so. I anticipate a little trouble with migrating over my user and group settings. Do I need to recreate them from scratch or are there some files I can copy over?
Back to top
View user's profile Send private message
devsk
Advocate
Advocate


Joined: 24 Oct 2003
Posts: 2739
Location: Bay Area, CA

PostPosted: Mon Nov 10, 2008 11:59 pm    Post subject: Reply with quote

Qylvaran wrote:
Finally getting around to doing this thing, and I'm going with the chroot method. So far, I'm at step 8 of desultory's post, though I'm running 'USE="-X" emerge -e system' first because it seems right and proper to do so. I anticipate a little trouble with migrating over my user and group settings. Do I need to recreate them from scratch or are there some files I can copy over?
the problems come because of portage (or rather ebuilds/eclasses) not insisting on fixed IDs for various users it creates. So, copying the passwd/group file should be the first thing to do in my opinion, and then you should emerge stuff. This way, what's recorded in the FS in the chroot is consistent with passwd/group file, and between 64-bit and 32-bit installs. This will make sure that if you had a folder like /vmware and assign 'vmware' as group for it in 64-bit OS, you will not see it having groupid of 'gkrellmd' or some bizarre number in 32bit OS.
Back to top
View user's profile Send private message
Qylvaran
n00b
n00b


Joined: 28 Jan 2004
Posts: 74

PostPosted: Tue Nov 11, 2008 5:35 am    Post subject: Reply with quote

Huh? I've got make.conf and such set up for 32 bits, but it seems like media-libs/x264 wants to be 64-bit anyways:

Code:
>>> Emerging (33 of 309) media-libs/x264-0.0.20081006
 * x264-snapshot-20081006-2245.tar.bz2 RMD160 SHA1 SHA256 size ;-) ...   [ ok ]
 * checking ebuild checksums ;-) ...                                     [ ok ]
 * checking auxfile checksums ;-) ...                                    [ ok ]
 * checking miscfile checksums ;-) ...                                   [ ok ]
>>> Unpacking source...
>>> Unpacking x264-snapshot-20081006-2245.tar.bz2 to /var/tmp/portage/media-libs/x264-0.0.20081006/work
 * Applying x264-nostrip.patch ...                                                           [ ok ]
 * Applying x264-onlylib-20080406.patch ...                                                  [ ok ]
>>> Source unpacked.
>>> Compiling source in /var/tmp/portage/media-libs/x264-0.0.20081006/work/x264-snapshot-20081006-2245 ...
./version.sh: line 2: git-rev-list: command not found
Platform:   X86_64
System:     LINUX
asm:        yes
avis input: no
mp4 output: no
pthread:    yes
debug:      no
gprof:      no
PIC:        yes
shared:     yes
visualize:  no

i686-pc-linux-gnu-gcc -O4 -ffast-math -march=athlon-xp -O2 -pipe -fomit-frame-pointer -msse3 -Wall -I. -march=athlon-xp -O2 -pipe -fomit-frame-pointer -msse3 -DHAVE_MALLOC_H -DHAVE_MMX -DARCH_X86_64 -DSYS_LINUX -DHAVE_PTHREAD -fPIC
(^^^This is the set of options being used on all the compiler lines:  note the '-DARCH_X86_64'.^^^)

--snip--

/usr/lib/gcc/i686-pc-linux-gnu/4.2.4/../../../../i686-pc-linux-gnu/bin/ld: i386:x86-64 architecture of input file `common/x86/cabac-a.o' is incompatible with i386 output
/usr/lib/gcc/i686-pc-linux-gnu/4.2.4/../../../../i686-pc-linux-gnu/bin/ld: i386:x86-64 architecture of input file `common/x86/dct-a.o' is incompatible with i386 output
/usr/lib/gcc/i686-pc-linux-gnu/4.2.4/../../../../i686-pc-linux-gnu/bin/ld: i386:x86-64 architecture of input file `common/x86/deblock-a.o' is incompatible with i386 output
/usr/lib/gcc/i686-pc-linux-gnu/4.2.4/../../../../i686-pc-linux-gnu/bin/ld: i386:x86-64 architecture of input file `common/x86/mc-a.o' is incompatible with i386 output
/usr/lib/gcc/i686-pc-linux-gnu/4.2.4/../../../../i686-pc-linux-gnu/bin/ld: i386:x86-64 architecture of input file `common/x86/mc-a2.o' is incompatible with i386 output
/usr/lib/gcc/i686-pc-linux-gnu/4.2.4/../../../../i686-pc-linux-gnu/bin/ld: i386:x86-64 architecture of input file `common/x86/pixel-a.o' is incompatible with i386 output
/usr/lib/gcc/i686-pc-linux-gnu/4.2.4/../../../../i686-pc-linux-gnu/bin/ld: i386:x86-64 architecture of input file `common/x86/predict-a.o' is incompatible with i386 output
/usr/lib/gcc/i686-pc-linux-gnu/4.2.4/../../../../i686-pc-linux-gnu/bin/ld: i386:x86-64 architecture of input file `common/x86/quant-a.o' is incompatible with i386 output
/usr/lib/gcc/i686-pc-linux-gnu/4.2.4/../../../../i686-pc-linux-gnu/bin/ld: i386:x86-64 architecture of input file `common/x86/sad-a.o' is incompatible with i386 output
/usr/lib/gcc/i686-pc-linux-gnu/4.2.4/../../../../i686-pc-linux-gnu/bin/ld: i386:x86-64 architecture of input file `common/x86/cpu-64.o' is incompatible with i386 output
/usr/lib/gcc/i686-pc-linux-gnu/4.2.4/../../../../i686-pc-linux-gnu/bin/ld: i386:x86-64 architecture of input file `common/x86/dct-64.o' is incompatible with i386 output
collect2: ld returned 1 exit status
make: *** [libx264.so.65] Error 1
 *
 * ERROR: media-libs/x264-0.0.20081006 failed.
 * Call stack:
 * ebuild.sh, line   49:  Called src_compile
 * environment, line 2316:  Called die
 * The specific snippet of code:
 * emake CC="$(tc-getCC)" || die "make failed"
 * The die message:
 * make failed
 *
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at '/var/tmp/portage/media-libs/x264-0.0.20081006/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/media-libs/x264-0.0.20081006/temp/environment'.
 *

What's going on here?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on AMD64 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