# # # create gentoo chroot compile environment for SpbLinux 2.2 # # prepare a partition (preferred) or a directory for gentoo (e.g. /gentoo) # with enough space for gentoo and all build trees (>20GB) # and cd into this directory (cd /gentoo) # # either download precompiled stage3 from spblinux.de/2.2/ # wget http://spblinux.de/2.2/build/gentoo/stage3-i686-spb2.2.tar.bz2 # or build from scratch (select your mirror on http://www.gentoo.org/main/en/mirrors.xml): # wget http://mirror.switch.ch/ftp/mirror/gentoo/releases/x86/2007.0/stages/stage3-i686-2007.0.tar.bz2 # and unpack it with tar -xpjf stage3... # # cp /etc/resolv.conf etc/ # cp /usr/share/zoneinfo/Europe/Zurich /etc/localtime # place for overlays: # mkdir /etc/spb2 # mkdir /etc/spb2/portage # edit etc/make.conf (or use http://spblinux.de/2.2/build/gentoo/make.conf) # - xen domU compatibility: USE: nptonly and CFLAGS: -mno-tls-direct-seg-refs # - small system: USE: -ipv6 -nls -pam # - cpu type: CFLAGS: -march=pentium-mmx -mtune=generic # (note: -mtune=generic is gcc >= gcc-4.2.x only! Else use -mtune=i586) # - allow recent (unstable) versions: ACCEPT_KEYWORDS="~x86" # get current gentoo portage tree # wget http://mirror.switch.ch/ftp/mirror/gentoo/snapshots/portage-latest.tar.bz2 # tar -C usr/ -xpjf portage-latest.tar.bz2 # chroot /gentoo bash -l # mount -t proc none /proc # emerge --sync # emerge portage # etc-update # # if built from scratch (vanilla gentoo stage3) the whole stage3 gentoo tree # has to be rebuilt; this applies the new USE and CFLAGS flags # (and takes some time...): # (reference: http://gentoo-wiki.com/HOWTO_Xen_and_Gentoo#TLS_and_CFLAGS) # emerge -evat world # # if a private stage3 with the result of emerge -evat world should be built # see instructions in stage3.spec #