All the steps required for building a functional Gentoo stage4 from scratch.
Linux - DistributionsThis forum is for Distribution specific questions.
Red Hat, Slackware, Debian, Novell, LFS, Mandriva, Ubuntu, Fedora - the list goes on and on...
Note: An (*) indicates there is no official participation from that distribution here at LQ.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
All the steps required for building a functional Gentoo stage4 from scratch.
I am starting this as a new thread, because I was going off topic elsewhere. This will be a diary of sorts, relating how to build a Gentoo stage4 from scratch. A stage4 tarball is one which contains a fully functioning desktop with KDE and/or Gnome. I will also be adding many packages specific to development. Particularly for visualization systems and mathematics. I will also include LTSP, Gluster, Condor, Xen and others. Many of these are not included in Gentoo, and must be built independently.
All of this came about because of difficulty with having chosen the wrong stage3 from the beginning. I would advise against using the hardened-multilib, if you're inclined to be updating packages as I will here. The hardened-multilib stage3 is rarely updated, mostly for security reasons. So it is definitely the wrong stage3 to chose for development purposes.
For much of the external work with sources not from Gentoo, I will be using a terrific little package called src2pkg by Gilbert Ashley. It is also discussed in detail on this forum in many threads.
So I will now start by closing this and reposting the beginning of my remarks taken from elsewhere which led up to this.
I write notes for my systems so I know where things may be wrong and have pretty good ideas how to fix.
Unfortunately I have no clues for your box. All I know you changed profile from hardened to regular. Hardened profile is throughly tested, due to this program versions are older. I suspect your problems come from the fact you have a mixed system right now. I'm not saying it will cure everything, but here's what I'd do: emerge binutils, gcc, glibc, libtool; in this order. After that, emerge -e system. And I'd put that sandbox back to features.
I decided to restart with a completely clean Gentoo root. I am documenting my steps as I go along, so as to have a script to automatically repeat this entire process.
So far, I have run in this order:
Now here is where the instructions given here diverge from reality. emerging gcc gives you 37 total packages which must be installed. gcc cannot be built on it's own, separate from anything else. If there is a way to do that, it wasn't explained here. So just be aware, emerging gcc amounts to more than just a single build of one binary. It requires a total of 37 sources to be built as well. I should also add that I set this in /etc/make.conf:
EMERGE_DEFAULT_OPTS="--with-bdeps=y --buildpkg --deep"
So this may have influenced the build process, by adding more packages than would have
otherwise been emerged.
Be aware however, this is with a new installation. The instructions may have been valid if performed on a system that was already in place and running. However, I chose to start with a CLEAN system, and run the instructions given above, to ensure that I have the most up-to-date configuration possible. In any case, I have not encountered any problems yet.
I finally completed the process as stated above, with the exception of "emerge -e system". At that point, I found that I had a conflict between util-linux and setarch. So I decided to upgrade setarch, thinking that having a newer version might eliminate the problem. I was able to update setarch just fine, but that didn't fix the problem. I still have a conflict between setarch and util-linux, where each is blocking the other.
So I would like to hear now how to continue from this point, so that I have a completed upgrade. I will check on the net with Google, to see if there are any solutions given to resolve this conflict.
Are you referring to the old setup which I have since dropped into a basket.
Originally Posted by Electro
I suggest using the following command as root.
revdep-rebuild --ignore --pretend
This will hopefully fix your setup.
The original setup which I was trying to fix, has been dropped into a folder named ".old" in my root directory. I have since abandoned that old root entirely, and started over with a new stage3. The stage3 I used before was for the hardened-multilib. That was a nightmare. So I decided to start over from scratch, rather than beating my head against the wall. Maybe, just maybe, I'll go back and try to repair that old root later. But right now, I am committed to building the new root from a new (generic) stage3 (I made a mistake here and wrote stage2).
For the purposes that I'm engaging in, I haven't even chosen a different profile, other than what is specified by the default installation of stage3. My present thinking is this. I will use this new root as my build engine. I will use it to construct a stage4 installation. That tarball will then be copied to my functional system, and will then be used for daily operations. But the present build I'm engaged in now, will remain in pristine condition. Meaning I will make no changes (ie. customizations) in it except to add all of the packages I want to use in my working system. I will let conf-update handle all of the changes in /etc. Beyond that, I won't do anything else to it.
I am also thinking that I should start this as a new thread, explaining how to complete this process in detail for new users like myself.
Presently, I'm in the final stages (95 of 98 @ glibc-2.6.1) of running "emerge -e system". When this is done, I will then install the following:
lzma-utils (For my man pages)
conf-update (Wanted something to handle my /etc files)
sandbox (This is what started the whole mess in the first place!) This was installed by running "emerge -e system". So this step is unnecessary.
slang (Needed for the installation of mc.)
mc (I never work without this.)
gentoolkit-dev (For all the extra functions I will need in the future.)
autounmask (Now on to the fun stuff.)
ufed (Because I really like seeing what I'm doing in a gui.)
cppunit (I will doing a lot of compilations)
revdeps-rebuild (Required by rebuilding glibc.)
boost (Because most of what I'll be doing in the future, requires this.)
I will be adding more to this as I go along. This probably really ought to be a new thread.
Last edited by Shingoshi; 02-16-2008 at 01:03 PM.
Reason: I've found that some things changed from what was expected.
The ebuild lmsensors will be NEWLY installed while the others will be REBUILT. Look in the manual for emerge. The multislot USE flag means for multiple compilers. For developers, multislot is OK, but it might be a pain to work with at times.
harden installs is used for servers or paranoid desktop/notebook user.
mult-lib installs provides 32-bit libraries to be used with 32-bit programs such as Adobe Flash Player, Adobe SVG, Windows codecs, Sun Microsystems JAVA and a few others on a 64-bit installation.
A developer can go far using an stage3 install. If you have a 80686 (Pentium Pro) or better, use the i686 version. If you have a 80386, use the x86 install. If you are starting with stage1, use the catalyst script to help you through it.
If you want to introduce new programs in the Portage tree, talk to the Gentoo developers and add your programs to the Sunrise Portage tree overlay. This overlay gets overlooked from Gentoo developers to include more programs in the main Portage tree.
About a week ago I recently did a re-install of Gentoo because I have not done a world update since the old install of Gentoo which was a year and a half ago. I just did a stage3 install using the i686. I had problems with EAPI, so I had to change my plans installing kde first and then xfce4 and gnome last until emerge --sync saids I need to up date portage. I masked mysql-5 because I can not log in to mysql shell to set it up. I am using mysql-4 because it works as expected. I used "march=pentiumpro mtune=pentium4 --pipe -Os" as the CFLAGS. I think I can copy my install to my AMD Athlon (Slot A) and Pentium II.
XEN is in the main Portage tree. It just a keyword mask. This means it is experimental. VMware is better because it has a lot of features and it is easy to setup. VMware Server is free just like XEN.
I suggest do a complete install with out upgrading the whole system. Then backup the install and do a complete world update. If the compiler needs to be updated, do it first but only after backing up the install.
Your comments are greatly appreciated, and will be thoroughly considered.
I have not journaled everything in this process, because I had been redirected several times by packages that needed new USE flags, and/or dependencies to be installed first before proceeding with the installation. But I have tried to journal as much as possible, so that it can be easily repeated by the use of a script.
I have done a few things which many would probably say I should not have done (and they may be right). So far, I am running my Gentoo system in the chroot which I setup, and all seems to be going well. I have had a few missteps along the way, but they seem to have been resolved. The big NO NO that I've done, is upgrade to gcc-4.2.3. I will now continue with installing the rest of the packages I want as you have suggested. Then I will follow that with the "emerge world".
I just wish that I were able to use both of my dual-core Opterons. But since I have managed to damage my motherboard, and my system is barely running to capacity, I'm making do with what I have.
Please feel free to offer further suggestions as they come to mind.
If you have working sandbox you can skip the build in emerge -e system/world process, use emerge --skipfirst, you can even come back after emerge -e is finished and try again, it may build then.
You can also live without sandbox, to turn it off permanently add FEATURES="-sandbox" to your make.conf.
Setting FEATURES in make.conf has same effect as setting it from command line. Actually command line overrides everything else. -oneshot option does not change anything in build process, the only difference it makes is package is not stored in world file.