On Thursday 17 July 2003 12:31, oom wrote:
> Greetings Gentooers,
>
> I have been pondering the fastest way to setup other gentoo boxes eg:
>
> I setup 1 box with the config I want and maybe even do a emerge -b so
> that binary packages are created.
>
> Now I want to go to another box install the base and type emerge world
> and watch the distro put itself together with the same pacakge
> configuration (minus /etc/ files etc).. how is the best way to do this ?
>
> I was thinking mounting the /usr/portage/distfiles via nfs (or copy them
> local) and grab the /var/db/pkg directory
> then emerge world -e
>
> Are there any other files or directories I will need to nab ?
>
I can't vouch for any of this coz I haven't tried it, but...
The quickest way is definately with packages. However, it's only the best way
if they are compiled against the new architecture. I don't think there's a
way to build packages for a different architecture without installing over
your own system, so if you have different machine specs then recompiling
everything is the way to go (or going for the lowest common denominator) -
unless there IS a way to build packages without installing.
If you didn't build packages for everything on your current system, there is
two ways to do it:
1)
for i in `find /var/db/pkg/* -mindepth 1 -maxdepth 1`; do quickpkg $i; done
2)
emerge -e -b world
The first way is *much* faster but will include all your configuration changes
into the packages. The second way will take basically the same amount of time
as building a system from scratch, but you will leave the second machine free
until needed to be installed.
Now that you've packaged all that's installed, there is two ways to get them
onto the new system. One is quick and dirty, the other is slow(er) and clean.
For the quick and dirty way, you'll want to make sure that your packages dir
is clean before doing either of the above.
1)
Follow the installation guide up until "extracting the stage tarball", get
access to your first machine and then run the following from the root (not
yet chrooted) path of your new install:
tar -xvjpf /path/to/packages/All/*.tbz2
cp -R /path/to/portage usr/portage
cp -R /path/to/edb var/cache/edb
cp -R /path/to/pkg var/db/pkg
Chroot to your new installation and continue on with final configuration.
2)
Follow the installation guide up until "extracting the stage tarball". Extract
the stage 1 tarball and bootstrap. After that copy the entire portage tree
from your first machine to your second machine. Then instead of "emerge
system" run "emerge -k system" to use your packages. Finish the installation,
copy the /var/cache/edb/world file from your older computer to an arbitrary
location and then run the following:
emerge -n `cat /arbitrary/location/world`
---
I'll probably get a few "what the f##k..." over the first method, but I can't
see why it wouldn't work. In fact, using method 1 in both steps, you could
probably reproduce a box fairly cleanly in less than an hour - but be warned,
it's *not tested*. Care to test it? ;~)
Also, with either of the two methods, make sure that your USE flags are the
same on each machine. If they're not, you may run into problems further down
the track when upgrading software.
Regards,
Jason
--
[EMAIL PROTECTED] mailing list