Your best bet is installing a second HD and starting from Step 6 of the
gentoo install doc.

Also,  I found this on the web,  should help some (read: a lot).
------------------------------------------------------
Posted by: deornoth 
http://forums.gentoo.org/viewtopic.php?t=7010

I assume that you already have access to a computer system running a 
Linux-based OS, and that you have the legal right to use the root
account 
on the machine. I also assume that this is the same machine you want to 
upgrade to Gentoo, but without shutting it down, or rebooting! 

I also assume that you have installed Gentoo in the regular manner on at

least one other system, and if not, you read the Gentoo installation 
instructions very thoroughly. Also, hopefully you have some Linux 
installation and administration experience to work with. I will not take

responsibility in any way for anything that you mess up by following the

instructions in this document. 

All is possible, my friend. Just remember, these instructions worked for

me, but that's as far as I'm willing to put my money on them. I've
tested 
them, and tried them myself, and they seem to work. But I make no 
guarantees if you royally hose your system while following (or not 
following) any of the instructions in this document. Root access is a 
privilege, and a dangerous one at that. Be careful and cautions with it,

and you shouldn't have any problems. 

You may also perform the following: 
# export GENT="/mnt/gentoo" 
and instead of all those '/mnt/gentoo's, just put a $GENT (or whatever 
you named the variable), ie: $GENT/usr/bin 

HOWTO! 

Unpack Gentoo Stage 1 bz2 into /mnt/gentoo (for simplicity): 
# mkdir /mnt/gentoo 
# cd /mnt/gentoo 
# tar -xjpf /path/to/stage1-ix86-1.2.tbz2 

Setup ebuild make configuration: 
# mv /mnt/gentoo/etc/make.conf /mnt/gentoo/etc/make.globals /etc 

Edit /etc/make.conf, and add the line: 
CONFIG_PROTECT="/etc /dev" 
somewhere in the file. 

(If you feel like losing ALL your configuration information, and any 
special settings on devices, go ahead and ignore this step... but I 
warned you!) 

Make any other changes you feel are necessary. I like to change the 
MAKEOPTS="-j2" option in /etc/make.globals to a "-j3" on my dual-cpu 
SMP system, as it speeds up compilation. 

Finish ebuild's make configuration 
# mkdir -p /usr/portage/profiles/default-1.0 
# ln -s /usr/portage/profiles/default-1.0 /etc/make.profile 

Copy over the blank ebuild database that ships with Gentoo: 
# mv /mnt/gentoo/var/cache/edb /var/cache/ 

Copy over the base Portage files needed to emerge packages: 
# mv /mnt/gentoo/usr/lib/portage /usr/lib/ 

If Python 2.2 not installed, you will need to: 
# mv /mnt/gentoo/usr/bin/py* /usr/bin 

Install the Python 2.2 Portage modules: 
# mv /mnt/gentoo/usr/lib/python2.2 /usr/lib/ 
# mv /mnt/gentoo/usr/include/python2.2 /usr/include/ 

If any version of GCC is installed that would interfere with Gentoo, 
uninstall it now. This specifically includes the 2.96.x version shipped 
with RedHat 7.x distributions. 

To use Gentoo's GCC (highly reccomended), simply: 
# mv /mnt/gentoo/usr/bin/gcc /mnt/gentoo/usr/bin/cpp /usr/bin 

If using the prebuilt GCC from Gentoo, you also need it's lib and
include 
files: 
# mv /mnt/gentoo/usr/include/* /usr/include 
# mv /mnt/gentoo/usr/lib/gcc-lib/* /usr/lib/gcc-lib/ 
# mv /mnt/gentoo/usr/i486-pc-linux-gnu /usr/ 
# mv /mnt/gentoo/usr/lib/* /usr/lib 

Copy the Sandbox library over to our system, so we can use it: 
# mv /mnt/gentoo/lib/libsandbox.so /lib 

Update the system, so it knows about the new libraries: 
# ldconfig 

If you decided to remove your old compiler, you can compile programs
again 
from this point on. 

We need to allow emerge to see Gentoo's sysvinit generic script
functions: 
# mv /mnt/gentoo/sbin/functions.sh /sbin 
# ln -s /sbin/functions.sh /etc/init.d/functions.sh 

Make sure we have some necessary tools: 
# mv /mnt/gentoo/bin/* /bin 
# mv /mnt/gentoo/sbin/* /sbin 
# mv /mnt/gentoo/usr/bin/* /usr/bin 
# mv /mnt/gentoo/usr/sbin/* /usr/sbin 

Make sure bison will compile: 
# mv /mnt/gentoo/usr/share/bison /usr/share 

Once you have reached this point you should have no need of the
/mnt/gentoo 
directory, and it can be safely 'rm -rf'd. 

Note: Once you start emerging, somehow cp, rm, and mv all get aliased to
have 
a -i argument. This means you will have to answer 'y' to all questions
during 
an emerge.  ... I just 'yes | emerge <whatever>' 

Now we finally get to start the fun! 
# emerge rsync 

Now to bring the system up to Gentoo-date: 
# emerge --pretend gcc 

Make note of which version of baselayout is supposed to be installed.
Once 
you have the version, do a: 
# emerge inject sys-apps/baselayout-x.y.z 
where x.y.z is the version number and any revision addition (-r1 etc). 

If you don't do this, baselayout will be built, clobbering /etc and
/dev, 
even though they are protected by CONFIG_PROTECT. All it does is build 
glibc and gcc statically. We already have a compiler and shared
libraries, 
so we should be able to safely ignore it. 

Once you have told portage that you already have a baselayout, go ahead
and 
upgrade/install glibc by typing: 
# emerge glibc 

If you are using RedHat 7.x, emerge glibc will fail at the very end.
Don't 
worry about this, it just clobbered a RedHat binary's library. Simply do

the following to fix it for now: 
# rm -rf /lib/i686 

Now we do gcc: 
# emerge gcc 

And finally upgrade/rebuild the system with: 
# emerge system 

After this emerge system, baselayout should no longer give us a problem,

as we are working with a bona-fide Gentoo system now! emerge -e system 
all you want! 

The rest of the installation should be just like a regular Gentoo
install. 
If you want to tell emerge that you already have a program installed,
and 
don't want to compile a version right now, just do a: 
# emerge inject <package> 
to insert it into the ebuild tree, and have it seen as 'on' by the
system. 
Say you already have syslogd and you don't want to reinstall it, just do

this: 
# emerge inject syslogd-x.y.z 
(x.y.z are a version number, of course) and presto, it's added to the 
system, ready to update on an 'emerge -e system' or however you do a 
global update. You'll most likely not want to do this too much, as the 
old version may be in an odd location, or just simply a non-Gentoo
location. 
If this occurs, simply remove the package using your old package tools 
(you did keep those, right?), and emerge the new one. 

Aside from the possible kernel update (if you want to), there is no
reason 
that you should have to reboot your computer during any part of this 
process. Heck, you could probably leave the system up and running as a 
server if you wanted too. Just remember, if you kill your old C compiler

to install Gentoo's 2.95 one, let your users know about it beforehand, 
as they won't like the results of using a compiler that dissappears. ;-D


Good Luck,
Gabe

-----Original Message-----
From: Andrew Gaffney [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, October 29, 2003 7:23 PM
To: [EMAIL PROTECTED]
Subject: Re: [gentoo-user] Switch from RH9 to gentoo

Alex Nelson wrote:
> Does anyone out there have any practical experience in migrating a
live
> server running Red Hat 9.0 over to Gentoo? I don't mind a short amount
> of downtime but don't want to have to back up the entire server and
then
> try and rebuild it. I would like to convert it "in-place" if I can.
Any
> help or suggestions are welcome!

I've heard of someone migrating a Slackware system over to Gentoo over a
period of about a 
month, but I'm pretty sure this person knew what they were doing. In
your cause, I'd do 
what I did migrating from Slackware. First, I added a second HD to the
server. I followed 
the Gentoo Install Guide to start the install on the second drive. This
box has dual 
Athlon MP 2200+s, so all that compiling in the background didn't affect
it that much. If 
you can't afford the server to be slowed down while Gentoo is building,
I would recommend 
doing the install on another computer and then bringing the HD over.
Once you have all the 
programs installed under Gentoo that you were using under RH, take the
machine down. 
Reboot from a Gentoo LiveCD or similar. Copy your data (db's, mail,
/home, web files, 
etc.) over to the Gentoo installation. Switch the HDs do the machine
boots from the Gentoo 
drive. Test. If all doesn't work immediately (or with minimal coaxing)
switch the HDs back.

-- 
Andrew Gaffney


--
[EMAIL PROTECTED] mailing list




--
[EMAIL PROTECTED] mailing list

Reply via email to