Seren Install V1 2007 "A New Level" Last Updated Nov 7th 2007
Based off V400 by cheater-conrad (aka cheater1034, Brandon).
Thanks to all those who have helped; !!My girlfriend Layne who tolerated me the through the process of making this guide!!
for those I missed you are not forgotten!
THIS GUIDE IS DEDICATED TO Vipernicus May he Rest in Peace!
YOU WILL NEVER BE FORGOTTEN!!!!! <3
Before doing anything, Join #seren on irc.freenode.net, and go there every time you go on IRC because you can get live support there, and you can take part in the fun chats that take place daily.
~~~~~
What is it?
The Seren Install has been around for almost 2 years evolving as THE way for enthusiasts to install Gentoo Linux. Our goal is to show you how to build a cutting edge turbo charged system that's bloody fast, well tested and STABLE. By the end of the guide you'll have built your own totally customized Seren system guaranteed to be damn faster than a stock Gentoo Install. Gentoo won't offer technical support for this document though, but we will offer equally effective technical support if you stick with it. You are encouraged to try this, go outside of the box and experience a fun installation with awesome results.
~~~~~
Why did it come about?
The Gentoo handbook is a great document for basic purposes, but it doesn't give you much choice about how you want to customize your install. We created this unofficial guide to give you: (1) A fun install compared to the somewhat bland handbook install, with several options (2) Everything is explained clearly, but you get your hands dirty with this install (3) New FS Options Gentoo doesn't support (reiser4, ext4) (4) Custom CFLAGS Gentoo doesn't support but are proven more effective than Gentoo's default (5) LDFLAGS/Hashstyle linking which is all upstream now but Gentoo doesn't support it, it gives the system an extreme boost when doing work in the console and in a DE (6) Custom overlays Gentoo doesn't support but give extra graphical options, enhanced glibc performance, etc. || These are just few of the reasons that separate this guide from the Gentoo handbook. We know you'll find the end result with this guide better than any other Gentoo document
~~~~~
Changelog > V400
* AMD64 support
* Default supported filesystem will be ext3. Those of you looking to use ext4 or reiser4 are certainly welcome to! (I've personally have not had a great ext4 experience thus far... your results may vary.)
* Added customized bashrc for portage which i know you guys will love, allows per-package CFLAGS CXXFLAGS LDFLAGS and FEATURES with a very useful verbose output
* GCC updated to 4.2.2
* Binutils updated to 2.18.50.0.2
* Glibc updated to 2.7
* Baselayout updated to 2.0.0_rc6
* LDFLAGS updated to "-Wl,--hash-style=gnu"
* We now use the custom-kernel overlay from layman for the latest kernels
* The partitioning and make.conf sections got a clean up. Switched to cfdisk instead of fdisk.
* Until somebody lets me know of a better option, the default Live CD will be Sabayon 3.4 Mini Edition. SystemRescueCD is another great choice for reiser4 users.
* Kernel chosen as Kamikaze-sources. You're of course free to use whichever kernel you want.
* Reorganized some things to make the guide go in a more sensible order. General cleanup. Guide should now be complete enough to reboot into a minimal system.
TODO
* MORE TESTING
* Add more information on building and installing kernels, especially information relevant to uvesafb and splashutils.
* Converting to and using Paludis (this will be done as an optional appendix following the guide)
~~~~~
DISCLAIMER - READ OR DIE!
The Gentoo Linux Foundation, Inc. Does not support this Install document in any way. This means you may NOT report any bugs to: ANY official gentoo IRC Channels (#gentoo, #gentoo-dev-help), Gentoo Mailing Lists, Gentoo Forums, Gentoo Bugzilla, or to anybody else. Only report bugs to ME! Gentoo does not support the methods and make.conf in thie installation document. This should not be posted anywhere else but in this thread. It's not supported by gentoo in any shape way or form.
~~~~~
GOOD LUCK! If you are a success, which you probably will be if you don't deviate from this guide, then please spread the word by telling your friends, family, co-workers, etc. We hope you learn a thing or two along the way, enjoy your bleeding edge distribution, and come back for more later! Suggestions and improvements are always encouraged.
~~~~~
Notes: You can safely assume that x in 'sdx' is a drive letter throughout this guide. Example: 'sdx = sda or sdb or sdc'
[-1-] - Choosing a LiveCD
We'll use JustBOOT (tm)
1.1 - x86 Sabayon 3.4 Mini(tm)
he LiveCD is based on Gentoo. It includes all the utilities you'll need to complete this guide
Code: Select all
ftp://ftp.ibiblio.org/pub/linux/distributions/sabayonlinux/CD-iso/SabayonLinux-x86-3.4.miniEdition.isoThe LiveCD is based on Gentoo. It includes all the utilities you'll need to complete this guide
Code: Select all
http://www.kernel-of-truth.net/amd64_r8/small-gentoo_amd64_r8.isoBurn the CD image to a CD, put it in the CD drive, reboot your computer. If it doesn't work and just keeps on booting the same way it did before you put the disc in, then you probably need to set your BIOS to boot from CD. At the first screen you see after pressing the power button (where it shows your computer maker's logo) press either Delete or F1 or F2. (Varies by computer. If you can read fast enough the first screen probably tells you which key to hit to enter setup). On newer computers you can usually press F10 or F12 to get a boot up menu and choose to boot from CD instead of needing to edit the BIOS. In any case, you'll need to dig around and set the boot order such that CDs boot before the hard drive.
[-2-] - Partitioning
This guide will go about using the following setup:
/dev/sdx1 - boot
/dev/sdx2 - swap
/dev/sdx3 - root
/dev/sdx4 - windows (/home is another good choice)
You may want to use a dedicated /home partition for your install. The benefit to doing this is that the next time you decide to do a fresh seren (or gentoo/sabayon) install you won't have to reconfigure all your settings or migrate your personal data, you simply mount this /home directory as the new /home directory on the clean install (however, you will still need to manually add the same username to the new install).
2.1 Using cfdisk
Fdisk uses some sly hackory to accomplish certain things, and it's recommended you start using cfdisk if you haven't yet already. If you prefer using GUI tools, gparted is a good option (assuming your chosen install medium has gparted installed).
Remember that once you have the partition layout, you need to set the type to 82 (Linux Swap) for the swap partition and 83 (Linux) for the root, boot, and home partitions. cfdisk requires that at least one partition be marked bootable, and you should mark at least boot as bootable (root wouldn't hurt too but this isn't necessary to set).
Explanations
Swap (suggestions): The swap space should be double the amount of RAM you have. Users of dual and quad core processors take note!: Setting MAKEOPTS=”-j3” or “-j5” starts 3 or 5 threads respectively when installing software. This takes a good deal of memory and it is therefore highly recommended that even users who have 1 or 2GBs of RAM still use a swap file!
Some Examples:
If you have less than 512MBs of RAM, optimal swap is 1GB.
If you have 512MB of RAM, optimal swap is 1GB or 2GB.
If you have 1GB of RAM, optimal swap is 2GB (1GB will be sufficient for everybody except people with quad core processors)
If you have 2GB of RAM, optimal swap is 512MB (single and dual core) or 1GB (quad core).
2.2 - Creating Partitons
It is recommended that you use ext3 for '/', and ext2 for '/boot'. If you use ext4 for /boot it won't work. I repeat, /boot needs to be ext2 if you're using ext4 or reiser4.
Code: Select all
# cfdisk /dev/sdx
# Partition your disks as you see fit. Scroll up and down the existant partitions with the up/down arrows, and change which operation to perform by using the left/right arrows. When you're done, write the changes to disk and quit.Code: Select all
# mkfs.ext3 /dev/sdx3
# tune2fs -o journal_data_writeback /dev/sdx3
# tune2fs -m 2 /dev/sdx3
# mkfs.ext2 /dev/sdx1
# mkswap /dev/sdx2
# swapon /dev/sdx2
Code: Select all
# mount /dev/sdx3 /mnt/gentoo -o user_xattr,noatime
# mkdir -p /mnt/gentoo/proc /mnt/gentoo/boot /mnt/gentoo/dev /mnt/gentoo/usr/local/portage
# mount /dev/sdx1 /mnt/gentoo/boot3.1 - Downloading and Extracting a stage3
x86
Code: Select all
# cd /mnt/gentoo
# wget ftp://ftp.oss.cc.gatech.edu/pub/linux/distributions/gentoo/releases/x86/2007.0/stages/stage3-i686-2007.0.tar.bz2
# tar -jxvpf stage3-i686-2007.0.tar.bz2Code: Select all
# cd /mnt/gentoo
# wget ftp://ftp.oss.cc.gatech.edu/pub/linux/distributions/gentoo/releases/amd64/2007.0/stages/stage3-amd64-2007.0.tar.bz2
# tar -jxvpf stage3-amd64-2007.0.tar.bz2Code: Select all
# wget http://distfiles.gentoo.org/snapshots/portage-latest.tar.bz2
# tar -jxvpf portage-latest.tar.bz2 -C /mnt/gentoo/usr/Code: Select all
# cp /etc/resolv.conf /mnt/gentoo/etc/4.1 - Mounting /proc and /dev
Code: Select all
# mount -t proc none /mnt/gentoo/proc
# mount -o bind /dev /mnt/gentoo/devCode: Select all
# chroot /mnt/gentoo /bin/bash
# env-update; source /etc/profileBefore you continue you need to check your date/time and update it. A mis-configured clock may lead to strange results in the future!
Verify the current date/time.
Code: Select all
dateCode: Select all
# date 110511452007We assume you know what you're doing with /etc/make.conf. You can run “man make.conf” in a terminal to read the man pages. The following files are sufficient to get a base system installed. Once you finish the guide you'll want to add whatever USE flags or FEATURES you want.
Code: Select all
# nano /etc/make.confThe following example is what one specific computer uses. You should change -march= to your processor from these options:
Intel:
Old school Pentium 4 (and Xeons from this generation): -march=pentium4
Prescott and newer P4 (includes Xeons, Pentium D and Celeron D): -march=prescott
Core Solo/Duo: -march=prescott
Core 2 Solo/Duo: -march=prescott # if you're adventurous to use gcc 4.3 you can set -march=core2
AMD:
Old school Athlons: -march=athlon or -march=athlon-tbird if you haven't burned yours up yet
Athlon XP/MP: -march=athlon-xp or -march=athlon-mp
All Athlon 64 chips: -march=athlon64
Opteron: -march=opteron
Here's the complete list from the GCC docs: http://gcc.gnu.org/onlinedocs/gcc-4.2.2 ... tions.html
Code: Select all
USE="nptl nptlonly symlink"
CFLAGS="-O2 -march=athlon64 -fomit-frame-pointer -fno-ident -fweb -pipe"
# add -msse3 if your processor supports SSE3
cat /proc/cpuinfo| grep pni # if it outputs pni you have SSE3 support and add -msse3 to CFLAGS
CXXFLAGS="${CFLAGS}"
# Leave the following line commented for now. We'll change it later.
# LDFLAGS="-Wl,-O1 -Wl,--hash-style=gnu"
# This should not be changed unless you know exactly what you are doing. You
# should be using a different stage, instead of changing this line.
CHOST="i686-pc-linux-gnu"
MAKEOPTS="-j3 -s" # replace 3 with the number of CPUs (cores) you have + 1.
# For example, if you have a
# single processor 1+1=2
# dual core processor 2+1=3
# quad core processor 4+1=5
ACCEPT_KEYWORDS="~x86"
PORTDIR_OVERLAY="/usr/local/portage"
# the following line replaces allows layman overlays to work; Do not uncomment until step 9
# source /usr/portage/local/layman/make.confThe following example is what one specific computer uses. You should change -march= to your processor from these options:
Intel:
Old school Pentium 4 (and Xeons from this generation): -march=pentium4
Prescott and newer P4 (includes Xeons, Pentium D and Celeron D): -march=prescott
Core 2 Solo/Duo: -march=nocona # if you're adventurous to use gcc 4.3 you can set -march=core2
AMD:
Old school Athlons: -march=athlon or -march=athlon-tbird if you haven't burned yours up yet
Athlon XP/MP: -march=athlon-xp or -march=athlon-mp
All Athlon 64 chips: -march=athlon64
Opteron: -march=opteron
Here's the complete list from the GCC docs: http://gcc.gnu.org/onlinedocs/gcc-4.2.2 ... tions.html
Code: Select all
USE="nptl nptlonly symlink"
CFLAGS="-O2 -march=athlon64 -fomit-frame-pointer -fno-ident -fweb -pipe"
cat /proc/cpuinfo| grep pni # if it outputs pni you have SSE3 support and add -msse3 to CFLAGS
CXXFLAGS="${CFLAGS}"
# Leave the following line commented for now. We'll change it later.
# LDFLAGS="-Wl,-O1 -Wl,--hash-style=gnu"
# This should not be changed unless you know exactly what you are doing. You
# should be using a different stage, instead of changing this line.
CHOST="x86_64-pc-linux-gnu"
MAKEOPTS="-j3 -s" # replace 3 with the number of CPUs (cores) you have + 1.
# For example, if you have a
# single processor 1+1=2
# dual core processor 2+1=3
# quad core processor 4+1=5
ACCEPT_KEYWORDS="~amd64"
PORTDIR_OVERLAY="/usr/local/portage"
# the following line replaces allows layman overlays to work; Do not uncomment until step 9
# source /usr/portage/local/layman/make.confHere we extract the overlay and all the guide install files including package.keywords package.use and the newly customized bashrc.
Code: Select all
wget http://glibcsnap.googlecode.com/files/seren-install-files-v1-r2.tarCode: Select all
tar xvpf seren-install-files-v1-r2.tar -C /Code: Select all
# emerge baselayout
# etc-update # -5 to automerge allYou need to set your local timezone. Change the TIMEZONE=”some timezone” line to be correct. You can find a complete listing of timezones by browsing the /usr/share/zoneinfo directory.
Code: Select all
# nano /etc/conf.d/clockCode: Select all
# emerge subversion layman
# layman -L # fetch and show the list of available overlays
# layman -a custom-kernels
Manual Bootstrap (Building Base System)
7.1 - Setting Locales - OPTIONAL
This is optional. Set this according to your area. It saves build time.
Code: Select all
# nano /etc/locale.genCode: Select all
# This file names the list of locales to be built when glibc is installed.
# The format is <locale>/<charmap>, where <locale> is a locale from the
# /usr/share/i18n/locales directory, and <charmap> is name of one of the files
# in /usr/share/i18n/charmaps/. All blank lines and lines starting with # are
# ignored. Here is an example:
en_US/ISO-8859-1
en_US.UTF-8/UTF-8
Code: Select all
# locale-genCode: Select all
# emerge portage
# etc-update
# type -5 to automerge all config filesCode: Select all
# emerge binutils glibc libstdc++-v3
# binutils-config -l
# We want to make sure we're using 2.18.50.X.X. This line should have an asterisk after it. If it doesn't, then do:
# binutils-config 2 # where the 2 is the number in [number] corresponding to 2.18.50.X.X
# source /etc/profile && env-updateCode: Select all
# nano /etc/make.conf
Uncomment (By deleting the # infront of the line) the line that reads:
"LDFLAGS="-Wl,-O1 -Wl,--hash-style=gnu"[-8-] - Updating GCC
Code: Select all
emerge gcc Code: Select all
emerge gcc-configCode: Select all
# gcc-config -l
(Lists installed compilers, you should see [1] 4.1.1 and [2] 4.2.2; we want 4.2.2.)
# gcc-config 2
(sets gcc 4.2.2 a default compiler)
# env-update; source /etc/profileCode: Select all
# emerge portage
# sh ~/emwrap.sh -sb1
# emerge -Pa gcc binutils
# Look for [R] Binutils 2.16.1 and GCC 4.1.1This step will take a while and it's recommended that after starting the emerge you go ahead with the kernel configuration below.
Code: Select all
# sh ~/emwrap.sh -S && sh ~/emwrap.sh -W
# etc-update
(Merge all files....) -59.1 - Emerging zen-sources
Code: Select all
(to get the ebuild and install manually, check this thread:http://forums.gentoo.org/viewtopic-t-616535.html)
To use Layman open make.conf and uncomment the last line. "source /usr/portage/local/layman/make.conf" Code: Select all
wget http://glibcsnap.googlecode.com/files/overlay.tar && tar xvpf overlay.tar -C /Code: Select all
# emerge zen-sources klibc v86d-----
All I can do is tell you how to get started, and what is required.
Code: Select all
# cd /usr/src/linux
# make menuconfig
Code: Select all
Required Options...
Code maturity level options --->
[*] Prompt for development and/or incomplete code/drivers
General setup --->
[*] Support for hot-pluggable devices
Loadable Module Support --->
[*] Module unloading support
Processor type and features --->
[*] Tickless System (Dynamic Ticks) [Improves power saving, esp for laptops]
Processor family (AMD-Opteron/Athlon64) #Press <enter> to select yours
[*] MTRR (Memory Type Range Register) Support
[*] Symmetric multi-processing support # turn on as necessary for dual/quad core systems
[ ] SMT (Hypterthreading) scheduler support # intel pentium 4
[*] Multi-core scheduler support
Preemption Model (Preemtible Kernel (Low-Latency Desktop)) # needs to be selected
[*] Preempt the Big Kernel Lock
[ ] NUMA Support (turn off unless you have at least two processors each with their own memory)
( 2) Maximum number of CPUs (2-255) # set this to the correct value in order to save memory
File systems --->
Pseudo Filesystems --->
[*] /proc file system support
[*] Virtual memory file system support (former shm fs)
<*> Second Extended FS Support
<*> Ext2 extended attributes
<*> Ext3 journalling file system support
[*] Ext3 Extended Attributes
<*> Ext4dev/ext4 extended FS support (experimental) !!!OPTIONAL AND NOT SUPPORTED!!!
[*] Ext4dev Extended Attributes
Device Drivers --->
ATA/ATAPI/MFM/RLL support --->
[ ] Generic PCI bus-master DMA support # you should begin using libata (below) for SATA and PATA controllers, so long as your chipset isn't marked “Very Experimental”
# this means all your hard drives now show up as /dev/sda sdb ... etc (no more hdX, even for PATA drives)
# your CD/DVD drives show up as /dev/sr0 sr1 sr2 etc
<*> Serial ATA (prod) and Parallel ATA (experimental) drivers ---->
<*> Select the drivers you need, unless it's marked as “Very Experimental.” If it is, use the legacy drivers under “Generic PCI bus-master DMA support”
Device Drivers --->
Networking support --->
<*> PPP (point-to-point protocol) support
<*> PPP support for async serial ports
<*> PPP support for sync tty ports
100 MBIT/1000 MBIT --->
(make sure you compile in your proper network driver. modules should be added to /etc/modules.autoload.d/kernel-2.6 if you prefer modules)
Sound --->
[M] Sound card support
Alsa --->
PCI Cards --->
[M] Your Driver, mine is intel8x0, a common one is emu10k1 for soundblaster cards
USB Support --->
<*> USB Human Interface Device (full HID) support
Device Drivers --->
<*> Connector - unified userspace <-> kernelspace linker --->
Device Drivers > Graphics support:
[*] Support for frame buffer devices
<*> Userspace VESA VGA graphics support
Device Drivers > Graphics support > Console display driver support:
[*] Video mode selection support
<*> Framebuffer Console support
Device Drivers > Graphics support:
[*] Support for the framebuffer splash
Device Drivers > Block devices:
<*> RAM disk support
(4096) Default RAM disk size (kbytes) (NEW)
General setup --->
[*] Initial RAM filesystem and RAM disk (initramfs/initrd) support
(/usr/share/v86d/initramfs) Initramfs source file(s)
9.3 - Choosing an IO Scheduler
We're going to configure another important aspect in our kernel. As you'd expect, the IO scheduler handles IO requests. The anticipatory one tries to improve performance by attempting to anticipate what data will be needed next. The deadline scheduler tries to improve performance by making sure all requests get started within a certain time frame. The intention being that whatever is needed first gets there first. The CFQ (completely fair queuing) scheduler does as its name says too. It tries to give every program that needs disc access equal time slices (based on process priority too). CFQ is the default for this guide.
Code: Select all
KERNEL CONFIGURATION
Block Devices > IO Schedulers
[*] Anticipatory
[*] Deadline
[*] CFQ
(Default = CFQ) 9.4 - Emerging Grub
Code: Select all
(make sure the /boot partition is mounted)
# emerge grubCode: Select all
# make bzImage modules modules_install
# x86 # cp arch/x86/boot/bzImage /boot/yourKernelName
# amd64 # cp arch/x86_64/boot/bzImage /boot/yourKernelName
10.1 - Emerging Services and Tools
Code: Select all
# emerge syslog-ng reiserfsprogs e2fsprogs sysfsutils dhcpcd eselect gentoolkit acpid slocate vixie-cronCode: Select all
# eselect rc add syslog-ng default
# rc-update add net.eth0 default
# rc-update add acpid default
# rc-update add gpm default
# rc-update add vixie-cron default
# rc-update add numlock default11.1 - Modifying '/boot/grub/grub.conf'
In grub, sdx1 is (hd0,0), and sdx2 is (hd0,1), and sdy1 is (hd1,0) and so forth.
Code: Select all
nano /boot/grub/grub.conf
timeout 10
default 0
title=Seren V1 Zen
root (hd0,0) # boot partition
kernel /yourKernelName root=/dev/sdx3 # if you're using uvesafb, use the next line instead
kernel /yourKernelName root=/dev/sdx3 video=uvesafb:1024x768-32,mtrr:3,ywrap
title=Windows
rootnoverify (hd0,3) # pretend it is on sda4
makeactive
chainloader +1Code: Select all
# grub
<grub:> root (hd0,0) # boot partition
# (hd0) is the MBR of the drive.
<grub:> setup (hd0)
<grub:> quit12.2 - Setting Timezone
You need to set your local timezone again. Change the TIMEZONE=”some timezone” line to be correct. You can find a complete listing of timezones by browsing the /usr/share/zoneinfo directory.
Code: Select all
# nano /etc/conf.d/clockCode: Select all
# nano /etc/conf.d/hostname
HOSTNAME="theNameOfYourComputer"Code: Select all
# nano -w /etc/conf.d/domainname
# DNSDOMAIN=""
# NISDOMAIN=""Code: Select all
# nano -w /etc/hosts
127.0.0.1 seren-v1 localhostCode: Select all
# nano /etc/conf.d/netCode: Select all
# DHCP Default Setting
config_eth0=( "dhcp" )12.5 - Configuring FSTAB
NOTE: Reiser4 users must use noatime in the options. If you aren't using reiser4 just ignore this note.
Code: Select all
# nano /etc/fstab
...Change lines 20-23...Code: Select all
/dev/sdx1 /boot ext2 noauto,noatime 1 2
/dev/sdx3 / ext3 noatime 0 1
/dev/sdx2 none swap sw 0 0
/dev/sdx4 /mnt/doze ntfs ro,defaults 0 0First set the root password
Code: Select all
# passwd
<enter new password>
<confirm new password>Code: Select all
# useradd -m -G users,wheel,audio,video yourUserName
# passwd yourUserName
<set password>
<confirm password>13.1 - Unmounting and Rebooting
Code: Select all
# exit
# umount /mnt/gentoo/boot /mnt/gentoo/proc /mnt/gentoo /mnt/gentoo/dev
# reboot14.2 - Booting New System
Hopefully you'll have a grub menu, and be able boot into your new system.
If you get a kernel panic then check to make sure you configured everything correctly by booting back into the LiveCD and checking the grub sections.
13.2 - Prelinking
We need to prelink our binaries to get full usage from hashstyles. We need to edit conf.d for prelink first, so don't skip that, and do it before running prelink.
Code: Select all
# emerge prelink
# env-update
# nano /etc/conf.d/prelink
...find:
PRELINKING="no"
...change to:
PRELINKING="yes"
# prelink -amR





