The world’s fastest Penguin… and the namesake of the Gentoo Linux Distribution intended to indicate their goal of a very fast running Linux.
So pretty much all of yesterday went into installing Gentoo into a Virtual Machine. It’s a love / hate relationship now…
On the one hand, it gives me full control of all those things I want to see and control. On the other hand, I have to look at and deal with all those things AND with the consequences of my choices. So what Makes Gentoo different?
It has a package manager, sort of… Gentoo is installed from a small core of software that you boot up. A portable kernel, some ‘fetching tools’, and things needed to compile software. From that point forward, you fetch batches or packages of compressed source code and do a ‘compile and install’ on it. You get to do things like leave out of the kernel support for file systems that you will never use. You also get to set the things that you want it to do, and potentially screw them up. The overall process is like package based systems, but with source code in the package not precompiled binaries. This lets you assure that the sources being compiled are in fact the ones you looked at or validated as not buggered, but it also can take a fairly long time to compile a whole operating system (and you are still depending on a community to have looked at those sources).
Overall, it went reasonably OK. Lots of “geek stuff” to do and a very familiar set of “geeky output” to look at / ignore ;-) Everything went reasonably well, other than that the disk formatting / sectoring step didn’t work ( that bit of code either didn’t work or wasn’t found – I forget which). But I did the whole install into one disk sector on the virtual disk. At the end of the day it would not boot up.
Why? Unclear at this point. At 2 am I was just too sleepy to continue pushing it. In a day or two I’ll come back to it with a clear new focus and see if it is more obvious then. I think it is just that the “disk” will not mount / be found at boot time. I may well have incorrectly specified the name of the sector. I was looking at both “Grub” and “Lilo” (in the end using Lilo – Linux Loader – as I’m more familiar with it) and was ‘guessing’ a bit as to ought it be sda or sda1 or even sda0 as the ‘sector’ name when there was no re-sectoring done.
As an install onto bare hardware (real disks and real compute hardware) it would be about the same as an ‘old school’ install from sources, but with some more convenient and easier “package” control / processes. For an extra secure system, you would want your own sources / package archive and point those package fetch steps at those validated sources.
Couple of reasons:
1) Native compiled code can take advantage of all the hardware ‘tricks’ on that given CPU / motherboard. It will be significantly faster. Different CPUs have different hardware abilities (often added for performance) that are often not used by a ‘generic’ kernel.
2) You can leave out code you know you will never use, or that might be a security issue. So leaving out support for wireless connectivity on a computer with no wireless hardware, or simply leaving out ALL networking support in the kernel to build a system ‘provably secure’ against network based attacks. It can be made all of smaller, faster, and more secure this way.
3) Code left out is code that can not introduce bugs.
4) Compile options can be set to make the executables smaller, or larger and faster. (Such as memory allocation flags). You can customize for “fit on the old x486″ or “use extra memory to go faster on my 4 GB box”. It is more of what you want, less of what you don’t; with the emphasis on you.
5) The source code archive can be secured from tampering. This is mostly useful to large organizations with the staff to deal with looking at a lot of source code. It still has some value to the “lone independent” in that you can get a copy of the source code (from an “innocent” location) and unless the sources have been “buggered for all” know that you are not being ‘targeted’. Then if desired, particular programs can have a ‘diff’ done comparing them to older versions to see “what changed” and show up any “suspects”. (Heck, just a gross byte count by module will show up large virus / spyware insertions. Most Linux programs don’t grow a lot once made.)
6) Customizations can be done. Special drivers for special hardware. Making changes to encryption tables in encryption code (not recommended for the novice, but can screw up ‘expectations’ if done well). “Roll your own” encrypted things (like, say, an encrypted pipe) or make code memory resident only (for speed or security). I’ve seen some releases that have a ‘special’ encrypted RAM disk for storing encryption keys, for example, to make recovery from RAM even harder.
7) It is somehow satisfying to look at a nice code archive and think “That is MY operating system” ;-)
and a few more…
Gentoo looks like a well done fast and configurable solution, with some added attraction for security minded folks. It worked well from the CD .iso image even in Virtual Box (but that’s not a full system) and I generally like what I’ve seen.
It is NOT for the “newbie”. As an experienced Linux / Unix systems admin I was comfortable with “old friends” like reading the output of cc and the loader, of editing by hand config files like /etc/conf.d/modules and /etc/lilo.conf (though it uses a strange little editor called ‘nano’… I had to do a “emerge nvi” to get a decent vi editor… ;-) (For those not familiar with it, vi is a cryptic ‘visual editor’ that has strange keystroke driven commands. Having learned those, though, the ‘fingers just do it’ and I don’t have to think about it…)
Some of the commands are new to me, but not particularly hard. Instead of the ‘old school’ “make” command, it uses “emerge”. OK, not a big deal. There are a couple of such things, along with the usual ‘screwing around with where admin files live’ that happens between Unix, Solaris, System V (almost Unix…), Linux releases. (So /etc/conf or /etc/conf.d or just /etc/ or /etc/fstab vs /etc/vfstab or…)
Even if I don’t get the virtual machine version running, I’m highly likely to set up a desktop box using it. (I have a spare 10 GB disk I can put in one of my old White Box machines). As it is configurable for x486 up to multicore processors (default is 8 core limit, but you can override it) AND since it is compiled can easily be ported to all sorts of processors (including the ARM family) it is highly attractive as an option for a Raspberry Pi “backend” device and maybe even as the “disposable browser / email” box. Being able to make small, fast, dedicated builds for it is very attractive. I also saw one page with a topic of a cross compile where the target was an ARM chip set.
So it is, in essence, a tech guys environment; but with enough directions (and reliable enough processes) that even a “tech wannabe” could give it a go. But not for the “first time Linux trial”…
Not endorsing any particular one, just keeping track of them:
A guide book to how to install Gentoo:
1. About the Gentoo Linux Installation
First of all, welcome to Gentoo. You are about to enter the world of choices and performance. Gentoo is all about choices. When installing Gentoo, this is made clear to you several times — you can choose how much you want to compile yourself, how to install Gentoo, what system logger you want, etc.
Gentoo is a fast, modern metadistribution with a clean and flexible design. Gentoo is built around free software and doesn’t hide from its users what is beneath the hood. Portage, the package maintenance system which Gentoo uses, is written in Python, meaning you can easily view and modify the source code. Gentoo’s packaging system uses source code (although support for precompiled packages is included too) and configuring Gentoo happens through regular textfiles. In other words, openness everywhere.
It is very important that you understand that choices are what makes Gentoo run. We try not to force you onto anything you don’t like. If you feel like we do, please bugreport it.
How is the Installation Structured?
The Gentoo Installation can be seen as a 10-step procedure, corresponding to chapters 2 – 11. Every step results in a certain state:
After step 1, you are in a working environment ready to install Gentoo
After step 2, your internet connection is ready to install Gentoo
After step 3, your hard disks are initialized to house your Gentoo installation
After step 4, your installation environment is prepared and you are ready to chroot into the new environment
After step 5, core packages, which are the same on all Gentoo installations, are installed
After step 6, you have compiled your Linux kernel
After step 7, you have written most of your Gentoo system configuration files
After step 8, necessary system tools (which you can choose from a nice list) are installed
After step 9, your choice of bootloader has been installed and configured and you are logged in into your new Gentoo installation
After step 10, your Gentoo Linux environment is ready to be explored
When you are given a certain choice, we try our best to explain what the pros and cons are. We will continue then with a default choice, identified by “Default: ” in the title. The other possibilities are marked by “Alternative: “. Do not think that the default is what we recommend. It is however what we believe most users will use.
Sometimes you can pursue an optional step. Such steps are marked as “Optional: ” and are therefore not needed to install Gentoo. However, some optional steps are dependent on a previous decision you made. We will inform you when this happens, both when you make the decision, and right before the optional step is described.
An “Alternative Installation” method:
1. About this document
If the standard boot-from-CD install method doesn’t work for you (or you just don’t like it), help is now here. This document serves to provide a repository of alternative Gentoo Linux installation techniques to those who need them. Or, if you prefer, it serves as a place to put your wacky installation methods. If you have an installation method that you yourself find useful, or you have devised an amusing way of installing Gentoo, please don’t hesitate to write something up and post it on Bugzilla.
2. Booting the Install CD with Smart BootManager
Download Smart BootManager available from http://btmgr.sourceforge.net/download.html. Linux source or binary format and windows .exe versions are available as well as many language packs. However, at this time, the preferred method would be to use the binary format, as the source will not compile with newer versions of NASM.
Either compile the package from source or just grab the binary. There are several options that can be utilized while creating your boot floppy, as seen below.
Discussion of Gentoo on ARM chips.
Gentoo ARM Cross Compile Overlay
This is an effort to create an overlay to support cross compiling Gentoo for the ARM target (beagleboard/overo/openmoko etc ) and also provide a binary repo of the packages that have already been cross compiled for ARMv7a architecture. I have also started tracking the Openembedded Kernel i.e linux-omap-2.6 Kernel + OE patches in a git repository.
To give you an idea what kind of things are involved, here’s a snippet from a bit further down the page. You can “cookbook it” by just doing this kind of thing by rote, but once something goes ‘bump in the night’ and you are off page, well, that’s were newbies turn into new hackers…
Setting up you Environment
emerge -av git layman crossdev crossdev-wrappers
should show you a “gentoo-arm” overlay.
layman -a gentoo-arm
Now you should be able to use the overlay. Setup your crossdev environment with:
crossdev -t armv7a-softfloat-linux-gnueabi
The above example is for an OMAP3xxx processor (ARM Cortex A8). Replace with your ARM architecture or just arm- for generic ARM. Check here for other architectures link. Once the above command completes (it sets up your cross compile toolchain etc).
This sets up your /usr/armv7a-softfloat-linux-gnueabi/ . All the packages you emerge will now go here, and this will be your root filesystem. Remember there will be some files copied in by default. This requires you to set FEATURES=“-collision-protect” in your make.conf file. These files are technically not needed if you emerge the virtual/os-headers and glibc as the first packages along with baselayout. (YMMV).
(or where old hackers knock the rust off the old skill sets… So I'm learning what "layman" is and "emerge" is a new "Gentoo-ism" for me as well.)
Another guy’s ideas on installation:
Always nice to have some commentary from folks who have done it.
So you want to install Gentoo Linux.
The first thing you want to know is that its a very hands on Linux distribution, its not easy.
Gentoo takes a long time to install because you’re building everything from source and it’s being built for YOUR computer.
This guide is set up for a very basic Linux system, nothing else like kde or gnome, thats up to you.
It’s setup not to give you to much information, but enough to make the right choices needed to get the system up and running.
The Official Gentoo Linux install guide is HERE
But its way to much information for most people.
This one you shouldn’t use.
The new 2007.0 handbook uses a “install” script though X or a text based installer.
Lots of people have had issues with the new setup on the CD, so thats why I’ve made this one.
Basic guide lines:
Where the “this one” is a link to the 2007 guide and the “official” one is 2008. Some of their package locations are links that are out of date, but still informative as to naming.
FWIW, I was “cookbooking” some of this and didn’t notice that I’d gotten x86 base with 64 bit Stage3 so at the time I was to do a “chroot” into the new environment, it failed due to the executables being a non-match… That little “what is that x86 in the name for” oversight cost me about an hour… or two…
LOTS of packages of sources for various releases:
For example, here are the “Stage3″ x86 listings:
[DIR] hardened/ 03-Oct-2012 19:27 - [ ] stage3-i486-20121002.tar.bz2 03-Oct-2012 17:06 141M [ ] stage3-i486-20121002.tar.bz2.CONTENTS 03-Oct-2012 17:06 2.9M [ ] stage3-i486-20121002.tar.bz2.DIGESTS 03-Oct-2012 17:06 716 [TXT] stage3-i486-20121002.tar.bz2.DIGESTS.asc 03-Oct-2012 19:27 1.6K [ ] stage3-i686-20121002.tar.bz2 03-Oct-2012 17:07 141M [ ] stage3-i686-20121002.tar.bz2.CONTENTS 03-Oct-2012 17:07 2.9M [ ] stage3-i686-20121002.tar.bz2.DIGESTS 03-Oct-2012 17:07 716 [TXT] stage3-i686-20121002.tar.bz2.DIGESTS.asc 03-Oct-2012 19:27 1.6K
Choice of 486 vs Pentium class. Going to the supplied parent directories gives a lot more choices.
Including choices of more “current” vs slightly older releases. Going up even higher gives more options:
Index of /releases/x86
[ICO] Name Last modified Size Description
[DIR] Parent Directory -
[DIR] 10.1/ 10-Oct-2009 11:23 -
[DIR] 11.0/ 08-Mar-2011 02:20 -
[DIR] 11.2/ 07-Aug-2011 14:40 -
[DIR] 12.0/ 01-Jan-2012 18:26 -
[DIR] 12.1/ 31-Mar-2012 18:01 -
[DIR] autobuilds/ 07-Oct-2012 08:27 -
[DIR] current-iso/ 11-Jul-2012 20:28 -
[DIR] current-stage3/ 03-Oct-2012 14:27 –
SO you can even reach back to a 2009 era vintage
(for that old vintage hardware ;-)
Going just one step higher gives even more CPU type options, for use on that “variety hardware” you got at the University Yard Sale:
Index of /releases [ICO] Name Last modified Size Description [DIR] Parent Directory - [DIR] alpha/ 08-Aug-2009 19:47 - [DIR] amd64/ 31-Mar-2012 23:14 - [DIR] arm/ 08-Aug-2009 19:47 - [DIR] hppa/ 08-Aug-2009 19:47 - [DIR] ia64/ 08-Aug-2009 19:47 - [DIR] mips/ 28-Apr-2011 15:38 - [DIR] ppc/ 08-Aug-2009 19:47 - [DIR] s390/ 25-Aug-2009 17:37 - [DIR] sh/ 08-Aug-2009 19:47 - [DIR] snapshots/ 15-Apr-2009 21:08 - [DIR] sparc/ 08-Aug-2009 19:47 - [DIR] x86/ 31-Mar-2012 23:14 -
Notice that ARM is clearly on the list, but so are some other interesting options.
ia64 for 64 bits.
ppc for old PowerPC chip Macs.
Even sparc for that old Sun Server in the garage ;-)
The various “Live CDs” to start from
(including full release downloads for “live DVDs”):
1. Installation media
Gentoo Linux is available free over the Internet. You can download Gentoo Linux (weekly autobuilds) from the appropriate iso and architecture link below.
Please consult our Gentoo Handbooks for more information on what to download, how to install Gentoo, and how to verify the validity of our media.alpha: iso stages amd64: iso stages arm: stages hppa: stages ia64: iso stages ppc/ppc64: iso stages s390/s390x: stages sh: stages sparc: iso stages x86: iso stages
If you prefer to select a local mirror yourself, see Gentoo Mirrors.
Where all of those have ‘live links’ on the “iso” and “stages” parts. The “iso” gives the bootable CD, then “stages” has the source for the add-ons.
And, the “big lumps”:
3. Other media
LiveDVD (released April 1, 2012)
(up to 3.6 gigabytes depending on arch)
LiveDVD (released January 1, 2012)
(up to 3.6 gigabytes depending on arch)
LiveDVD (released August 7, 2011)
(up to 2.8 gigabytes depending on arch)
LiveDVD (released March 8, 2011)
(up to 2.6 gigabytes depending on arch)
Gentoo DVDs and CDs
If you simply don’t have the ability to download the large DVD or CD images, then you may wish to purchase a Gentoo DVD or CD.
Don’t know that most of us would need 2.6 GB of “Stuff”, but it will be a pretty complete operating system… I’ll likely try one “someday” when the box that has a DVD reader in it is not the one that is also “Linux Hostile”… (i.e. my HP g6 laptop).
LiveCDs beyond just the build environment:
Thanks to Cpasjuste and stonersmurf, we now have three Live-CDs!
See First Steps for a step-by-step tutorial on running them.
Note: Samsung drives are supported on the Gentoo LiveCD BETA v2, only.
Gentoo Minimal 2006.1 Get it from here!
This LiveCD is based on the minimal Gentoo Live-CD, so it doesn’t offer X. But download size is reasonable at around 90MB.
Gentoo LiveCD BETA Get it from here!
This LiveCD is based on the BETA Gentoo LiveCD. It includes our X.org framebuffer driver and a Gnome Desktop environment. Download size is around 600MB.
Gentoo LiveCD BETA v2 Get it from here!
md5 sum , Release Notes
It is the second revision of the Gentoo LiveCD BETA including the latest kernel updates for the Xbox 360. Download size is around 621MB.
So, got an old xBox 360 laying around? Want to play a whole ‘nother kind of game? ;-)
And, there’s even a dedicated wiki site for Gentoo:
With that, I think I’ve put enough “stuff” here. If, in 6 months, I decide to make that old ‘white box’ into a new class of cross compiler server, or whatever, I won’t have to rediscover all this stuff again…
For now, I’m likely to just download one of those 600 ish MB isos and give it a try. I’ve done the whole ‘compile and install’ thing, and it wasn’t too bad, so I got the main answer I was looking for: This is a pretty darned good candidate for a Raspberry Pi or Bagleboard or similar SBC. If I have size, performance, or ‘odd hardware’ issues, I can get into the sources and fix them. Lots of tools, and a pretty good developer community.
Hacker Heaven… and hell… can’t have one without the other ;-)