Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
creating a personalised stage3 install ?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
toliman
n00b
n00b


Joined: 08 Aug 2002
Posts: 14
Location: Melbourne, AU

PostPosted: Wed Dec 04, 2002 3:55 am    Post subject: creating a personalised stage3 install ? Reply with quote

i was reading this forum post about installing gentoo on older hardware with limited HDD space, https://forums.gentoo.org/viewtopic.php?t=24687, and it has some great tips on stripping locale info, doc's, and also suggests installing a handful of apps before churning through stage 3 (emerge system) and the -Os flag, which im willing to try out later today. combined with some of the other tips and hints, i hope to get a useful system that i wont need to tinker for days just to get GUI & apps installed. (it was fun the first dozen times ... )

the system i want to install to is a compaq K6-2 400mhz laptop, has 96mb of RAM, and 1.2gb HDD, but it runs out of space fairly quickly once xfree86, and gnome &/or kde is installed, leading to a reinstall of everything once a new version of some installed app comes out. the gcc compile alone takes about 4-7 hours, so i'd like to avoid doing it again. and again. and again. :(

the thought occured to me, is there any tricks or tips needed to install gentoo on a different platform & different system (in this case, VMware on an athlon Xp 2100) and then move the files over, a 'la' stage3 / stage4, with xfree86, openoffice, mozilla, xmms, fluxbox, preinstalled ?

are there any issues with this ? any nasty surprises or tips ?
Back to top
View user's profile Send private message
lx
Veteran
Veteran


Joined: 28 May 2002
Posts: 1012
Location: Netherlands

PostPosted: Wed Dec 04, 2002 2:20 pm    Post subject: Reply with quote

What you could do is build it using the -b option, and thus making packages, on one system and unpack them on another, but the first systems needs the same libraries as the later, so all lib dependencies are in sync. You can unpack the cd image and rsync/ copy the packages to /usr/portage/packages or you could even mount it using NFS i suppose. Well it's a thought,

Ps it's better to use a chroot environment and not vmware (cause it costs a lot of processor when compiling), If done of seperate partition you could even create a backup system if you break your athlon-xp gentoo system, cause athlon-xp also runs k6 (or doesn't it?).

Cya lX.
_________________
"Remember there's a big difference between kneeling down and bending over.", Frank Zappa
Back to top
View user's profile Send private message
px
Guru
Guru


Joined: 26 Sep 2002
Posts: 497
Location: Metz, France

PostPosted: Wed Dec 04, 2002 2:26 pm    Post subject: Reply with quote

you can also check for the how to make a stage 4 in this forum, I saw it a few week ago.
_________________
Nous autres, mordus d'informatique, préférons par-dessus tout passer notre temps à bidouiller nos ordinateurs, plutôt que les utiliser pour faire quelque chose de productif. [Dave Barry]
Back to top
View user's profile Send private message
paul138
Guru
Guru


Joined: 09 Aug 2002
Posts: 370
Location: Ottawa, ON

PostPosted: Wed Dec 11, 2002 9:53 pm    Post subject: simple Reply with quote

If you have a working gentoo system, or any other linux system for that matter, here is a quick how-to:

make a build directory and untar an existing gentoo stage3 to it:
Code:

mkdir /tmp/build
cd /tmp/build
tar xvjpf /mnt/cdrom/stage3-*

Now bind the proc filesystem to it and chroot to it:
Code:

mount -o bind /proc /tmp/build/proc
cp /etc/resolv.conf /tmp/build/etc
chroot /tmp/build /bin/bash
env-update
source /etc/profile

Now you're in your stage 3 system. I like to sync the portage tree and update portage first:
Code:

emerge rsync
...wait...
emerge -pu portage (see what needs to be built for this)
emerge -u portage
...wait...

Now update your make.conf file for the appropriate flags and then update the system:
Code:

emerge -pu world (to see how many coffees you'll be able to consume)
emerge -u world (go and drink them)

Come back later and you'll have the equiv of an updated stage3 tarball (just not tarred yet). Emerge any othe packages you like (eg. X, gnome, WindowMaker, etc) Just keep an eye on the space (from another console do:
Code:

du -sH /tmp/build

Make sure it stays below around 900M or you wont be able to fit it on a CD.
Now, you're done. Complete the following:
Code:

cd /usr/portage/distfiles
rm *
cd /var/tmp/portage
rm -fr *
exit
umount /tmp/proc
cd /tmp/build
tar cvjpf my-stage3.tbz2 --numeric-owner .
...wait...

Go have supper. You now have a working stage 3 that you can burn onto a CD or just scp to the machine you're installing and follow the install steps as you would any other stage 3 install.

I've done this with 1.2 and 1.4 systems many times and works like a charm. WHen you need to install 2-5 systems a week, you dont have time to wait for bootstrap to run :)

Have fun.
If you have any questions feel free to PM me.

(PS VMWare is for the birds ;) )
_________________
Talk is cheap because supply always exceeds demand.
Back to top
View user's profile Send private message
toliman
n00b
n00b


Joined: 08 Aug 2002
Posts: 14
Location: Melbourne, AU

PostPosted: Thu Dec 12, 2002 1:12 am    Post subject: Reply with quote

ahh thanks for that , i really appreciate the effort to write that up ...

my main concern was compiling larger, intensive apps like openoffice and mozilla in the "emerge system" part of stage3, because those two monsters alone take up somewhere in the vicinity of 20-30 hours to compile and... well over 2gb of temp-space towards the end. The same could be said about gnome/kde, so the theory works for other intensive apps that require a day and a half (or more) to compile.

also i added some gimmicky things like gtkam, gtksee, gtkskan, fortune-mod, grip, fluxbox, gkrellm, ngrep, nmap, hotplug, procinfo and others.

as was expected, openoffice under vmware took an ungodly amount of time. . . finally, after finishing the compile, stripping the docs and the distfiles/temp directory, copying it over via tar/ftp, installing it, it seems to be working just fine.

i'm now curious about scp though, would scp also move permissions and ownership over ? what would i check/set for scp ?

to make things worse, i rsync'd today, and lo and behold, i now need to recompile essentially from stage1 again, new binutils, gcc, texinfo, perl, python etc.
( is this gentoo v1.4 final being run through the testing stages? )

.. again, another 2 whole days of compiling in front of me.
Back to top
View user's profile Send private message
paul138
Guru
Guru


Joined: 09 Aug 2002
Posts: 370
Location: Ottawa, ON

PostPosted: Thu Dec 12, 2002 3:01 pm    Post subject: More advanced Gentoo admin Reply with quote

I know what you're saying when you talk about building open office. I built it just to see how long it would take. 27 hours on my 900MHz machine and then it failed to work :cry: It's my opinion that the openoffice-bin is the ideal way to go. It's just a waste of time and cycles to build it from scratch with no real advantages.

The system I use with the pre-built stage three tarballs allows me to install a system in less than an hour though, and that's good :wink: I'm supprised that no one has begun building tarballs and putting them up for download anywhere.

With scp, you're kind of stuck. The ownership of the files is that of the user who sent them to the remote system. However, you could scp the binary (tbz2) package to the machine and then install it with ssh:
Code:

scp mypackage.tbz2 root@computer:/usr/portage/packages/All/
...wait...
ssh -l root computer 'emerge -k package-you-uploaded'
...wait...
done
:wink:

I use that type of a system except that I share the /usr/portage/packages directory via NFS and build them on a centrallized system.

Code:

               [build server]
   +-----------+----NFS-----+-----------+
[server-1]  [server-2]  [server-3]  [server-4]

(on the build server)
emerge rsync
...wait...
emerge -bu world
...wait...
(I have a script that handles this and a local portage rsync mirror - this is all done from the build server)
ssh -l root server-1 'emerge rsync; emerge -uk world'
ssh -l root server-2 'emerge rsync; emerge -uk world'
ssh -l root server-3 'emerge rsync; emerge -uk world'
ssh -l root server-4 'emerge rsync; emerge -uk world'
...go have a coffee...

After that, you'd need to go to each system and check your config files for updates and change them as needed.

This provides a way to build once - install many providing the other systems are (for the most part) identical.

Also using distcc helps a lot of the time. It can build most of the packages and sometimes cut a considerable amount of time off of the build.
_________________
Talk is cheap because supply always exceeds demand.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo 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