/[gentoo]/xml/htdocs/doc/en/gentoo-x86-quickinstall.xml
Gentoo

Diff of /xml/htdocs/doc/en/gentoo-x86-quickinstall.xml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.6 Revision 1.83
1<?xml version='1.0' encoding="UTF-8"?> 1<?xml version='1.0' encoding="UTF-8"?>
2<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/gentoo-x86-quickinstall.xml,v 1.6 2003/12/01 13:51:21 swift Exp $ --> 2<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/gentoo-x86-quickinstall.xml,v 1.83 2009/03/13 16:51:20 neysx Exp $ -->
3<guide link="/doc/en/quickinstall.xml"> 3
4<!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
5
6<guide lang="en">
4<title>Gentoo Linux Install Reference</title> 7<title>Gentoo Linux x86 Quick Install Guide</title>
8
9<values>
10 <key id="raid+lvm">no</key>
11 <key id="root">/dev/sda3</key>
12</values>
13
14<author title="Author">
15 <mail link="neysx"/>
16</author>
17<author title="Author">
18 <mail link="swift"/>
19</author>
5<author title="Author">Steven Wagner</author> 20<author title="Author">Steven Wagner</author>
6<author title="Editor">
7 <mail link="swift@gentoo.org">Sven Vermeulen</mail>
8</author>
9 21
10<abstract> 22<abstract>
11The Quick install reference covers all details of the install process in a 23The Quick install guide covers the Gentoo install process in a non-verbose
12non-verbose manner. Users should already have prior experience with 24manner. Its purpose is to allow users to perform a stage3 install in no time.
13installing gentoo linux if they want to follow this guide. 25Users should already have prior experience with installing Gentoo Linux if they
26want to follow this guide.
14</abstract> 27</abstract>
15 28
29<!-- The content of this document is licensed under the CC-BY-SA license -->
30<!-- See http://creativecommons.org/licenses/by-sa/2.5 -->
16<license/> 31<license/>
17 32
18<version>1.2</version> 33<version>24</version>
19<date>December 1, 2003</date> 34<date>2009-03-13</date>
20 35
21<chapter> 36<chapter>
22<title>Quick Install Reference</title> 37<title>Introduction</title>
38<section>
39<body>
40
41<p>
42This guide contains all commands you should use to complete a stage3
43installation of Gentoo. You need a connection to the Internet to download the
44stage3 and Portage snapshots.
45</p>
46
47<p>
48New users should read the <uri link="/doc/en/handbook/index.xml">Handbook</uri>
49as it gives a better overview about the installation process.
50</p>
51
52<p>
53Timing output follows all commands that take more than a couple of seconds to
54finish. Commands were timed on an AMD 2000 1.66 Ghz PC with 512 MB of RAM and
55two SATA disks connected to a hardware controller.
56</p>
57
58<pre caption="Test box specs">
59<comment>(The following specs and the timing information should help you determine
60a rough estimate of the time you need to complete your install)</comment>
61
62# <i>grep bogo /proc/cpuinfo</i>
63bogomips : 3337.81
64
65# <i>hdparm -tT /dev/sda</i>
66/dev/sda:
67 Timing cached reads: 1100 MB in 2.00 seconds = 549.97 MB/sec
68 Timing buffered disk reads: 224 MB in 3.01 seconds = 74.36 MB/sec
69
70# <i>grep MemTotal /proc/meminfo</i>
71MemTotal: 509248 kB
72</pre>
73
23<body> 74</body>
75</section>
76</chapter>
24 77
25<p> 78<chapter>
26The installation ISOs are on the <uri link= 79<title>Quick Install Guide</title>
27"http://www.gentoo.org/main/en/mirrors.xml">Gentoo Mirrors</uri>. Detailed 80
28descriptions of the different CDs are available in the <uri 81<section>
29link="http://store.gentoo.org">Gentoo Store</uri>. CD 1 contains 82 <include href="gentoo-x86-quickinstall-media.xml"/>
30everything you need to install Gentoo Linux quickly and without a 83</section>
31connection to the Internet. CD2 is optional and contains pre-compiled packages 84
32such as KDE, GNOME, OpenOffice, Mozilla, Evolution and more. 85<section>
86<title>Preparing the Disks</title>
87<body>
88
33</p> 89<p>
34 90Use <c>fdisk</c> or <c>cfdisk</c> to create your partition layout. You need at
91least a swap partition (type 82) and one Linux partition (type 83). The
92following scenario creates a <path>/boot</path>, a swap and a main partition as
93used in our handbook. Replace <path>sda</path> with your disk. Most systems
94ignore the bootable flag, but a few need it. Set this flag on your boot
95partition with fdisk's <c>a</c> command.
35<p> 96</p>
36Boot from the first Gentoo CD. Press &lt;F1&gt; and/or &lt;F2&gt; to 97
37see what boot options are available. Press &lt;ENTER&gt; at the bootscreen to 98<pre caption="Create the partitions">
38continue with the default kernel. You'll eventually receive a prompt. 99livecd ~ # <i>fdisk /dev/sda</i>
100
101<comment>(The rest of this guide uses the following partitioning scheme)</comment>
102livecd ~ # <i>fdisk -l /dev/sda</i>
103
104Disk /dev/sda: 599.9 GB, 599978409984 bytes
105255 heads, 63 sectors/track, 72943 cylinders
106Units = cylinders of 16065 * 512 = 8225280 bytes
107
108 Device Boot Start End Blocks Id System
109/dev/sda1 * 1 12 96358+ 83 Linux
110/dev/sda2 13 110 787185 82 Linux swap / Solaris
111/dev/sda3 111 72943 585031072+ 83 Linux
112</pre>
113
39</p> 114<p>
40 115Use <c>mke2fs</c>, <c>mke2fs -j</c>, <c>mkreiserfs</c>, <c>mkfs.xfs</c> and
41<pre caption="Beginning settings"> 116<c>mkfs.jfs</c> to create file systems on your Linux partitions. Initialize your
42# <i>date</i> (Make sure your time and date is correct. If wrong, set it with <i>date MMDDhhmmCCYY</i> ) 117swap partition using <c>mkswap</c> and <c>swapon</c>.
43# <i>modprobe module_name</i> (Optional - Load any necessary modules)
44# <i>net-setup eth0</i> (Configure the network)
45# <i>fdisk /dev/hda</i> (Partition your drive)
46</pre>
47
48<p> 118</p>
49The recommended setup is a 64 meg boot volume with ext3, a swap partition 119
50twice the size of your available RAM, and the rest for your root partition 120<pre caption="Create the file systems and activate swap">
51using ReiserFS. 121<comment>(ext2 is all you need on the /boot partition)</comment>
122livecd ~ # <i>mke2fs /dev/sda1</i>
123
124<comment>(Let's use ext3 on the main partition)</comment>
125livecd ~ # <i>mke2fs -j /dev/sda3</i>
126
127<comment>(Create and activate swap)</comment>
128livecd ~ # <i>mkswap /dev/sda2 &amp;&amp; swapon /dev/sda2</i>
129</pre>
130
52</p> 131<p>
53 132Mount the freshly created file systems on <path>/mnt/gentoo</path>. Create
133directories for the other mount points (like <path>/mnt/gentoo/boot</path>) if
134you need them and mount them too.
54<p> 135</p>
55Initialise your partitions using <c>mke2fs</c> (Ext2), <c>mke2fs 136
56-j</c> (Ext3), <c>mkreiserfs</c> (ReiserFS), <c>mkfs.xfs</c> (XFS), 137<pre caption="Mount the file systems">
57<c>mkfs.jfs</c> (JFS) and <c>mkswap</c> (swap partition). For instance: 138livecd ~ # <i>mount /dev/sda3 /mnt/gentoo</i>
58<c>mke2fs -j /dev/hda3</c>. 139livecd ~ # <i>mkdir /mnt/gentoo/boot</i>
140livecd ~ # <i>mount /dev/sda1 /mnt/gentoo/boot</i>
141livecd ~ # <i>cd /mnt/gentoo</i>
142</pre>
143
144</body>
145</section>
146
147<section>
148 <include href="gentoo-x86-quickinstall-stage.xml"/>
149</section>
150
151<section>
152<title>Kernel Configuration</title>
153<body>
154
59</p> 155<p>
60 156Install a kernel source (usually <c>gentoo-sources</c>), configure it, compile
157it and copy the <path>arch/i386/boot/bzImage</path> file to <path>/boot</path>.
61<p> 158</p>
62Continue by mounting the partitions and extracting the appropriate stage 159
63file. 160<pre caption="Install a kernel source, compile it and install the kernel">
161livecd etc # <i>time emerge gentoo-sources</i>
162
163real 2m51.435s
164user 0m58.220s
165sys 0m29.890s
166livecd etc # <i>cd /usr/src/linux</i>
167livecd linux # <i>make menuconfig</i>
168<comment>(Configure your kernel)</comment>
169livecd linux # <i>time make -j2</i>
170
171<comment>(Elapsed time depends highly on the options you selected)</comment>
172real 3m51.962s
173user 3m27.060s
174sys 0m24.310s
175
176livecd linux # <i>make modules_install</i>
177livecd linux # <i>cp arch/i386/boot/bzImage /boot/kernel</i>
178</pre>
179
180</body>
181</section>
182
183<section>
184 <include href="gentoo-x86-quickinstall-system.xml"/>
185</section>
186
187<section id="reboot">
188<title>Reboot</title>
189<body>
190
64</p> 191<p>
65 192Exit the chrooted environment, unmount all file systems and reboot:
66<pre caption="Preparing the Installation">
67(Activate the swap partition) # <i>swapon /dev/hdax</i>
68(Mount the root partition) # <i>mount /dev/hdax /mnt/gentoo</i>
69(Create the boot mountpoint) # <i>mkdir /mnt/gentoo/boot</i>
70(Mount the boot partition) # <i>mount /dev/hdax /mnt/gentoo/boot</i>
71(Go to the mountpoint) # <i>cd /mnt/gentoo</i>
72(Extract a stage tarball...) # <i>tar -xvjpf /mnt/cdrom/stages/stage?-*.tar.bz2</i>
73(<comment>or</comment> download the latest tarball...) # <i>links http://gentoo.oregonstate.edu/releases/x86/1.4/</i>
74( ... and extract) # <i>tar -xvjpf stage*</i>
75(GRP-only: unpack a portage tree) # <i>tar -xvjf /mnt/cdrom/snapshots/portage-*.tar.bz2 -C /mnt/gentoo/usr</i>
76(GRP-only: copy over distfiles) # <i>cp -R /mnt/cdrom/distfiles /mnt/gentoo/usr/portage/distfiles</i>
77(GRP-only: copy over packages) # <i>cp -a /mnt/cdrom/packages /mnt/gentoo/usr/portage/packages</i>
78(Select a mirror) # <i>mirrorselect -i -o &gt;&gt; /mnt/gentoo/etc/make.conf</i>
79(Copy over nameserver information) # <i>cp /etc/resolv.conf /mnt/gentoo/etc/resolv.conf</i>
80(Mount the proc filesystem) # <i>mount -t proc proc /mnt/gentoo/proc</i>
81(Chroot into the new environment) # <i>chroot /mnt/gentoo /bin/bash</i>
82(Load the necessary variables) # <i>env-update; source /etc/profile</i>
83(Network-only, non-GRP: update Portage) # <i>emerge sync</i>
84</pre>
85
86<p> 193</p>
87Now we install Gentoo: 194
195<pre caption="Reboot">
196livecd conf.d # <i>exit</i>
197livecd / # <i>umount /mnt/gentoo/dev /mnt/gentoo/proc /mnt/gentoo/boot /mnt/gentoo</i>
198livecd / # <i>reboot</i>
199<comment>(Don't forget to remove the CD)</comment>
88</p> 200</pre>
89 201
90<pre caption = "Installing Gentoo"> 202</body>
91(Change USE, CFLAGS and CXXFLAGS. Stage1 can also change CHOST) # <i>nano -w /etc/make.conf</i> 203</section>
92(Stage1 only: bootstrap system) # <i>cd /usr/portage; scripts/bootstrap.sh</i>
93(Stage1, Stage2 only: install base system) # <i>emerge system</i>
94</pre>
95 204
96<p> 205<section>
97Next we set up the necessary information: 206 <include href="gentoo-x86-quickinstall-after-reboot.xml"/>
98</p> 207</section>
99 208
100<pre caption = "Setting up Configuration Files"> 209</chapter>
101(Set timezone information) # <i>ln -sf /usr/share/zoneinfo/path/to/timezonefile /etc/localtime</i>
102(Edit fstab file) # <i>nano -w /etc/fstab</i>
103</pre>
104
105<p>
106Use the following as a <e>template</e> (don't copy verbatim) for
107<path>/etc/fstab</path>:
108</p>
109
110<pre caption="/etc/fstab">
111# &lt;fs&gt; &lt;mountpoint&gt; &lt;type&gt; &lt;opts&gt; &lt;dump/pass&gt;
112/dev/hdax /boot ext3 noauto,noatime 1 2
113/dev/hdax / reiserfs noatime 0 1
114/dev/hdax none swap sw 0 0
115/dev/cdroms/cdrom0 /mnt/cdrom iso9660 noauto,ro,user 0 0
116none /proc proc defaults 0 0
117none /dev/shm tmpfs defaults 0 0
118/dev/hdax /mnt/dosc ntfs ro,noatime,umask=0222 0 0
119</pre>
120
121<p>
122Continue by installing the Linux kernel:
123</p>
124
125<pre caption="Installing the Kernel">
126(Install the kernel sources) # <i>emerge -k gentoo-sources</i>
127(Configure your kernel using genkernel...) # <i>emerge -k genkernel; genkernel</i>
128(<comment>or</comment> (1) manually build your kernel) # <i>cd /usr/src/linux; make menuconfig;</i>
129( (2) Include VM fs, /proc fs, /dev fs, /dev fs auto mount at boot)
130( (3) Compile your kernel) # <i>make dep &amp;&amp; make clean bzImage modules modules_install</i>
131( (4) Copy over the kernel) # <i>cp arch/i386/boot/bzImage /boot; cp System.map /boot</i>
132</pre>
133
134<p>
135Now install other tools you might want:
136</p>
137
138<pre caption = "Install important system tools">
139(Install system logger; choice: sysklogd, metalog, msyslog, syslog-ng) # <i>emerge -k syslog-ng </i>
140(Have the systemlogger automatically started at boot) # <i>rc-update add syslog-ng default</i>
141(Install cron daemon; choice: vcron, dcron, fcron) # <i>emerge -k vcron</i>
142(Have the cron daemon automatically started at boot) # <i>rc-update add vcron default</i>
143(genkernel users only: install hotplug) # <i>emerge -k hotplug</i>
144(genkernel users only: have hotplug automatically started at boot) # <i>rc-update add hotplug default</i>
145(Non-ext2,ext3 users only; choice: reiserfsprogs, xfsprogs, jfsutils) # <i>emerge -k reiserfsprogs</i>
146</pre>
147
148<p>
149If you need specialised kernel ebuilds, now is a good time to install them:
150</p>
151
152<pre caption = "Install Specialised Kernel Ebuilds">
153# <i>emerge -k pcmcia-cs</i> (or <i>emu10k1</i>, <i>nforce-net</i>, <i>nforce-audio</i>, <i>e100</i>, <i>e1000</i>, <i>ati-drivers</i>, <i>rp-pppoe</i>)
154# <i>VIDEO_CARDS="yourcard" emerge xfree-drm</i> (for ATI Radeon up to 9200, Rage128, Matrox, Voodoo and other cards)
155</pre>
156
157<p>
158Finalise the settings for your Gentoo system:
159</p>
160
161<pre caption = "Finalise the Configuration Settings">
162(Set root password) # <i>passwd</i>
163(Create a user) # <i>useradd your_user -m -G users,wheel,audio -s /bin/bash</i>
164(Set password for that user) # <i>passwd your_user</i>
165(Set the system hostname) # <i>echo mymachine &gt; /etc/hostname</i>
166(Set the system domainname) # <i>echo mydomain.com &gt; /etc/dnsdomainname</i>
167(Set the hostsfile, at least set "127.0.0.1 mymachine") # <i>nano -w /etc/hosts</i>
168</pre>
169
170<pre caption = "Set up Networking">
171(Setup networking; dhcp-users should set iface_eth0="dhcp") # <i>nano -w /etc/conf.d/net</i>
172(List modules to be loaded at startup) # <i>nano -w /etc/modules.autoload.d/kernel-2.4</i>
173(Configure basic system settings; follow comments) # <i>nano -w /etc/rc.conf</i>
174(Non-PCMCIA only: start networking automatically at boot) # <i>rc-update add net.eth0 default</i>
175(Only if you have multiple network interfaces:)
176 (1) Create initscripts for each interface) # <i>ln -s /etc/init.d/net.eth0 /etc/init.d/net.ethx</i>
177 (2) Automatically start at boot if no PCMCIA) # <i>rc-update add net.ethx default</i>
178(PCMCIA only: verify /etc/conf.d/pcmcia and load PCMCIA at boot) # <i>rc-update add pcmcia boot</i>
179</pre>
180
181<p>
182Now install a bootloader. Left is for grub, right for lilo:
183</p>
184
185<pre caption = "Install and Configure a bootloader">
186# <i>emerge -k grub</i> | # <i>emerge -k lilo</i>
187# <i>grub</i> | # <i>nano -w /etc/lilo.conf</i>
188grub&gt; <i>root (hd0,0)</i> (Boot partition) | boot=/dev/hda
189grub&gt; <i>setup (hd0)</i> (Install on MBR) | prompt
190grub&gt; <i>quit</i> | timeout=50
191# <i>nano -w /boot/grub/grub.conf</i> | default=gentoo
192 default 0 |
193 timeout 15 | <comment># Genkernel only:</comment>
194 splashimage=(hd0,0)/grub/splash.xpm.gz | image=/boot/kernel-<comment>&lt;kernel version&gt;</comment>
195 | root=/dev/hda3
196 title=Gentoo Linux | label=gentoo
197 root (hd0,0) |
198 <comment># Genkernel only:</comment> | <comment># Non-genkernel only:</comment>
199 kernel (hd0,0)/kernel-<comment>&lt;kernel version&gt;</comment> root=/dev/hda3 | image=/boot/bzImage
200 initrd (hd0,0)/initrd-<comment>&lt;kernel version&gt;</comment> | root=/dev/hda3
201 <comment># Non-genkernel only:</comment> | label=gentoo
202 kernel (hd0,0)/bzImage |
203 | <comment># For dualbooting:</comment>
204 <comment># For dualbooting:</comment> | other=/dev/hda<comment>X</comment>
205 title=Windows XP | label=windows
206 root (hd0,5) |
207 chainloader (hd0,5)+1 | # <i>/sbin/lilo</i>
208</pre>
209
210<p>
211Now unmount all partitions and reboot into your new system:
212</p>
213
214<pre caption="Finishing off and installing GUI">
215(Updating configuration files) # <i>etc-update</i>
216(Exiting the chroot) # <i>exit; cd /</i>
217(Unmounting partitions) # <i>umount /mnt/gentoo/boot /mnt/gentoo/proc /mnt/gentoo</i>
218(Reboot; Remove the install CD from the tray) # <i>reboot</i>
219(After booting:)
220(ADSL-users only) # <i>adsl-setup</i>
221(GRP-users only, optional CD2 usage)
222( (1) Mount CD2) # <i>mount /dev/cdrom /mnt/cdrom</i>
223( (2) Copy over packages) # <i>cp -a /mnt/cdrom/packages/* /usr/portage/packages/</i>
224( (3) Install extra software) # <i>emerge -k xfree gnome kde mozilla openoffice-bin</i>
225( (4) Configure your Xserver) # <i>/usr/X11R6/bin/xf86config</i>
226</pre>
227
228<p>
229You can get more information from the <uri link="http://www.gentoo.org/doc/en/index.xml">Gentoo Documentation</uri>.
230</p>
231</body></chapter>
232
233</guide> 210</guide>
234

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.83

  ViewVC Help
Powered by ViewVC 1.1.20