View previous topic :: View next topic |
Author |
Message |
Qylvaran n00b
Joined: 28 Jan 2004 Posts: 74
|
Posted: Sun Oct 19, 2008 7:07 am Post subject: Converting from 64bit to 32bit |
|
|
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 |
|
|
DaggyStyle Watchman
Joined: 22 Mar 2006 Posts: 5909
|
Posted: Sun Oct 19, 2008 7:46 am Post subject: |
|
|
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 |
|
Back to top |
|
|
desultory Bodhisattva
Joined: 04 Nov 2005 Posts: 9410
|
Posted: Sun Oct 19, 2008 8:20 am Post subject: |
|
|
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.
- Use a 32 bit stage 3 to create a chroot environment, for the purposes of this overview at /32-bit/.
- Copy /etc/resolv.conf and the contents of /var/lib/portage/ from the host system into the corresponding locations under /32-bit/.
- Edit the world file, and if present and necessary world_sets, under /32-bit/ to remove the emulation packages.
- Copy any appropriate settings from/etc/make.conf and /etc/portage/ to the corresponding locations under /32-bit/.
- Bind mount /dev/, /proc/, /sys/ and /usr/portage/ under /32-bit/.
- Enter the chroot environment.
- Set an appropriate profile.
- 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.
- Boot to a live CD, or equivalently independent system.
- 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.
- Remove everything outside of /32-bit/ from the installed system.
- 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 |
|
|
appetitus Apprentice
Joined: 28 Sep 2003 Posts: 210
|
Posted: Sun Oct 19, 2008 11:54 am Post subject: |
|
|
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 |
|
|
loftwyr l33t
Joined: 29 Dec 2004 Posts: 970 Location: 43°38'23.62"N 79°27'8.60"W
|
Posted: Sun Oct 19, 2008 2:00 pm Post subject: |
|
|
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 |
|
|
Qylvaran n00b
Joined: 28 Jan 2004 Posts: 74
|
Posted: Sat Oct 25, 2008 8:50 pm Post subject: |
|
|
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 |
|
|
devsk Advocate
Joined: 24 Oct 2003 Posts: 2995 Location: Bay Area, CA
|
Posted: Tue Oct 28, 2008 5:40 am Post subject: |
|
|
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 |
|
|
fangorn Veteran
Joined: 31 Jul 2004 Posts: 1886
|
Posted: Tue Oct 28, 2008 8:14 am Post subject: |
|
|
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 |
|
|
Qylvaran n00b
Joined: 28 Jan 2004 Posts: 74
|
Posted: Mon Nov 10, 2008 11:20 pm Post subject: |
|
|
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 |
|
|
devsk Advocate
Joined: 24 Oct 2003 Posts: 2995 Location: Bay Area, CA
|
Posted: Mon Nov 10, 2008 11:59 pm Post subject: |
|
|
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 |
|
|
Qylvaran n00b
Joined: 28 Jan 2004 Posts: 74
|
Posted: Tue Nov 11, 2008 5:35 am Post subject: |
|
|
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 |
|
|
|