View previous topic :: View next topic |
Author |
Message |
m1k0 Apprentice
Joined: 27 Dec 2006 Posts: 180 Location: Radom/Poland
|
Posted: Tue Aug 14, 2007 9:05 am Post subject: How to reinstall from 64 bit to 32 bit? |
|
|
How to reinstall system form
Code: | CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=athlon64 -O2 -pipe"
|
to
Code: | CHOST="i686-pc-linux-gnu"
CFLAGS="-march=k8 -O2 -pipe -fomit-frame-pointer" |
It is possible witout destroying anything? _________________ MSI GX-70 |
|
Back to top |
|
|
didymos Advocate
Joined: 10 Oct 2005 Posts: 4798 Location: California
|
Posted: Tue Aug 14, 2007 9:11 am Post subject: |
|
|
Don't even try it. It's just going to break. I won't say it's impossible, just highly improbable, that you'd ever get it working again. Even if you succeeded, you've effectively reinstalled and rebuilt everything, so what's the point?
[edit] If you pulled it off though, it'd make a great story. _________________ Thomas S. Howard |
|
Back to top |
|
|
mdeininger Veteran
Joined: 15 Jun 2005 Posts: 1740 Location: Emerald Isles, observing Dublin's docklands
|
Posted: Tue Aug 14, 2007 9:41 am Post subject: |
|
|
the only sensible way of doing that would involve fetching and unpacking an x86 stage3 tarball (into its own directory! not in the root directory!) and then copying over all of the configuration (including your world-file and /etc), modifying the make.conf in the chroot afterwards, chrooting into that and doing the usual emerge --sync && emerge -e system && emerge -e world.
or at least 'cp -a /usr/portage/* /media/my-shiny-new-gentoo-where-i-unpacked-the-stage-tarball/usr/portage' instead of emerge --sync.
why would you want to do that? _________________ "Confident, lazy, cocky, dead." -- Felix Jongleur, Otherland
( Twitter | Blog | GitHub ) |
|
Back to top |
|
|
didymos Advocate
Joined: 10 Oct 2005 Posts: 4798 Location: California
|
Posted: Tue Aug 14, 2007 9:53 am Post subject: |
|
|
No way man, that doesn't count. It has to be done without any of that 'safe' stuff like chroots and whatnot. No tarballs either. Switch the profile, and start building, baby.*
*Note: Don't do this. _________________ Thomas S. Howard |
|
Back to top |
|
|
mdeininger Veteran
Joined: 15 Jun 2005 Posts: 1740 Location: Emerald Isles, observing Dublin's docklands
|
Posted: Tue Aug 14, 2007 10:31 am Post subject: |
|
|
didymos wrote: | No way man, that doesn't count. It has to be done without any of that 'safe' stuff like chroots and whatnot. No tarballs either. Switch the profile, and start building, baby.* |
you forgot the very important exclamation "WRYYYYYY?????!?!??" after about 2-3 core packages got themselves emerged.
didymos wrote: | *Note: Don't do this. |
yep, better not even try it. might get fairly ugly when half of the programs are already rebuilt as 32bit binaries and half of the libs are still 64bit binaries. the linker reaaaaaaaally likes that... not. _________________ "Confident, lazy, cocky, dead." -- Felix Jongleur, Otherland
( Twitter | Blog | GitHub ) |
|
Back to top |
|
|
didymos Advocate
Joined: 10 Oct 2005 Posts: 4798 Location: California
|
Posted: Tue Aug 14, 2007 10:45 am Post subject: |
|
|
Well, the best part comes when you've got a 32-bit ncurses and bash dies as soon as the 64-bit copy has gone bye-bye:
Code: |
<snip evil emerge error messages>
|
Hypothetical User wrote: |
Umm, wait, what?
|
Code: |
# ls
You're screwed!*
|
You could actually get around this (not that it would help in the long run), but I don't want to give some random forum lurker any ideas.
*Note: Error message may have been paraphrased
[edit] OK, if you get that far. Which you might. _________________ Thomas S. Howard |
|
Back to top |
|
|
m1k0 Apprentice
Joined: 27 Dec 2006 Posts: 180 Location: Radom/Poland
|
Posted: Tue Aug 14, 2007 1:20 pm Post subject: |
|
|
Thanks,
I don't want install all from begin because I have a lot of configs, etc...
mdeininger wrote: | why would you want to do that? |
64bit is good for server but not for workstation/desktop. I want Java, OpenOffice, flash and some binary bundled for x86. _________________ MSI GX-70 |
|
Back to top |
|
|
didymos Advocate
Joined: 10 Oct 2005 Posts: 4798 Location: California
|
Posted: Tue Aug 14, 2007 1:28 pm Post subject: |
|
|
You can run all those with an amd64 install. For flash, just emerge firefox-bin instead of firefox. OOo can be built, but you can also get the bin package for that. Java works fine for both as well. I assume you refer to a browser plugin, and again, there're packages for running 32-bit Java on a 64-bit system. Admittedly, these other binaries could be a problem, but it depends on what libraries they require. _________________ Thomas S. Howard |
|
Back to top |
|
|
m1k0 Apprentice
Joined: 27 Dec 2006 Posts: 180 Location: Radom/Poland
|
Posted: Tue Aug 14, 2007 2:09 pm Post subject: |
|
|
didymos, I have *-bin packages - but this packages depends on 32bit libriaries (multilib). Java run on 2x more memory, OO has many problems with java, Flash work under FireFox, but not under Konqueror, etc... _________________ MSI GX-70 |
|
Back to top |
|
|
mdeininger Veteran
Joined: 15 Jun 2005 Posts: 1740 Location: Emerald Isles, observing Dublin's docklands
|
Posted: Tue Aug 14, 2007 4:54 pm Post subject: |
|
|
well, i got amd64 on my desktop with no issues at all, but i guess i can relate to your problem.
basically, what you want to do is back up your old configuation, unpack the stage3 and copy your old config back in after you unpacked it. if you include the world-file, you should be all-right after an emerge -e world, nothing lost. (at least in theory).
updating it in place really is a bad idea though . _________________ "Confident, lazy, cocky, dead." -- Felix Jongleur, Otherland
( Twitter | Blog | GitHub ) |
|
Back to top |
|
|
Akkara Bodhisattva
Joined: 28 Mar 2006 Posts: 6702 Location: &akkara
|
Posted: Wed Aug 15, 2007 1:53 am Post subject: |
|
|
I've been following this and thought of an idea. Don't know if it'd work.
What if one changes their CHOST to 32-bits and do a emerge -e --buildpkg --buildpkgonly system. Then set up a chroot and emerge --usepkg the above-created list.
Would that work?
(I don't need to do this, just sometimes like to tinker and understand things better.) |
|
Back to top |
|
|
didymos Advocate
Joined: 10 Oct 2005 Posts: 4798 Location: California
|
Posted: Wed Aug 15, 2007 2:13 am Post subject: |
|
|
There's actually a profile for that, sort of. It's not intended for general use, but can be found at /usr/portage/profiles/default-linux/amd64/dev/32bit-userland
It's intent is to be used for building 32-bit emul packages, and you're supposed to start the chroot off with an amd64 stage2. I fiddled around with it, and you can get it functional, but it's very quirky in places. For one, forget about building gcc or glibc. They just fail. But since you've got a multilib toolchain, you can still build basically anything else. It's also wise to leave binutils alone. There's a bit more here:
http://www.gentoo.org/proj/en/base/amd64/emul/index.xml
There are some other pitfalls to watch out for as well. I found it best to keep python 64-bit and a couple of other core python packages as well. If you want to upgrade the toolchain, you have to reset the ABI stuff in the chroot make.conf, and build it first. The same goes for updating glibc or python. Then you lock down as much as you can of those in package.provided (like I said, it's quirky. For example, you can list glibc in package.provided, but emerge ignores that and tries to build it anyway. Another one is linux-headers, which you can lock down, but only if you're not using the 'emptytree' option). There's other fun stuff, but overall, it's not as bad as it sounds.
You might be able to pull it off with a stage3 amd64 tarball, but I wouldn't want to try it. _________________ Thomas S. Howard |
|
Back to top |
|
|
01mf02 Veteran
Joined: 21 Nov 2004 Posts: 1070 Location: Innsbruck, Austria
|
Posted: Wed Aug 15, 2007 12:44 pm Post subject: |
|
|
Just my .02 in case somebody stumbles over this thread and finds it as interesting as I do ...
The problem of m1k0 seem to be configuration files. I have thought about how to solve this problem for me some time ago (in case I would need to reinstall my Gentoo), and I've come up with a solution that works well for me: A configuration file editing script that keeps a copy of the file in my home directory! That way, when I want to reinstall, I would save a lot of time by just copying these files from my home partition to their respective place on the system partition. Example:
Code: |
michi@tux ~ $ confed.sh /etc/make.conf
Target file: ~/configs//etc/make.conf
Password:
<Editing the config file here, maybe adding a new USE flag>
Copy new version? [Y/N] y
cp: overwrite `/home/michi/configs//etc/make.conf'? y
michi@tux ~ $
|
The script is here (for unexperienced users: save this e.g. as confed.sh, run "chmod +x confed.sh" and execute as stated above):
Code: |
#!/bin/bash
if [ ! -z "$1" ]
then
echo "Target file: ~/configs/$1"
sudo nano -w $1
mkdir -p ~/configs/`dirname $1`
echo -n "Copy new version? [Y/N] " ; read ans
case "$ans" in y*|Y*) sudo cp -i $1 ~/configs/$1 ;; *) ;;
esac
else
echo "Please enter the filename of the configuration file you want to edit!"
fi
|
It's not perfect, but it does its job. |
|
Back to top |
|
|
|