=~~-~~=
Join #conrad and #zen-sources on irc.freenode.org!
CONRAD
Stage 3 on 87 | RELEASE #4.1 "OoooOOOooo!"
NOT Supported or endorsed by the Gentoo Foundation, inc. in any way. Do not file bugs on bugs.gentoo.org
=~~-~~=
RELEASE #4.1
* The best way to install gentoo around *
~ Becoming concrete fashion all DIY ~
=~~-~~=
ABOUT
=~~-~~=
This is the best install guide in town
=~~-~~=
By: cheater-conrad (aka Brandon)
Named for: Puppy Conrad (Now BIG conrad), my avatar is drawn from an ACTUAL photo of CONRAD
=~~-~~=
READ - ME - FIRST
hi
=~~-~~=
Notes: You can safely assume that 'x' in 'hdx' is a drive letter throughout this guide. Example: 'hdx = hda or hdb'
[-1-] - Choosing a LiveCD
There are ONE/UNO/EINS (1) choices, don't get confused. This is for X86 AND X86_64 Users, one cd fits all!.
1.1 - System Rescue CD
NOTE: This LiveCD is for ALL users (x86 and x86_64).
NOTE2: My particular install was using the 1.0.3 version of the sysrescuecd, i suggest the latest version available
Download:
1.2 - Burn the CD and Boot it up
If you are incapable of performing this task, it is strongly advisable that you do not attempt this installation
[-2-] - Preparing Your Network
2.1 - Check For Internet Connection
Quick test:
Code: Select all
# ping http://google.comCode: Select all
# net-setup eth0/1/2/3 NOTE: sata users can use sdparm, but i've never used it and the commands are probably different.
3.1 - View Hard Disk Configuration
This is important so we know exacty what options to set, if you get confused please do skip this step.
We must know the configuration to know what options to set.
Code: Select all
# hdparm -i /dev/hdxThese are some of our options I'm going to personally set, these will change on your configuration (hdparm -i)
I don't expect you to enable every single one, you don't have to, but you can if you would like, btw
DO NOT THINK YOU HAVE TO ENABLE EVERY ONE OF THESE SETTINGS! Most people will not/should not!
* After we set this up, make sure you add these options to /etc/conf.d/hdparm (Explained later in the guide)
* -a1024 = sets read_ahead buffer to 1024 bytes
* -a256 = default read_ahead_buffer
* -c1 = sets io support to 32bit (most commonly supported)
* -c3 = sets io support to 32bit with sync, if -c1 gives you problems, this is an alternitive, but will be slightly slower.
* -c0/2 = set io support to 16bit, if your hdd does not support 32bit
* -d1 = turn on dma
* -m16 = sets multile buffers count to 16 (my hd max. find it using hdparm -i)
* -A1 = enables read-lookahead
non-laptops:
* -M254 = change the acoustic management, 254 is the maximum for speed, 128 is the quiet, you can choose anything in between <-- will increase power usage
laptops?:
* -B1 = enable full power management, 255 turns it completely off, you can choose any number between 1-255
3.3 - Test Hard Disk Speed
Code: Select all
hdparm -tT /dev/hdxNOTE: THESE ARE ALL OPTIONAL OPTIONS! If you can not understand hdparm -i, do not mis set any options.
First option: enabling DMA
We'll do things one at a time, and we'll start by turning on DMA
Code: Select all
hdparm -d1 /dev/hdxThis varies, hdparm -i should read MaxMultiSect, which will specify what you can use. For me, it is 16
Code: Select all
hdparm -m16 /dev/hdxI'm going to set it to the maximum, 254
Code: Select all
hdparm -M254 /dev/hdxI'm going to turn it down because I don't need to worry about conserving power in my particular case. I'll leave it default
Code: Select all
<no command>Lets enable it for our purposes
Code: Select all
hdparm -A1 /dev/hdaYou can adjust the amount of readahead buffer with -a
I want it a little bigger than my drive's default (256) so I'll set it up to 1024
don't set this yourself, unless you're sure you know what you're doing!
Code: Select all
hdparm -a1024 /dev/hdxMost drives can support 32-bit, if yours doesn't use 16-bit, if yours gives you problem with -c1, try with sync, -c3 (slower), otherwise use 16-bit (default -c0, -c2)
Code: Select all
hdparm -c1 /dev/hdxCode: Select all
# hdparm -d1 -c1 -m16 -M254 -A1 -a1024 /dev/hdxThis guide will go about using the following setup:
/dev/hdx1 - boot
/dev/hdx2 - swap
/dev/hdx3 - root
/dev/hdx4 - windows
4.1 - Using Fdisk
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 and boot partition. Once you have it setup correctly, hit *w* to write and exit.
Explanations
Swap (suggestions): The swap space should be double the amount of ram you have *** up to 768mb.
e.g. (256mb ram * 512mb swap, 512mb ram * 1gb swap, 768mb ram * 1.5 gb swap)
If you have 1gb of ram, optimal swap is 1gb.
If you have 2gb of ram, optimal swap is 512mb
If you have over 2gb of ram, no swap is reccomended.
Code: Select all
# fdisk /dev/hdx
Command (m for help): p
Disk /dev/hdx: xxx heads, xx sectors, xxxx cylinders
Units = cylinders of xxxxx * 512 bytes
Device Boot Start End Blocks Id System
/dev/hdx1 1 14 158760 83 Linux # boot * about 100 MB
/dev/hdx2 15 49 264600 82 Linux swap # swap * about 512 MB if 2gb ram+, less use 2x the ram size
/dev/hdx3 50 70 2564563 83 Linux # root * remainder of space, unless you dual boot windows
/dev/hdx7 70 90 remainder 07 Windows # windows * remainder of space unless you don't have windows
There are multiple filesystems in the linux kernel (and not in the linux kernel) to choose from.
You can be as basic as JFS or you can even run ntfs-3g (fuse). Although i absolutely do not reccomend running ntfs on /, it is possible*
READ THIS!!!
We are only choosing a filesystem for / as per our partition scheme. For /boot there is no point in choosing a journaling filesystem, and no difference will be noticed. This is a lookout for / only, FS for other partitions should be chosed based on the type of data on the partition.
----
JFS
JFS "Journaling File System" is a very basic journaling filesystem. It is probably the oldest journaling filesystem in the linux kernel dating all the way back to 1990, meaning a lot of debugging in between for what would be today a very stable code base.It does not perform well nor is it particularly flashy. I do not know any setups I would reccomend using it with when there are much better all-around options.
XFS
XFS dates back to 1994. It is probably the second oldest journaling filesystem in the linux kernel. XFS is probably the most steady filesystem in the linux kernel. It has a much-debugged rock solid code base. And the performance is greater than ext3, especially with the handling of larger files. XFS is a great choice for the user who never wants to deal with filesystem issues, and also getting pretty good performance.
ext3
Ext3 "Third extended filesystem" is a extension of ext2 "Second extended filesystem". Differences vs. ext2 are (1) Journaling FS support, (2) Online filesystem growth, and (3) H Tree. ext3 does not have very high performance compared to other filesystems, and I would not consider it a good choice when you can get likely better performance on XFS, while also having a much more stable filesystem.
ReiserFS
ReiserFS is a general purpose journaling filesystem, created by Namesys. Reiserfs(3) is complete and feature-filled. It is generalyl considered to have better performance than the filesystems mentioned above. Although reiserfs3 tail packing can have a pretty good performance impact.
Reiser4
Reiser4 is a new reiserfs, built from the ground up. Supposed to handle directories with a large amount of files a lot better, has much more efficient handling of small files, and it has a plugin structure. Reiser4 was and always has been a very good filesystem. However it seems kernel developers wanted to make all kinds of changes for merge in the mainstream kernel, and since then it has been going downhill. I do not reccomend reiser4 as it seems to kill every partition it lands on now, which never happened in the past. Hopefully in the future reiser4 can return to the state it was a couple years+ ago.
ext4
Ext4 "Fourth extended filesystem". Ext4 began as a fork of the ext3 filesystem, but kernel developers wanted to keep ext3 stable, causing the project to become ext4. It has some new features such as extents, and it is backwards compatible (ext3 can mount as ext4) and ext4 can mount as ext3 (unless extents is enabled). Ext4 is now generally stable and will soon lose the title ext4dev next 1 or 2 kernel releases. I reccomend as it probably is among the best in overall performance in the linux kernel, between reiserfs and reiser4 (not in linux kernel).
BTRFS
BTRFS, b--tree filessystem, is still in development, introduced in 2007 by Oracle, has a new design that when more stabilized will probably be the choice of most users, and those operating production servers. Although i am using BTRFS, i do not reccomend it as you will need to re-formate / upon version updates due to changes in the mounting structure.
4.3 - Creating Partitons
Please keep in mind the example partition scheme used throughout the guide.
Making /boot and swap
Code: Select all
# mkfs.ext2 /dev/hdx1
# mkswap /dev/hdx2
# swapon /dev/hdx2
Generic
I don't feel i need to explain all of these, just some with special notice i'll explain, just run the mkfs of the FS you want, ex. mkfs.xfs, mkfs.ext3, mkfs.reiserfs, mkfs.reiser4, etc.
ext4
Code: Select all
# mke2fs -T ext4 /dev/hdx3Code: Select all
LZO:
# mkfs.reiser4 -o create=ccreg40,compress=lzo1 /dev/hdx3
GZIP:
# mkfs.reiser4 -o create=ccreg40,compress=gzip1 /dev/hdx3You may need to specify -t <fsname> depending on the filesystem
Code: Select all
# mount /dev/hdx3 /mnt/gentoo
# mkdir -p /mnt/gentoo/proc /mnt/gentoo/boot
# mount /dev/hdx1 /mnt/gentoo/boot5.1 - *Funtoo* Downloading and Extracting the stage3
We are going to use funtoo ~ stages, they suit every need we have
Funtoo stages go by _date_, so the date downloaded is the newest available at the time of _writing_, i suggest browsing the repo for the latest stage
Download the funtoo stage appropriate from the website shown, using the format shown
i686
Code: Select all
# cd /mnt/gentoo
# wget http://www.funtoo.org/linux/~<ARCH>/funtoo-~<ARCH>-2008.09.06/stage3-~<ARCH>-2008.09.06.tar.bz2
# tar -jxvpf stage3-~<ARCH>-2008.09.06.tar.bz2
# rm stage3-*x64
Code: Select all
# cd /mnt/gentoo
# wget http://www.funtoo.org/linux/~amd64/funtoo-~amd64-2008.10.30/stage3-~amd64-2008.10.30.tar.bz2
# tar -jxvpf stage3-~amd64-2008.10.30.tar.bz2
# rm stage3-*Code: Select all
# wget http://gentoo.osuosl.org/snapshots/portage-latest.tar.lzma
# tar --lzma -xvf portage-latest.tar.lzma -C /mnt/gentoo/usr Code: Select all
# cp -L /etc/resolv.conf /mnt/gentoo/etc/6.1 - Mounting /proc
Code: Select all
# mount -t proc none /mnt/gentoo/procCode: Select all
# chroot /mnt/gentoo /bin/bash
# env-update; source /etc/profileCode: Select all
# date
061316332008
(If incorrect, enter the following in correct format, and please use military time)
# date MMDDhhmmYYYY- Basically, funtoo uses it's on git repository which is the same as gentoo's repositories since it tracks them. But paludis will be annoying saying (previously :funtoo, now :gentoo), etc. So we can fix this with a nested for:
Code: Select all
cd /var/db/pkg
for a in `ls`; do for b in `ls $a`;do c=`cat $a/$b/repository | sed 's/funtoo/gentoo/'`; echo $c > $a/$b/repository; done; done
cd /[-7-] - Preparing For Installation
7.1 - Install paludis
Since R4, paludis is the only option
Please consult http://paludis.pioto.org/overview/gettingstarted.html before continuing
---
(1) Downloading the portage2paludis script
Code: Select all
# wget http://omploader.org/vdzNx -O portage2paludis.sh
# chmod +x portage2paludis.shWe will do this now
Code: Select all
# ./portage2paludis.shPaludis can not make directories itself for security purposes, we must do it.
Code: Select all
# mkdir -p /var/tmp/paludis/resume-paludis
# mkdir -p /var/cache/paludis/write-cache
# mkdir /var/cache/paludis/names-cache
# mkdir /var/cache/paludis/metadata
# mkdir -p /usr/portage/.cache/names/gentoo/(ruby-bindings = for the playman script, inquisitio for paludis' search tool, pink because it's awesome looking)
Code: Select all
# USE="ruby-bindings pink inquisitio" emerge paludisWe need to do this otherwise you'll get warning: disabling userpriv no paludisbuild group, along those lines.
Code: Select all
# chmod g+wx /var/tmp/paludis
# chown -R paludisbuild:paludisbuild /usr/portage/distfiles
# chown -R paludisbuild:paludisbuild /var/tmp/paludisAt this point, if you are using playman to get overlays, it may be necessary to to install git/svn/cvs. I built git without the gtk and perl use flags because i didn't want to install a whole bunch of extra X/perl package, but you can build them if you want. "paludis -i dev-util/git subversion cvs mercurial" <-- command to install most syncers for repos
Code: Select all
# paludis -sCode: Select all
# paludis --regenerate-installable-cache; paludis --regenerate-installed-cache* See: http://gentoo-wiki.com/HOWTO_Use_Portag ... _-_Paludis for help with usage, also man paludis
7.2 - Configuring paludis
/etc/paludis/environment.conf
Code: Select all
# World - usually symlink to /var/lib/portage/world
world="${ROOT}/var/db/pkg/world"
#
PALUDIS_NO_WRITE_CACHE_CLEAN="yes"
# Disable use descriptions for neatness, resume command is something we want.
PALUDIS_OPTIONS="--show-use-descriptions none --resume-command-template /var/tmp/paludis/resume-paludis/rp-XXXXXX"Code: Select all
# Place any keywords here, following the following format
# EX: media-libs/swfdec *
#!!!!!!!!!!!! Following line is mandatory for this install!!!!!!!!!!!
*/* x86 ~x86 |~| OR |~| */* amd64 ~amd64Code: Select all
# Packages you'd like to mask
# EX: =x11-libs/qt-4.3*Code: Select all
# Packages to unmask
# EX: >=media-video/realplayer-11.0Code: Select all
# Use flags
sys-apps/paludis ruby-bindings pink inquisitio
*/* flag1 flag2 -flag3 flag4 etcflag
category/package flag1We really should get zen-overlay and THE overlay. Not necessary, just strongly reccomended, you can always get other repos you may like such as desktop-effects, etc
Code: Select all
# playman -a zen-overlay; playman -a THE
# paludis -s/etc/paludis/bashrc
Code: Select all
# our bashrc
#CHOST="x86_64-pc-linux-gnu" # Change as applicable, ex: i686-pc-linux-gnu
CFLAGS="-march=native -O2 -fomit-frame-pointer -pipe" # -fomit-frame-pointer redundant on x86_64, keep for < = i686
CXXFLAGS="${CFLAGS}"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu -Wl,-z,-combreloc"
#MAKEOPTS="-j3" # optional8.1 - Setting userlocales
Code: Select all
# nano -w /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 ISO-8859-1
en_US.UTF-8/UTF-8
Code: Select all
# locale-genTHIS WILL add more things to your world rebuild, but don't fret child, you will have everything built the way you want it, for me i have my use flags below, and it turned 95 packages into 116, including some x libraries
For more information on setting use flags, please visit: http://gentoo-wiki.com/FAQ_USE_Flags
http://gentoo-wiki.com/FAQ_USE_Flags
These are mine for a kde/qt based env
/etc/paludis/use.conf
Code: Select all
# Format is category/package: example - sys-apps/paludis
# */* is every package in every category
*/* alsa acpi X kde aim -arts nvidia fbcon ffmpeg firefox firebird gif gpm mplayer mpeg mp3 ncurses opengl pdf php gtk qt qt3 qt4"8.3 - Rebuilding the SYSTEM
This is for purification
Code: Select all
# paludis -i --dl-reinstall always worldCode: Select all
# rm -rf /etc/localtime
(for me, i'm going to set the US/Eastern timezone)
# ln -s /usr/share/zoneinfo/US/Eastern /etc/localtime9.1 - Looking at the differences between zen and other kernels
-linus
* Mainstream linux kernel, always a safe option. What every OTHER linux kernel is based on
* In gentoo, paludis -i vanilla-sources, for latest stable/rc release
-gentoo
* From linus tarball uploads (no RC releases, less frequent updates when micro releases are made)
* fbcondecor/squashfs
* In gentoo, paludis -i gentoo-sources
-hitchiker
* From linus tarballs (latest micro release, no RC releases)
* -gentoo patches
* Reiser4 (latest release)
* squashfs-lzma (not in zen, it's a dirty hack)
* AUFS
-zen
* Latest linus micro release (stable versions) and Latest from linus' git repo (unstable/rc versions)
* Contains several goodies, including but not limited to genpatches
* V(R)/BFQ/FIFO i/o schedulers
* Reiser4 (Not just the latest release, but homemade and other improvements made, -mm patches, and stable mailing list patches as well)
* LATEST Aufs/Squashfs/unionfs
* LATEST Btrfs / 2.6.28 stable releases backport latest updates in btrfs git repository, and unstable releases follow updates not pulled into linus
* Laptop Friendly (tuxonice, madwifi, aircrack, acpi stuff)
* Latest nilfs2 from mmotm tree
* SLQB Slab allocator
* gentoo/zen/arch logos, mouse polling, nr_tty, tmpfs-root, psx2usb, custom cflags, hz-kconfig, fastboot, compcache, qc-usb, mactel, ipmi sensors, march-native, dm-loop, cko, adbsyn, some others subject to change
9.2 - Using git to install zen-sources (WAY 1 of 2)
Alternative to using git is step 9.3
Git is the preferred reccomendation
Code: Select all
# cd /usr/src
# paludis -i dev-util/git (you will need to set dev-util/git -gtk -perl in use.conf unless you want to install a bunch of junk as dependencies)
# git clone git://zen-sources.org/zen/kernel/zen.git linux-2.6-zen
# ln -s linux-2.6-zen linux
# paludis -i virtual/kernel-sources (IN zen-overlay)REQUIRES zen-overlay
playman -a zen-overlay
Code: Select all
# paludis -i zen-sources-----
All I can do is tell you how to get started, and what is required.
Code: Select all
# cd /usr/src/linux
# make menuconfig
Below are _guidelines_ for compiling the kernel, and nothing more.
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 --->
[*] Standard x86 support (Used for amd64/em64t cpus)
(Change accordingly)
(Your Processor Family) Processor family
[*] Symmetric multi-processing support
# If you have exactly 1GB of memory use the following else just leave it at default.
Memory Split (3G/1G user/kernel split (for full 1GB Low memory)) ---->
File systems --->
<*> Your filessytems here
Pseudo Filesystems --->
[*] /proc file system support
[*] Virtual memory file system support (former shm fs)
Device Drivers --->
ATA/ATAPI/MFM/RLL support --->
[*] Generic PCI bus-master DMA support
[*] Use PCI DMA by default when available
[ ] SCSI Emulation 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
Sound --->
[*] Sound card support
Alsa --->
PCI Cards --->
[*] Your Drive
USB Support --->
<*> USB Human Interface Device (full HID) 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)
[*] Initial RAM disk (initrd) supportWe're going to configure another important aspect in our kernel. Here is a run down of each IO Scheduler.
CFQ/BFQ: Best all-around for desktop performance, including reiser4. If you want to use the others go for it, but I reccomend CFQ
Code: Select all
KERNEL CONFIGURATION
Block Devices > IO Schedulers
[*] Anticipatory
[*] Deadline
[*] CFQ
[*] BFQ
[*] V(R)
(Default = Deadline) 9.6 - Installing Grub
Code: Select all
(make sure the /boot partition is mounted)
# paludis -i grubIf you're not doing the gensplash step
Code: Select all
# make ; make modules_install ; make installCode: Select all
# makePlease carefully follow the instructions under each bold face heading.
(1) Get back into menuconfig sucka
INSTEAD of fighting the uvesa configuration, you can just use vesa and specify vga=
Code: Select all
# make menuconfigCode: Select all
Device Drivers ->
Graphics support ->
[*] Support for frame buffer devices ---->
<*> Enable Firmware EDID
---------------------------
Device Drivers ->
Graphics Support ->
Console display driver support ->
[*] Video mode selection support
< > Framebuffer Console supportThis is optional, but for some people v86d segfaults unless this use flag is set
Code: Select all
# echo "sys-apps/v86d x86emu" >> /etc/paludis/use.confCode: Select all
# paludis -i klibc v86dWe need to enable all of the following.
Code: Select all
Device Drivers ->
<*> Connector - unified userspace <-> kernelspace linker --->
...
Graphics support ->
<*> Userspace VESA VGA graphics supportCode: Select all
General Setup ->
[*] Initial RAM filesystem and RAM disk (initramfs/initrd) support
(/usr/share/v86d/initramfs) Initramfs source file(s)Code: Select all
Console display driver support --->
[*] Video mode selection support
<*> Framebuffer Console support
[*] Support for the Framebuffer Console DecorationsCode: Select all
# make; make modules_install; make installCode: Select all
# echo "media-gfx/splashutils fbcondecor" >> /etc/paludis/use.conf
# paludis -i splashutils splash-themes-gentoo splash-themes-livecdApparently widescreen resolutions don't work, and on top of that the biggest possible resolution is 1280x1024, that sucks
Code: Select all
# cd /etc/splash
(obviously change your resolution)
# splash_geninitramfs -g /boot/fbsplash-livecd-2007.0 -r 1280x1024 -v livecd-2007.0[-10-] - Installing Additional System Files
10.1 - Installing Services and Tools
NOTE: you do not need all of these, but they are certainly reccomened and most people need dhcpcd, and if you need the tools for your file system (reiser4progs if you used reiser4), and gentoolkit has a lot of neat stuff, etc.
Code: Select all
# paludis -i syslog-ng sysfsutils acpid dhcpcd gentoolkit slocate vixie-cron# paludis -i reiserfsprogs reiser4progs btrfs-progs xfsprogs jfsutils[/code]
10.2 - Adding the programs to the default runlevel
Code: Select all
(first off, for net.eth0)
# ln -s /etc/init.d/net.lo /etc/init.d/net.eth0
# rc-update 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 default10.3 - Setting up NTP
NTP basically sets your time to that of a network server (using your locally configured timezone)
Code: Select all
# echo "net-misc/ntp caps" >> /etc/paludis/use.conf
# paludis -i ntp
# ntpdate -b -u pool.ntp.org
# rc-update add ntpd default
# rc-update add ntp-client defaultThis is obviously optional, and only needed if you have NTFS filesystems from a windows install or whatever other reason there is to have a ntfs partition.
Follow the following steps for ntfs-3g
(1) Configuring the Kernel
What do want to make sure is set in .config is:
Code: Select all
CONFIG_FUSE_FS=yObviously rebuild and re-install your kernel if the above setting was not already set
(2) Install
Code: Select all
# paludis -i sys-fs/ntfs3gMount a ntfs partiton manually with this command:
Code: Select all
# ntfs-3g /dev/hdxy /mnt/ntfsfolderfilesystemetcetcThis are my ntfs-3g fstab lines
Code: Select all
/dev/sdb3 /mnt/windows ntfs-3g 0 0
/dev/sda1 /mnt/doze ntfs-3g 0 0Continuation in post 2!





