The preferred method of installing gentoo is to use a stage3 tarball and a liveCD following the Gentoo Handbook. Any liveCD will do, including the Gentoo liveDVDs.
Second choice is a stage3 install supported by Sneakernet. This differes only in that things are fetched from the internet using a remote
system or another operating system (or both) and loaded into the growing install manually. Portage still builds everything.
The use of
Alright, perhaps its not quite that bad. Before you proceed understand that Gentoo usies a 'rolling release' model. The mirrors update every 30 mintes. When you install the binaries from the liveDVD you get a Gentoo system from some time in the past. Look at the file /usr/portage/metadata/timestamp to see when the portage tree and therefore the packages were current. Understand that the further 'time now' is from that date and time, the harder it will be to update your system to todays Gentoo.
Understand too that you don't get to choose your USE flags and compiler options, they were set by the liveDVD team. If you want to have control over your install, do the normal stage3 Gentoo install.
You can rebuild everything from the sources later. If thats your plan, its faster to do the normal 'handbook' Gentoo Install
The liveDVD provides a Gentoo testing install. Thats the price of giving up your choice and using the binaries provided by the DVD.
Still reading ... don't say you were never warned. The usual caveat applies, if it breaks, you can keep the pieces.
The steps are:-
Still nothing is installed. /usr/portage/packages can be deleted when the install is complete.
The 4G from /usr/portage/packages can be recovered, so 12G is an absolute minimum for the install.
This document describes how to install Gentoo using the packages provided on the 2011, 11.1-r5 liveDVD. If you have a copy of the 10.0 Live DVD throw it away. Extra steps are required with the 11.0 DVD as some required packages were omitted. This document does not include these extra steps.
Instrucrions for installing from the 10.0 DVD are still around but this document won't work with that DVD. The 2011 DVD provides aufs, which makes the DVD apear to be read write, even though its not really, so we don't need any temporary read write space of our own.
Access to the
Boot the 11.1-r5 liveDVD. A GUI is not required as all the commands given below need to be entered in a root shell.
This document was develped and timing information provied from a 2 CPU 2G RAM Virtualbox Instance hosted on a Phenom II 1090 X6 at 3.2G with 16G RAM.
Follow the Gentoo Handbook, Chapters 1 to 4. Do not carry out Chapter 5 Follow the rest of this chaper instead
Run the terminal program from the Favourites menu
sudo su -
As the install is being accomplised without using a stage3 tarball, the normal directory structure it provides is missing from /mnt/gentoo. This guide makes the directories as needed.
mkdir /mnt/gentoo/usr
As the liveCD provides its portage tree, we can just copy it.
cp -a /usr/portage /mnt/gentoo/usr
Thats the correct version of the portage tree in place.
The liveDVD also uses its own local overlay which is located in /usr/local/portage so copy that too. Ebuilds and profiles here will take precendence over those in the main portage tree
mkdir /mnt/gentoo/usr/local cp -a /usr/local/portage /mnt/gentoo/usr/local
We need to edit the /etc/make.conf file on the DVD so that we can use quickpkg to save binary tarballs into our budding install.
We also need to copy some files from /etc into our install can eventuially chroot into the install.
Before /etc/make.conf is changed, copy it to the install, along with a few other things that are normally provided by the stage3
mkdir /mnt/gentoo/etc cp /etc/make.conf /mnt/gentoo/etc/make.conf cp /etc/group /mnt/gentoo/etc/group cp /etc/passwd /mnt/gentoo/passwd cp /etc/shadow /mnt/gentoo/shadow cp /etc/profile /mnt/gentoo/etc/profile cp /etc/fstab /mnt/gentoo/etc/fstab cp /etc/resolv.conf /mnt/gentoo/etc/resolv.conf cp /etc/locale.gen /mnt/gentoo/etc/locale.gen cp -a /etc/portage /mnt/gentoo/etc
edit /mnt/gentoo/etc/locale.gen to include only the locales you need. The default is to build all locales. Instructions are in the comments in the file
nano -w /mnt/gentoo/etc/locale.gen
Make mountpoints for special filesystems and other directories that would have been provided by the stage 3.
mkdir /mnt/gentoo/dev mkdir /mnt/gentoo/proc mkdir /mnt/gentoo/home mkdir /mnt/gentoo/var mkdir /mnt/gentoo/var/log
Copy layman and world to the chroot
cp -a /var/lib/layman /mnt/gentoo/var/lib cp -a /var/lib/portage /mnt/gentoo/var/lib
To make the liveCD use the portage tree in the budding intall, a few portage defaults must be changed in the liveCD make.conf
So that quickpkg puts it output in our install add the following three lines to /etc/make.conf, using
nano -w /etc/make.conf PORTDIR="/mnt/gentoo/usr/portage" PKGDIR="/mnt/gentoo/usr/portage/packages" PORTAGE_TMPDIR="/mnt/gentoo/var/tmp"
These entries are not required when quickpkg is complete
Portage needs some workspace in the chroot with a special mode set.
mkdir -p /mnt/gentoo/var/tmp chmod 1777 /mnt/gentoo/var/tmp
The chroot needs its own copy of /var/db
mkdir /mnt/gentoo/var/db cp -a /var/db/* /mnt/gentoo/var/db
With all that in place quickpkg should work and depost its output in the install, so its time for a few tests. If the following tests fail, fix things before proceeding.
quickpkg --include-config=y gcc
This makes a portage binary package of gcc complete with all the config files - even ones that contain security information. There must be no error messages from quickpkg and the output package file will be shown by
ls /mnt/gentoo/usr/portage/packages/sys-devel
as gcc-4.5.2.tbz2, which is the version used to build the liveDVD.
Provided that the above tests passed, the system is set up to quickpkg the whole DVD ... it will take a while. About 105 minutes in a VMWare virual machine on my AMD 1090 Phenom II X6 at 3.2GHz, with the VM allowed two cores
Readers with multiplte real cores may like to use pbzip2 in place of bzip2. pbzip2 is a multi threading version of bzip2. This is harmless on a single core CPU
mv /bin/bzip2 /bin/bzip2_single ln -s /usr/bin/pbzip2 /bin/bzip2
while read pkg; do (quickpkg --include-config=y "${pkg}"); done < <(qlist -CI)
This is a good time for a break if you need to do the install in two goes. To contine, Mount the filesystems and do the normal chroot steps.
The portage tree exists, the local overlay exists, make.conf exists, the security files exit, the /etc/portage that the liveDVD was built with exists and so do all the packages from the liveDVD in a binary form that emerge can use. Various odds and ends required to be able to chroot are still missing but all the bits are in /mnt/gentoo/portage/packages somewhere
Looking forward, lets cheat a little - unpack suffcient to chroot and use emerge -k but no more. Thats almost like stage1 install but there are some important differences. emerge cannot be used until we are in the chroot and the chroot does not exist until we unpack some things there. Its a little chicken and egg. However, the binary packages are tarballs with extra data appended. They can be unpacked with tar, provided we ignore the warning about extra garbage at end ignored.
cd /mnt/gentoo/etc ln -s ../usr/portage/profiles/default/linux/amd64/10.0/desktop make.profile
Having made the packages we need, making the chroot is only a question of untaring them there. We will need glibc (everything uses that) bash, portage and python at the very least.
Make friends with tab completion before you attempt the following. Type a few letters of a path name and press tab. If the fragment is ambiguious, the alternatives will be shown. Type a few more letters and press tab again.
cd /mnt/gentoo/usr/portage/packages tar xpf app-shells/bash-4.0_p28.tbz2 -C /mnt/gentoo tar xpf dev-lang/python-2.6.2-r1.tbz2 -C /mnt/gentoo tar xpf dev-lang/python-3 tar xpf sys-libs/glibc-2.9_p20081201-r2.tbz2 -C /mnt/gentoo tar xpf sys-libs/ncurses-5.6-r2.tbz2 -C /mnt/gentoo tar xpf sys-libs/zlib-1.2.3-r1.tbz2 -C /mnt/gentoo tar xpf app-arch/bzip2-1.05-r1.tbz2 -C /mnt/gentoo tar xpf app-arch/tar-1.20.tbz2 -C /mnt/gentoo tar xpf sys-apps/portage-2.1.6.13.tbz2 -C /mnt/gentoo tar xpf sys-apps/coreutils-7.4.tbz2 -C /mnt/gentoo tar xpf sys-apps/findutils -C /mnt/gentoo tar xpf sys-apps/acl-2.2.47.tbz2 -C /mnt/gentoo tar xpf sys-apps/sed-4.2.tbz2 -C /mnt/gentoo tar xpf sys-apps/attr-2.4.43.tbz2 -C /mnt/gentoo tar xpf app-admin/eselect-python -C /mnt/gentoo tar xpf app-admin/eselect -C /mnt/gentoo sandbox ? gcc and gcc-config ? needs /var/cache/edb/counter ? speedup pbzip2 for multicore ?
Mount /proc and /dev inside the chroot
mount -o bind /dev/ /mnt/gentoo/dev mount -t proc proc /mnt/gentoo/proc
chroot /mnt/gentoo /bin/bash
Python is not set up in the chroot yet. Almost everything we want uses it, so fix that right now
eselect python set 2 eselect python list
Verify that python 2.7 is selected - the active python has the blue * after its name. Python is needed to set the chroot environment
Set the profile from inside the chroot
env-update source /etc/profile export PS1="(chroot) $PS1"
Things to fix or document more thorougly
set /etc/timezone
emerge -Keav --oneshot --keep-going @system
takes 75 min and needs gcc to be configured
A few things failed as gcc was not configured, configure gcc and reru n ett s ep
gcc-config 1 source /etc/profile
This actually installs a lot more than just the system set. It installs 331 packages in all.
Our minimal chroot could be better so some packages may fail to install, we will get them next time round
On the liveDVD the system set (@system) is not included in the world (@world) set, so emerging @wotld does not automatically update @system. Explicit dependencies from packages in @world will update individual packages in @system. We need to ensure we get it all, so run the above command again, this time without --keep-going. It should not stop for any errors
emerge -Keav --oneshot @system
Thats the system set installed ... then next step is the world set. Allow about six hours.
Contine by emergeing world.
emerge -Keav --oneshot @world
Takes about six hours ... 392m
A lot of the settings the installation would have aquired by following the handbook have been skipped. In their place your install has the settings provided by the liveCD. Some will be flne, some won't. e.g. you want to set your own hostname and timezone.
You will want add a normal user and probably delete the gentoo user.
Follow the instructions at http://www.kernel-seeds.org which is mirrored at http://kernel-seeds.bloodnoc.org
Follow
Follow
The Grand Unifided Bootloade, grub, has already been installed to /boot
Follow
After you are happy with the install, you can remove the following files
Link included with permission from the author.