<?xml version='1.0' encoding="UTF-8"?>
<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/gentoo-x86-quickinstall.xml,v 1.46 2005/08/12 17:57:03 fox2mike Exp $ -->

<!DOCTYPE guide SYSTEM "/dtd/guide.dtd">

<guide link="/doc/en/gentoo-x86-quickinstall.xml">
<title>Gentoo Linux x86 Quick Install Guide</title>

<author title="Author">
  <mail link="swift@gentoo.org">Sven Vermeulen</mail>
</author>
<author title="Author">Steven Wagner</author>

<abstract>
The Quick install guide covers the Gentoo install process in a 
non-verbose manner. Users should already have prior experience with 
installing Gentoo Linux if they want to follow this guide.
</abstract>

<!-- The content of this document is licensed under the CC-BY-SA license -->
<!-- See http://creativecommons.org/licenses/by-sa/2.5 -->
<license/>

<version>2.6</version>
<date>2005-08-12</date>

<chapter>
<title>Quick Install Guide</title>
<section>
<title>Installation Media</title>
<body>

<p>
Download a CD from one of our <uri link="/main/en/mirrors.xml">mirrors</uri>.
You can find the ISOs in
<path>releases/&lt;architecture&gt;/&lt;release&gt;/installcd</path>. The
<e>minimal</e> installation CD is only useful for Internet-based installations; 
with the <e>universal</e> installation CD you can perform a network less
installation as well.
</p>

<p>
<uri link="/doc/en/faq.xml#isoburning">Burn</uri> the CD and boot it. Press
<c>F2</c> at the boot screen to find out what boot options exist. Once booted,
you need to start the <c>pcmcia</c> init script if you need PCMCIA support.
</p>

<p>
The installation CDs allow you to start an <c>sshd</c> server, add additional
users, run <c>irssi</c> (a command-line chat client) and surf the web using
<c>lynx</c> or <c>links2</c>.
</p>

</body>
</section>
<section>
<title>Network Configuration</title>
<body>

<p>
If your network does not work already, you can use <c>net-setup</c> to configure
your network. You might need to load support for your network card using
<c>modprobe</c> prior to the configuration. If you have ADSL, use
<c>adsl-setup</c> and <c>adsl-start</c>. For PPTP support, first edit
<path>/etc/ppp/chap-secrets</path> and <path>/etc/ppp/options.pptp</path> and
then use <c>pptp &lt;server&nbsp;ip&gt;</c>.
</p>

<p>
For wireless access, use <c>iwconfig</c> to set the wireless parameters and then
use either <c>net-setup</c> again or run <c>ifconfig</c>, <c>dhcpcd</c> and/or
<c>route</c> manually.
</p>

<p>
If you are behind a proxy, do not forget to initialize your system using 
<c>export http_proxy</c>, <c>ftp_proxy</c> and <c>RSYNC_PROXY</c>.
</p>

</body>
</section>
<section>
<title>Preparing the Disks</title>
<body>

<p>
Use <c>fdisk</c> or <c>cfdisk</c> to create your partition layout. You need at
least a swap partition (type 82) and one Linux partition (type 83).
</p>

<p>
Use <c>mke2fs</c>, <c>mke2fs -j</c>, <c>mkreiserfs</c>, <c>mkfs.xfs</c> and
<c>mkfs.jfs</c> to create file systems on your Linux partitions. Initialize your
swap partition using <c>mkswap</c> and <c>swapon</c>.
</p>

<p>
Mount the freshly created file systems on <path>/mnt/gentoo</path>. Create
directories for the other mount points (like <path>/mnt/gentoo/boot</path>) if
you need them.
</p>

</body>
</section>
<section>
<title>Setting Up The Stage</title>
<body>

<p>
First make sure your date is set correctly using <c>date MMDDhhmmYYYY</c>. Next,
download a stage from one of our <uri link="/main/en/mirrors.xml">mirrors</uri>
or use the one available on the installation CD
(<path>/mnt/cdrom/stages</path>). Go to <path>/mnt/gentoo</path> and unpack the
stage using <c>tar&nbsp;-xvjpf&nbsp;&lt;stage&nbsp;tarball&gt;</c>.
</p>

<p>
Install a Portage snapshot if you are performing a network less installation: go
to <path>/mnt/gentoo/usr</path> and run
<c>tar&nbsp;-xvjf&nbsp;/mnt/cdrom/snapshots/&lt;snapshot&gt;</c>. Other users
can download a portage snapshot and install it likewise.
</p>

<p>
Edit <path>/mnt/gentoo/etc/make.conf</path> to suit your needs (USE flag, CFLAGS
and CXXFLAGS). You can use the <c>nano</c> editor for this.
</p>

</body>
</section>
<section>
<title>Installing the Gentoo Base System</title>
<body>

<p>
Mount the <path>/proc</path> file system first, copy over the
<path>/etc/resolv.conf</path> file and then chroot into your Gentoo
environment.
</p>

<pre caption="Preparing and chrooting">
# <i>mount -t proc none /mnt/gentoo/proc</i>
# <i>cp /etc/resolv.conf /mnt/gentoo/etc/</i>
# <i>chroot /mnt/gentoo /bin/bash</i>
# <i>env-update</i> &amp;&amp; <i>source /etc/profile</i>
</pre>

<p>
If you are not running a network less installation, issue <c>emerge --sync</c> to
update your Portage tree.
</p>

<p>
Next, make sure <path>/etc/make.profile</path> points to the right profile. The
default one should suffice for most users; sub profiles are available for
different kernels (like <path>2.4/</path> for 2.4-kernel based profiles). Change
the profile using <c>ln -sf</c>.
</p>

<ul>
  <li>
    Bootstrapping (not available for network less installations) happens using
    <c>scripts/bootstrap.sh</c> in the <path>/usr/portage</path> directory.
  </li>
  <li>
    System installation (not available for network less installations) happens 
    using <c>emerge&nbsp;-e&nbsp;system</c> (or <c>-N</c> if you haven't 
    altered the default CFLAGS/CXXFLAGS).
  </li>
</ul>

</body>
</section>
<section>
<title>Kernel Configuration</title>
<body>

<p>
Set your time zone information by changing the <path>/etc/localtime</path>
symbolic link to the correct location in <path>/usr/share/zoneinfo</path> using
<c>ln -sf</c>.
</p>

<p>
Install a kernel source (<c>gentoo-sources</c> and <c>vanilla-sources</c> are
available for network less installations) and configure it using <c>make
menuconfig</c> followed by <c>make&nbsp;&amp;&amp;make&nbsp;modules_install</c>
inside <path>/usr/src/linux</path>. Copy the <path>arch/i386/boot/bzImage</path>
file over to <path>/boot</path>. You can also <c>emerge&nbsp;genkernel</c> and
use <c>genkernel&nbsp;all</c>.
</p>

<p>
Genkernel users will need to <c>emerge&nbsp;coldplug</c> and
<c>rc-update&nbsp;add&nbsp;coldplug&nbsp;default</c>.
</p>

</body>
</section>
<section>
<title>Configuring the System</title>
<body>

<p>
Edit your <path>/etc/fstab</path>; an example follows:
</p>

<pre caption="Example fstab">
/dev/hda1   /boot     ext2    defaults,noatime     1 2
/dev/hda2   none      swap    sw                   0 0
/dev/hda3   /         ext3    noatime              0 1
none        /proc     proc    defaults             0 0
none        /dev/shm  tmpfs   nodev,nosuid,noexec  0 0
/dev/cdroms/cdrom0    /mnt/cdrom    auto      noauto,user    0 0
</pre>

<p>
Edit <path>/etc/conf.d/hostname</path> and <path>/etc/conf.d/domainname</path>,
run <c>rc-update&nbsp;add&nbsp;domainname&nbsp;default</c> and edit
<path>/etc/conf.d/net</path> to 
configure your network. Add the <c>net.eth0</c> init script to the default 
run level. If you have multiple NICs, symlink them to the <c>net.eth0</c> 
init script and add them to the default run level as well.
</p>

<p>
Edit <path>/etc/hosts</path>; examples are given below:
</p>

<pre caption="Example /etc/hosts">
<comment>(For static IPs)</comment>
127.0.0.1     localhost
192.168.0.5   jenny.homenetwork jenny
192.168.0.6   benny.homenetwork benny
192.168.0.7   tux.homenetwork tux

<comment>(For a dynamic IP)</comment>
127.0.0.1     localhost.homenetwork tux localhost
</pre>

<p>
Emerge <c>pcmcia-cs</c> and add it to the default run level if you need it.
</p>

<p>
Set the root password using <c>passwd</c>.
</p>

<p>
Set the necessary system configuration in <path>/etc/rc.conf</path>, 
<path>/etc/conf.d/rc</path>, <path>/etc/conf.d/keymaps</path>,
<path>/etc/conf.d/clock</path>.
</p>

</body>
</section>
<section>
<title>Installing System Tools</title>
<body>

<p>
2.4 kernel users need to <c>emerge&nbsp;--unmerge&nbsp;udev</c> and
<c>emerge&nbsp;devfsd</c>.
</p>

<p>
Install a system logger like <c>syslog-ng</c> and add it to the default
run level. Do the same for a cron daemon like <c>vixie-cron</c> (optional).
</p>

<p>
Install the necessary file system tools (<c>xfsprogs</c>, <c>reiserfsprogs</c>
or <c>jfsutils</c>) and networking tools (<c>dhcpcd</c> or <c>rp-pppoe</c>).
</p>

</body>
</section>
<section>
<title>Configuring the Bootloader</title>
<body>

<p>
Emerge <c>grub</c> or <c>lilo</c>. Edit <path>/boot/grub/grub.conf</path> or
<path>/etc/lilo.conf</path> to your likings. Below you will find an example for
each.
</p>

<pre caption="Example grub.conf">
default 0
timeout 30
splashimage=(hd0,0)/grub/splash.xpm.gz

<comment># genkernel users</comment>
title=Gentoo Linux 2.6.11-r3
root (hd0,0)
kernel /kernel-genkernel-x86-2.6.11-gentoo-r3 root=/dev/ram0 init=/linuxrc ramdisk=8192 real_root=/dev/hda3 udev
initrd /initramfs-genkernel-x86-2.6.11-gentoo-r3

<comment># non-genkernel users (no initrd)</comment>
title=Gentoo Linux 2.6.11 r3
root (hd0,0)
kernel /kernel-2.6.11-gentoo-r3 root=/dev/hda3

<comment># Only in case you want to dual-boot</comment>
title=Windows XP
root (hd0,5)
makeactive
chainloader +1
</pre>

<pre caption="Example lilo.conf">
boot=/dev/hda
prompt
timeout=50
default=gentoo

<comment># For non-genkernel users</comment>
image=/boot/kernel-2.6.11-gentoo-r3
  label=gentoo
  read-only
  root=/dev/hda3

<comment># For genkernel users</comment>
image=/boot/kernel-genkernel-x86-2.6.11-gentoo-r3
  label=gentoo
  read-only
  root=/dev/ram0
  append="init=/linuxrc ramdisk=8192 real_root=/dev/hda3 udev"
  initrd=/boot/initramfs-genkernel-x86-2.6.11-gentoo-r3

<comment># For dual-booting</comment>
other=/dev/hda6
  label=windows
</pre>

<p>
GRUB users need to install GRUB in the MBR using
<c>grub-install&nbsp;/dev/hda</c> after copying <path>/proc/mounts</path> to
<path>/etc/mtab</path>. LILO users need to run <c>/sbin/lilo</c>.
</p>

<p>
Exit the chrooted environment, unmount all file systems and reboot.
</p>

</body>
</section>
<section>
<title>Finalizing the Installation</title>
<body>

<p>
Log in as <c>root</c>, then add one or more users for day-to-day use using
<c>useradd&nbsp;-m&nbsp;-G&nbsp;&lt;groups&gt;&nbsp;&lt;username&gt;</c>.
</p>

<p>
If you performed a network less installation, mount the packages CD at
<path>/mnt/cdrom</path> and <c>export&nbsp;PKGDIR="/mnt/cdrom"</c> after which
you can <c>emerge&nbsp;-k&nbsp;&lt;package&gt;</c> to install additional
software like <c>kde</c>.
</p>

<p>
Thanks for installing Gentoo!
</p>

</body>
</section>
</chapter>	
</guide>
