… | |
… | |
18 | <author title="Editor"> |
18 | <author title="Editor"> |
19 | <mail link="Pierre-Henri.Jondot@wanadoo.fr">Pierre-Henri Jondot</mail> |
19 | <mail link="Pierre-Henri.Jondot@wanadoo.fr">Pierre-Henri Jondot</mail> |
20 | </author> |
20 | </author> |
21 | <author title="Editor"> |
21 | <author title="Editor"> |
22 | <mail link="stocke2@gentoo.org">Eric Stockbridge</mail> |
22 | <mail link="stocke2@gentoo.org">Eric Stockbridge</mail> |
23 | </author> |
23 | </author> |
24 | <author title="Editor"> |
24 | <author title="Editor"> |
25 | <mail link="rajiv@gentoo.org">Rajiv Manglani</mail> |
25 | <mail link="rajiv@gentoo.org">Rajiv Manglani</mail> |
26 | </author> |
26 | </author> |
27 | <author title="Editor"> |
27 | <author title="Editor"> |
28 | <mail link="seo@gentoo.org">Jungmin Seo</mail> |
28 | <mail link="seo@gentoo.org">Jungmin Seo</mail> |
29 | </author> |
29 | </author> |
30 | <author title="Editor"> |
30 | <author title="Editor"> |
31 | <mail link="zhware@gentoo.org">Stoyan Zhekov</mail> |
31 | <mail link="zhware@gentoo.org">Stoyan Zhekov</mail> |
32 | </author> |
32 | </author> |
|
|
33 | <author title="Editor"> |
|
|
34 | <mail link="jhhudso@gentoo.org">Jared Hudson</mail> |
|
|
35 | </author> |
|
|
36 | <author title="Editor"> |
|
|
37 | <mail link="">Colin Morey</mail> |
|
|
38 | </author> |
33 | <abstract>These instructions step you through the process of installing Gentoo |
39 | <abstract>These instructions step you through the process of installing Gentoo |
34 | Linux 1.4_rc3. The Gentoo Linux installation process supports various installation |
40 | Linux 1.4_rc3. The Gentoo Linux installation process supports various installation |
35 | approaches, depending upon how much of the system you want to custom-build from |
41 | approaches, depending upon how much of the system you want to custom-build from |
36 | scratch. |
42 | scratch. |
37 | </abstract> |
43 | </abstract> |
38 | <version>2.3.19</version> |
44 | <version>2.3.19</version> |
39 | <date>26 Feb 2003</date> |
45 | <date>26 Feb 2003</date> |
40 | <chapter> |
46 | <chapter> |
41 | <title>About the Install</title> |
47 | <title>About the Install</title> |
42 | <section> |
48 | <section> |
43 | <body> |
49 | <body> |
44 | <p>This new boot CD will boot from nearly any modern IDE CD-ROM drive, as well |
50 | <p>This new boot CD will boot from nearly any modern IDE CD-ROM drive, as well |
45 | as many SCSI CD-ROM drives, assuming that your CD-ROM and BIOS both support booting. |
51 | as many SCSI CD-ROM drives, assuming that your CD-ROM and BIOS both support booting. |
46 | Included on the CD-ROM is Linux support for IDE (and PCI IDE) (built-in to the |
52 | Included on the CD-ROM is Linux support for IDE (and PCI IDE) (built-in to the |
47 | kernel) as well as support for all SCSI devices (available as modules.) In |
53 | kernel) as well as support for all SCSI devices (available as modules.) In |
48 | addition, we provide modules for literally every kind of network card that |
54 | addition, we provide modules for literally every kind of network card that |
49 | Linux supports, as well as tools to allow you to configure your network and |
55 | Linux supports, as well as tools to allow you to configure your network and |
50 | establish outbound (as well as inbound) <c>ssh</c> connections and download |
56 | establish outbound (as well as inbound) <c>ssh</c> connections and to download |
51 | files. </p> |
57 | files. </p> |
52 | <p>To install from the build CD, you will need to have a 486+ processor and |
58 | <p>To install from the build CD, you will need to have a 486+ processor and |
53 | ideally at least 64 Megabytes of RAM. (Gentoo Linux has been successfully |
59 | ideally at least 64 Megabytes of RAM. (Gentoo Linux has been successfully |
54 | built with 64MB of RAM + 64MB of swap space, but the build process is awfully |
60 | built with 64MB of RAM + 64MB of swap space, but the build process is awfully |
55 | slow under those conditions.)</p> |
61 | slow under those conditions.)</p> |
56 | <p>Gentoo Linux can be installed using one of three "stage" tarball files. The |
62 | <p>Gentoo Linux can be installed using one of three "stage" tarball files. The |
57 | one you choose depends on how much of the system you want to compile yourself. |
63 | one you choose depends on how much of the system you want to compile yourself. |
58 | The stage1 tarball is used when one wants to bootstrap and build the entire |
64 | The stage1 tarball is used when you want to bootstrap and build the entire |
59 | system from scratch. The stage2 tarball is used for building the entire system |
65 | system from scratch. The stage2 tarball is used for building the entire system |
60 | from scratch, except for the bootstrap part which is already performed for you. |
|
|
61 | And the stage3 tarball already contains a basic Gentoo Linux system that has |
66 | from a bootstrapped state. The stage3 tarball already contains a basic Gentoo Linux system.</p> |
62 | been optimized for your system.</p> |
|
|
63 | <p><b>So, should you choose to start from a stage1, stage2, or stage3 tarball?</b> |
67 | <p><b>So, should you choose to start from a stage1, stage2, or stage3 tarball?</b> |
64 | Starting from a stage1 allows you to have total control over the optimization settings |
68 | Starting from a stage1 allows you to have total control over the optimization settings |
65 | and optional build-time functionality that is initially enabled on your system. This |
69 | and optional build-time functionality that is initially enabled on your system. This |
66 | makes stage1 installs good for power users who know what they are doing. stage2 installs |
70 | makes stage1 installs good for power users who know what they are doing. Stage2 installs |
67 | allow you to skip the "bootstrap" process, and doing this is fine if you are happy with |
71 | allow you to skip the bootstrap process, and doing this is fine if you are happy with |
68 | the optimization settings that we chose for your particular stage2 tarball. Choosing to |
72 | the optimization settings that we chose for your particular stage2 tarball. Choosing to |
69 | go with a stage3 allows for the fastest install of Gentoo Linux, but also means that |
73 | go with a stage3 allows for the fastest install of Gentoo Linux, but also means that |
70 | your base system will have the optimization settings that we chose for you. Which may not |
74 | your base system will have the optimization settings that we chose for you. Since major |
71 | be a bad thing, as major releases of Gentoo Linux have stage3's specifically optimized for |
75 | releases of Gentoo Linux have stage3's specifically optimized for various popular processors, |
72 | various popular processors. <b>If you're installing Gentoo Linux for the first time, consider |
76 | this may be sufficient for you. <b>If you're installing Gentoo Linux for the first time, consider |
73 | using a stage3 tarball for installation.</b></p> |
77 | using a stage3 tarball for installation.</b></p> |
74 | |
78 | |
75 | |
79 | |
76 | <p> So, how does one begin the install process? First, you'll want to decide |
80 | <p> So, how does one begin the install process? First, you will want to decide which one of our LiveCD ISO images to grab from |
77 | which one of our LiveCD ISO images to grab from |
|
|
78 | <uri>http://www.ibiblio.org/gentoo/releases/1.4_rc3/x86/</uri> . |
81 | <uri>http://www.ibiblio.org/gentoo/releases/1.4_rc3/x86/</uri> . |
79 | In this directory, you'll see several subdirectories such as <c>athlon</c> |
|
|
80 | for each of our various architecture-specific builds. Here's a low-down on |
|
|
81 | each arch directory and what it contains:</p> |
|
|
82 | <table> |
|
|
83 | <tr> |
|
|
84 | <th>Architecture</th> |
|
|
85 | <th>Description</th> |
|
|
86 | </tr> |
|
|
87 | <tr> |
|
|
88 | <ti>x86</ti> |
|
|
89 | <ti>Stage 1 tarballs and "gentoo-basic" liveCD -- will work on anything. Some Gentoo Linux |
|
|
90 | "_rc" releases only have these types of stage tarballs.</ti> |
|
|
91 | </tr> |
|
|
92 | <tr> |
|
|
93 | <ti>i586</ti> |
|
|
94 | <ti>Stage 2 and 3 tarballs, GRP packages and liveCD for i586+ CPUs</ti> |
|
|
95 | </tr> |
|
|
96 | <tr> |
|
|
97 | <ti>i686</ti> |
|
|
98 | <ti>Stage 2 and 3 tarballs, GRP packages and liveCD for i686+ CPUs</ti> |
|
|
99 | </tr> |
|
|
100 | <tr> |
|
|
101 | <ti>athlon</ti> |
|
|
102 | <ti>Stage 2 and 3 tarballs, GRP packages and liveCD for AMD Athlon CPUs</ti> |
|
|
103 | </tr> |
|
|
104 | <tr> |
|
|
105 | <ti>athlon-xp</ti> |
|
|
106 | <ti>Stage 2 and 3 tarballs, GRP packages and liveCD for AMD Athlon XP CPUs</ti> |
|
|
107 | </tr> |
|
|
108 | <tr> |
|
|
109 | <ti>athlon-mp</ti> |
|
|
110 | <ti>Stage 2 and 3 tarballs, GRP packages and liveCD for AMD Athlon MP CPUs</ti> |
|
|
111 | </tr> |
|
|
112 | <tr> |
|
|
113 | <ti>pentium3</ti> |
|
|
114 | <ti>Stage 2 and 3 tarballs, GRP packages and liveCD for Intel Pentium III and Pentium 4 CPUs</ti> |
|
|
115 | </tr> |
|
|
116 | </table> |
|
|
117 | <p>Inside each of these directories, |
|
|
118 | you'll find a <path>livecd/</path> directory that contains LiveCDs. While these LiveCDs |
|
|
119 | will boot on any architecture, the install-related tarballs are optimized for a particular |
|
|
120 | CPU type and will not work on all systems, except for the "gentoo-basic" LiveCD in the <path>x86</path> |
|
|
121 | directory which can be used to install on anything. |
|
|
122 | </p> |
82 | </p> |
123 | <p> The LiveCDs are full CD images that should be burned to a CDR or CD-RW |
83 | <p> The LiveCDs are full CD images that should be burned to a CDR or CD-RW |
124 | using CD burning software. Currently, we have two types of LiveCDs. The first |
84 | using CD burning software. Currently, we have two types of LiveCDs. The first |
125 | carries the "gentoo-basic" label, and is approximately 40MB in size and lives |
85 | carries the "gentoo-basic" label, and is approximately 40MB in size, contains only the stage 1 tarball and lives |
126 | in the <path>x86/livecd/</path> directory. This LiveCD is of minimal size to |
86 | in the <path>x86/livecd/</path> directory. This LiveCD is of minimal size to |
127 | allow for a initial quick download and contains a stage1 tarball that can be |
87 | allow for a initial quick download and contains a stage1 tarball that can be |
128 | found in <path>/mnt/cdrom/gentoo/</path> after the CD has booted.</p> |
88 | found in <path>/mnt/cdrom/gentoo/</path> after the CD has booted.</p> |
129 | <p>The second flavor of LiveCD we currently offer is labelled "livecd-grp." |
89 | <p>The second flavor of LiveCD we currently offer is labelled "gentoo-3stages." |
130 | These CDs (found in their respective <path>arch/livecd</path> directories) |
90 | This CD is also found in <path>x86/livecd</path>. It |
131 | contain stage1, 2 and 3 tarballs, and also contain a set of GRP packages |
91 | contain stage1, 2 and 3 tarballs Using this LiveCD, it will be possible |
132 | optimized for a specific architecture. GRP is simply precompiled packages for |
|
|
133 | very large applications, such as XFree86. KDE, GNOME, OpenOffice, etc. |
|
|
134 | Using these LiveCDs, it will be possible |
|
|
135 | for you to install a fully-functional Gentoo Linux system very quickly. The |
92 | for you to install a fully-functional Gentoo Linux system very quickly.</p> |
136 | downside is that these ISO images are large -- around 600MB -- so they can take |
|
|
137 | a while to download. <b>Note that some "_rc" releases of Gentoo Linux may not |
|
|
138 | include GRP package sets or LiveCDs.</b></p> |
|
|
139 | <impo>If you encounter a problem with any part of the install and wish to |
93 | <impo>If you encounter a problem with any part of the install and wish to |
140 | report it as a bug, report it to <uri>http://bugs.gentoo.org</uri>. If the bug |
94 | report it as a bug, report it to <uri>http://bugs.gentoo.org</uri>. If the bug |
141 | needs to be sent upstream to the original software developers (ie the KDE team) the |
95 | needs to be sent upstream to the original software developers (eg the KDE team) the |
142 | <e>Gentoo Linux developers</e> will take care of that for you. |
96 | <e>Gentoo Linux developers</e> will take care of that for you. |
143 | </impo> |
97 | </impo> |
144 | <p>Now, let's quickly review the install process. First, we'll download, burn |
98 | <p>Now, let us quickly review the install process. First, we will download, burn |
145 | and boot a LiveCD. After getting a root prompt, we'll create partitions, create |
99 | and boot a LiveCD. After getting a root prompt, we will create partitions, create |
146 | our filesystems, and extract either a stage1, stage2 or stage3 tarball. If we |
100 | our filesystems, and extract either a stage1, stage2 or stage3 tarball. If we |
147 | are using a stage1 or stage2 tarball, we will take the appropriate steps to get |
101 | are using a stage1 or stage2 tarball, we will take the appropriate steps to get |
148 | our systems to stage3. Once our systems are at stage3, we can configure them |
102 | our system to stage3. Once our system is at stage3, we can configure it |
149 | (tweaking config files, installing a bootloader, etc) and boot them and have a |
103 | (customize configuration files, install a bootloader, etc) and boot it and have a |
150 | fully-functional Gentoo Linux system. Depending on what stage of the build |
104 | fully-functional Gentoo Linux system. Depending on what stage of the build |
151 | process you're starting from, here's what's required for installation: </p> |
105 | process you're starting from, here is what is required for installation: </p> |
152 | <table> |
106 | <table> |
153 | <tr> |
107 | <tr> |
154 | <th>stage tarball</th> |
108 | <th>stage tarball</th> |
155 | <th>requirements for installation</th> |
109 | <th>requirements for installation</th> |
156 | </tr> |
110 | </tr> |
157 | <tr> |
111 | <tr> |
158 | <ti>1</ti> |
112 | <ti>1</ti> |
159 | <ti>partition/filesystem setup, emerge sync, bootstrap, emerge system, emerge linux sources, final configuration</ti> |
113 | <ti>partition/filesystem setup, emerge sync, bootstrap, emerge system, emerge kernel sources, final configuration</ti> |
160 | </tr> |
114 | </tr> |
161 | <tr> |
115 | <tr> |
162 | <ti>2</ti> |
116 | <ti>2</ti> |
163 | <ti>partition/filesystem setup, emerge sync, emerge system, emerge linux sources, final configuration</ti> |
117 | <ti>partition/filesystem setup, emerge sync, emerge system, emerge kernel sources, final configuration</ti> |
164 | </tr> |
118 | </tr> |
165 | <tr> |
119 | <tr> |
166 | <ti>3</ti> |
120 | <ti>3</ti> |
167 | <ti>partition/filesystem setup, emerge sync, final configuration</ti> |
121 | <ti>partition/filesystem setup, emerge sync, final configuration</ti> |
168 | </tr> |
122 | </tr> |
169 | </table> |
123 | </table> |
170 | </body> |
124 | </body> |
171 | </section> |
125 | </section> |
172 | </chapter> |
126 | </chapter> |
173 | <chapter> |
127 | <chapter> |
174 | <title>Booting</title> |
128 | <title>Booting</title> |
175 | <section> |
129 | <section> |
176 | <body> |
130 | <body> |
177 | <p>Start by booting the LiveCD. If detected properly, you should see a fancy boot screen |
131 | <p>Start by booting the LiveCD. You should see a fancy boot screen |
178 | with the Gentoo Linux logo on it. At this screen, you can hit Enter to begin the boot process, |
132 | with the Gentoo Linux logo on it. At this screen, you can hit Enter to begin the boot process, |
179 | or boot the LiveCD with custom boot options by typing <c>gentoo opt1 opt2</c> and then hitting Enter. To see |
133 | or boot the LiveCD with custom boot options by typing <c>gentoo opt1 opt2</c> and then hitting Enter. To see |
180 | a detailed description of available boot options, press F2 to view the help screen.</p> |
134 | a detailed description of available boot options, press F2 to view the help screen.</p> |
181 | |
135 | |
182 | <p> |
136 | <p> Once you hit Enter, you will be greeted with the standard kernel |
183 | Once you hit Enter, you'll be |
137 | booting output, kernel and initrd messages, followed by the normal Gentoo |
184 | greeted with a lot of text output (kernel and initrd messages) |
138 | Linux boot sequence. You will be automatically logged in as |
185 | followed by the normal Gentoo Linux boot sequence. |
139 | "<c>root</c>" and the root password will be set to a random string |
186 | You will be automatically logged in as "root" and the root password will be |
140 | for security purposes. You should have a root ("<c>#</c>") prompt |
187 | set to a random string for security purposes. You should change your LiveCD's root password |
141 | on the current console, and can also swith to other consoles by pressing |
188 | if you think you're going to login again on another virtual console. |
142 | Alt-F2, Alt-F3 and Alt-F4. Get back to the one you started on by pressing |
189 | You should have a root ("<c>#</c>") prompt on the current |
143 | Alt-F1. At this point you should set the root password, type passwd and |
190 | console, and can also open new root consoles by pressing Alt-F2, Alt-F3 and Alt-F4. |
144 | follow the prompts. |
191 | Get back to the one you started on by pressing (you guessed it) Alt-F1. |
|
|
192 | |
|
|
193 | </p> |
145 | </p> |
194 | <p>You've probably also noticed that above your <c>#</c> prompt is a bunch of help text |
146 | <p>You've probably also noticed that above your <c>#</c> prompt is a bunch of help text |
195 | that explains how to do things like configure your Linux networking and telling you where you can find |
147 | that explains how to do things like configure your Linux networking and telling you where you can find |
196 | the Gentoo Linux stage tarballs and packages on your CD. |
148 | the Gentoo Linux stage tarballs and packages on your CD. |
197 | </p> |
149 | </p> |
198 | </body> |
150 | </body> |
199 | </section> |
151 | </section> |
200 | </chapter> |
152 | </chapter> |
201 | <chapter> |
153 | <chapter> |
202 | <title>Load Kernel Modules</title> |
154 | <title>Load Kernel Modules</title> |
203 | <section> |
155 | <section> |
204 | <body> |
156 | <body> |
205 | <p>If the PCI autodetection missed some of your hardware, you |
157 | <p>If the PCI autodetection missed some of your hardware, you |
206 | will have to load the appropriate modules manually. |
158 | will have to load the appropriate kernel modules manually. |
207 | To view a list of all available network card modules, type <c>ls |
159 | To view a list of all available network card modules, type <c>ls |
208 | /lib/modules/*/kernel/drivers/net/*</c>. To load a particular module, |
160 | /lib/modules/*/kernel/drivers/net/*</c>. To load a particular module, |
209 | type: |
161 | type: |
210 | </p> |
162 | </p> |
211 | <pre caption="PCI Modules Configuration"> |
163 | <pre caption="PCI Modules Configuration"> |
212 | # <c>modprobe pcnet32</c> |
164 | # <c>modprobe pcnet32</c> |
213 | <comment>(replace pcnet32 with your NIC module)</comment> |
165 | <comment>(replace pcnet32 with your NIC module)</comment> |
214 | </pre> |
166 | </pre> |
215 | <p>Likewise, if you want to be able to access any SCSI hardware that wasn't detected |
167 | <p>Likewise, if you want to be able to access any SCSI hardware that wasn't detected |
216 | during the initial boot autodetection process, you'll need to load the appropriate |
168 | during the initial boot autodetection process, you will need to load the appropriate |
217 | modules from /lib/modules, again using <c>modprobe</c>: |
169 | modules from /lib/modules, again using <c>modprobe</c>: |
218 | </p> |
170 | </p> |
219 | <pre caption="Loading SCSI Modules"> |
171 | <pre caption="Loading SCSI Modules"> |
220 | # <c>modprobe aic7xxx</c> |
172 | # <c>modprobe aic7xxx</c> |
221 | <comment>(replace aic7xxx with your SCSI adapter module)</comment> |
173 | <comment>(replace aic7xxx with your SCSI adapter module)</comment> |
222 | # <c>modprobe sd_mod</c> |
174 | # <c>modprobe sd_mod</c> |
223 | <comment>(sd_mod is the module for SCSI disk support)</comment> |
175 | <comment>(sd_mod is the module for SCSI disk support)</comment> |
224 | </pre> |
176 | </pre> |
225 | <note> |
177 | <note> |
226 | Support for a SCSI CD-ROMs and disks are built-in in the kernel. |
178 | Support for a SCSI CD-ROMs and disks are built-in in the kernel. |
227 | </note> |
179 | </note> |
228 | <p>If you are using hardware RAID, you'll need to load the |
180 | <p>If you are using hardware RAID, you will need to load the |
229 | ATA-RAID modules for your RAID controller. |
181 | ATA-RAID modules for your RAID controller. |
230 | </p> |
182 | </p> |
231 | <pre caption="Loading RAID Modules"> |
183 | <pre caption="Loading RAID Modules"> |
232 | # <c>modprobe ataraid</c> |
184 | # <c>modprobe ataraid</c> |
233 | # <c>modprobe pdcraid</c> |
185 | # <c>modprobe pdcraid</c> |
234 | <comment>(Promise Raid Controller)</comment> |
186 | <comment>(Promise Raid Controller)</comment> |
235 | # <c>modprobe hptraid</c> |
187 | # <c>modprobe hptraid</c> |
236 | <comment>(Highpoint Raid Controller)</comment> |
188 | <comment>(Highpoint Raid Controller)</comment> |
237 | </pre> |
189 | </pre> |
238 | <p>The Gentoo LiveCD should have enabled DMA on your disks, but if it did not, |
190 | <p>The Gentoo LiveCD should have enabled DMA on your disks, but if it did not, |
239 | <c>hdparm</c> can be used to set DMA on your drives. </p> |
191 | <c>hdparm</c> can be used to set DMA on your drives. </p> |
240 | <pre caption="Setting DMA"><comment>Replace hdX with your disk device.</comment> |
192 | <pre caption="Setting DMA"><comment>Replace hdX with your disk device.</comment> |
241 | # hdparm -d 1 /dev/hdX <comment>Enables DMA </comment> |
193 | # hdparm -d 1 /dev/hdX <comment>Enables DMA </comment> |
|
|
194 | # hdparm -d1 -A1 -m16 -u1 -a64 /dev/hdX |
242 | # hdparm -d1 -A1 -m16 -u1 -a64 /dev/hdX <comment>Enables DMA and other safe performance-enhancing options</comment> |
195 | <comment>(Enables DMA and other safe performance-enhancing options)</comment> |
|
|
196 | # hdparm -X66 /dev/hdX |
243 | # hdparm -X66 /dev/hdX <comment>Force-enables Ultra-DMA -- dangerous -- may cause some drives to mess up</comment></pre> |
197 | <comment>(Force-enables Ultra-DMA -- dangerous -- may cause some drives to mess up)</comment> |
|
|
198 | </pre> |
244 | </body> |
199 | </body> |
245 | </section> |
200 | </section> |
246 | </chapter> |
201 | </chapter> |
247 | <!-- THIS SECTION SHOULD BE DEPRECATED WITH HOTPLUG ENABLED IN 1.4_rc3 (drobbins) |
202 | <!-- THIS SECTION SHOULD BE DEPRECATED WITH HOTPLUG ENABLED IN 1.4_rc3 (drobbins) |
248 | <chapter> |
203 | <chapter> |
249 | <title>Loading PCMCIA Kernel Modules</title> |
204 | <title>Loading PCMCIA Kernel Modules</title> |
250 | <section> |
205 | <section> |
251 | <body> |
206 | <body> |
252 | <p>If you have a PCMCIA network card, you will need to perform a few extra steps. |
207 | <p>If you have a PCMCIA network card, you will need to perform a few extra steps. |
253 | </p> |
208 | </p> |
254 | <warn>To avoid problems with <c>cardmgr</c>, you <e>must</e> run it <e>before</e> you enter the chroot |
209 | <warn>To avoid problems with <c>cardmgr</c>, you <e>must</e> run it <e>before</e> you enter the chroot |
255 | portion of the install. </warn> |
210 | portion of the install. </warn> |
256 | <pre caption="Loading PCMCIA Modules"> |
211 | <pre caption="Loading PCMCIA Modules"> |
257 | # <i>modprobe pcmcia_core</i> |
212 | # <i>modprobe pcmcia_core</i> |
258 | # <i>modprobe i82365</i> |
213 | # <i>modprobe i82365</i> |
259 | # <i>modprobe ds</i> |
214 | # <i>modprobe ds</i> |
260 | # <i>cardmgr -f</i> |
215 | # <i>cardmgr -f</i> |
261 | </pre> |
216 | </pre> |
262 | <p>As <c>cardmgr</c> detects which hardware is present, your speaker should emit a |
217 | <p>As <c>cardmgr</c> detects which hardware is present, your speaker should emit a |
263 | few reassuring beeps, and your PCMCIA network card should hum to life. You can |
218 | few reassuring beeps, and your PCMCIA network card should be active. You can |
264 | of course insert the PCMCIA card after loading <c>cardmgr</c> too, if that's |
219 | of course insert the PCMCIA card after loading <c>cardmgr</c> too, if that is |
265 | preferable. (Technically, you need not run |
220 | preferable. (Technically, you need not run |
266 | <c>cardmgr</c> if you know exactly which module your PCMCIA card requires. |
221 | <c>cardmgr</c> if you know exactly which module your PCMCIA card requires. |
267 | But if you don't, loading all PCMCIA modules and see which sticks won't work, |
222 | But if you don't, loading all PCMCIA modules and see which sticks won't work, |
268 | as all PCMCIA modules load obligingly and hang around for a PCMCIA card to |
223 | as all PCMCIA modules load obligingly and hang around for a PCMCIA card to |
269 | drop by. <c>cardmgr</c> will also unload the module(s) for any card when you |
224 | drop by. <c>cardmgr</c> will also unload the module(s) for any card when you |
270 | remove it). </p> |
225 | remove it). </p> |
271 | </body> |
226 | </body> |
272 | </section> |
227 | </section> |
273 | </chapter> |
228 | </chapter> |
274 | --> |
229 | --> |
275 | <chapter> |
230 | <chapter> |
276 | <title>Configuring Networking</title> |
231 | <title>Configuring Networking</title> |
277 | <section> |
232 | <section> |
278 | <title>Maybe it just works?</title> |
233 | <title>Maybe it just works?</title> |
279 | <body> |
234 | <body> |
280 | <p>If you're using a 1.4_rc3 or later LiveCD, it's possible that your networking has already been |
235 | <p>If you're using a 1.4_rc3 or later LiveCD, it is possible that your networking has already been |
281 | configured automatically for you. If so, you should be able to take advantage of the many included |
236 | configured automatically for you. If so, you should be able to take advantage of the many included |
282 | network-aware commands on the LiveCD such as <c>ssh</c>, <c>scp</c>, <c>ping</c>, <c>irssi</c>, <c>wget</c> and <c>lynx</c>, |
237 | network-aware commands on the LiveCD such as <c>ssh</c>, <c>scp</c>, <c>ping</c>, <c>irssi</c>, <c>wget</c> and <c>lynx</c>, |
283 | among others.</p> |
238 | among others.</p> |
284 | |
239 | |
285 | <p>If networking has been configured for you, the <c>/sbin/ifconfig</c> command should |
240 | <p>If networking has been configured for you, the <c>/sbin/ifconfig</c> command should |
286 | list some internet interfaces besides <c>lo</c>, such as <c>eth0</c>: |
241 | list some internet interfaces besides <c>lo</c>, such as <c>eth0</c>: |
287 | </p> |
242 | </p> |
288 | <pre caption="/sbin/ifconfig for a working network card"> |
243 | <pre caption="/sbin/ifconfig for a working network card"> |
289 | eth0 Link encap:Ethernet HWaddr 00:50:BA:8F:61:7A |
244 | eth0 Link encap:Ethernet HWaddr 00:50:BA:8F:61:7A |
290 | inet addr:192.168.0.2 Bcast:192.168.0.255 Mask:255.255.255.0 |
245 | inet addr:192.168.0.2 Bcast:192.168.0.255 Mask:255.255.255.0 |
291 | inet6 addr: fe80::50:ba8f:617a/10 Scope:Link |
246 | inet6 addr: fe80::50:ba8f:617a/10 Scope:Link |
292 | UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 |
247 | UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 |
293 | RX packets:1498792 errors:0 dropped:0 overruns:0 frame:0 |
248 | RX packets:1498792 errors:0 dropped:0 overruns:0 frame:0 |
294 | TX packets:1284980 errors:0 dropped:0 overruns:0 carrier:0 |
249 | TX packets:1284980 errors:0 dropped:0 overruns:0 carrier:0 |
295 | collisions:1984 txqueuelen:100 |
250 | collisions:1984 txqueuelen:100 |
… | |
… | |
351 | <section> |
306 | <section> |
352 | <title>Manual Static Configuration</title> |
307 | <title>Manual Static Configuration</title> |
353 | <body> |
308 | <body> |
354 | <p>We need to setup just enough networking so that we can download |
309 | <p>We need to setup just enough networking so that we can download |
355 | sources for the system build, as well as the required localhost interface. |
310 | sources for the system build, as well as the required localhost interface. |
356 | Type in the following commands, replacing |
311 | Type in the following commands, replacing |
357 | $IFACE with your network interface (typically <c>eth0</c>), $IPNUM |
312 | $IFACE with your network interface (typically <c>eth0</c>), $IPNUM |
358 | with your IP address, $BCAST with your broadcast address, and $NMASK |
313 | with your IP address, $BCAST with your broadcast address, and $NMASK |
359 | with your network mask. For the <c>route</c> command, replace |
314 | with your network mask. For the <c>route</c> command, replace |
360 | $GTWAY with your default gateway. |
315 | $GTWAY with your default gateway. |
361 | </p> |
316 | </p> |
362 | <pre caption="Static IP Network Configuration"> |
317 | <pre caption="Static IP Network Configuration"> |
363 | # <c>ifconfig $IFACE $IPNUM broadcast $BCAST netmask $NMASK</c> |
318 | # <c>ifconfig $IFACE $IPNUM broadcast $BCAST netmask $NMASK</c> |
364 | # <c>/sbin/route add -net default gw $GTWAY netmask 0.0.0.0 metric 1</c> |
319 | # <c>/sbin/route add -net default gw $GTWAY netmask 0.0.0.0 metric 1</c> |
365 | </pre> |
320 | </pre> |
366 | <p>Now it's time to create the <path>/etc/resolv.conf</path> |
321 | <p>Now it is time to create the <path>/etc/resolv.conf</path> |
367 | file so that name resolution (finding Web/FTP sites by name, rather than just by IP address) will work.</p> |
322 | file so that name resolution (finding Web/FTP sites by name, rather than just by IP address) will work.</p> |
368 | <p>Here's a template to follow for creating your /etc/resolv.conf file: </p> |
323 | <p>Here is a template to follow for creating your /etc/resolv.conf file: </p> |
369 | <pre caption="/etc/resolv.conf template"> |
324 | <pre caption="/etc/resolv.conf template"> |
370 | domain mydomain.com |
325 | domain mydomain.com |
371 | nameserver 10.0.0.1 |
326 | nameserver 10.0.0.1 |
372 | nameserver 10.0.0.2 |
327 | nameserver 10.0.0.2 |
373 | </pre> |
328 | </pre> |
374 | <p>Replace <c>10.0.0.1</c> and <c>10.0.0.2</c> with the IP addresses of your |
329 | <p>Replace <c>10.0.0.1</c> and <c>10.0.0.2</c> with the IP addresses of your |
375 | primary and secondary DNS servers respectively.</p> |
330 | primary and secondary DNS servers respectively.</p> |
376 | </body> |
331 | </body> |
377 | </section> |
332 | </section> |
378 | <section> |
333 | <section> |
379 | <title>Proxy Configuration</title> |
334 | <title>Proxy Configuration</title> |
380 | <body> |
335 | <body> |
381 | <p>If you are behind a proxy, it is necessary to configure your proxy before |
336 | <p>If you are behind a proxy, it is necessary to configure your proxy before |
382 | you continue. We will export some variables to set up the proxy accordingly. |
337 | you continue. We will export some variables to set up the proxy accordingly. |
383 | </p> |
338 | </p> |
… | |
… | |
388 | </pre> |
343 | </pre> |
389 | </body> |
344 | </body> |
390 | </section> |
345 | </section> |
391 | <section> |
346 | <section> |
392 | <title>Networking is go!</title> |
347 | <title>Networking is go!</title> |
393 | <body> |
348 | <body> |
394 | <p>Networking should now be configured and useable. You should be able to use the included |
349 | <p>Networking should now be configured and useable. You should be able to use the included |
395 | <c>ssh</c>, <c>scp</c>, <c>lynx</c>, <c>irssi</c> and <c>wget</c> commands to connect to other machines on your LAN or the Internet.</p> |
350 | <c>ssh</c>, <c>scp</c>, <c>lynx</c>, <c>irssi</c> and <c>wget</c> commands to connect to other machines on your LAN or the Internet.</p> |
396 | </body> |
351 | </body> |
397 | </section> |
352 | </section> |
398 | </chapter> |
353 | </chapter> |
399 | <chapter> |
354 | <chapter> |
400 | <title>Partition Configuration</title> |
355 | <title>Partition Configuration</title> |
401 | <section> |
356 | <section> |
402 | <body> |
357 | <body> |
403 | <p>Now that the kernel can see the network card and disk controllers, it's time |
358 | <p>Now that the kernel can see the network card and disk controllers, it is time |
404 | to set up disk partitions for Gentoo Linux. |
359 | to set up disk partitions for Gentoo Linux. |
405 | </p> |
360 | </p> |
406 | |
361 | |
407 | <p>Here's a quick overview of the standard Gentoo Linux partition layout. |
362 | <p>Here is a quick overview of the standard Gentoo Linux partition layout. |
408 | We're going to create at least three partitions: a swap partition, a root |
363 | We're going to create at least three partitions: a swap partition, a root |
409 | partition (to hold the bulk of Gentoo Linux), and a special boot partition. |
364 | partition (to hold the bulk of Gentoo Linux), and a special boot partition. |
410 | The boot partition is designed to hold the GRUB or LILO boot loader information as well as |
365 | The boot partition is designed to hold the boot loader information as well as |
411 | your Linux kernel(s). The boot partition gives us a safe place to store |
366 | your Linux kernel(s). The boot partition gives us a safe place to store |
412 | everything related to booting Linux. During normal day-to-day Gentoo Linux use, |
367 | everything related to booting Linux. During normal day-to-day Gentoo Linux use, |
413 | your boot partition should remain <e>unmounted</e>. This prevents your kernel |
368 | your boot partition should remain <e>unmounted</e>. A working kernel will enable you recover from most forms of |
414 | from being made unavailable to GRUB (due to filesystem corruption) in the event |
369 | filesystem corruption, having your kernel in a non-mounted partition |
415 | of a system crash, preventing the chicken-and-egg problem where GRUB can't read |
370 | will prevent filesystem corruption from affecting it. |
416 | your kernel (since your filesystem isn't consistent) but you can't bring your |
|
|
417 | filesystem back to a consistent state (since you can't boot!) |
|
|
418 | </p> |
371 | </p> |
419 | <p>Now, on to filesystem types. Right now, you have five filesystem options: |
372 | <p>Now, on to filesystem types. Right now, you have five filesystem options: |
420 | XFS, ext2, ext3 (journaling), jfs, and ReiserFS. ext2 is the tried and true Linux |
373 | XFS, ext2, ext3 (journaling), jfs, and ReiserFS. ext2 is the tried and true Linux |
421 | filesystem but doesn't have metadata journaling. ext3 is the new version of |
374 | filesystem but doesn't have metadata journaling. ext3 is the new version of |
422 | ext2 with both metadata journaling and ordered data writes, effectively |
375 | ext2 with both metadata journaling and ordered data writes, effectively |
423 | providing data journaling as well. ReiserFS is a B*-tree based filesystem |
376 | providing data journaling as well. ReiserFS is a B*-tree based filesystem |
424 | that has very good small file performance, and greatly outperforms both ext2 and |
377 | that has very good small file performance, and greatly outperforms both ext2 and |
425 | ext3 when dealing with small files (files less than 4k), often by a factor of |
378 | ext3 when dealing with small files (files less than 4k), often by a factor of |
426 | 10x-15x. ReiserFS also scales extremely well and has metadata journaling. |
379 | 10x-15x. ReiserFS also scales extremely well and has metadata journaling. |
427 | As of kernel 2.4.18+, ReiserFS is finally rock-solid and highly recommended. |
380 | As of kernel 2.4.18+, ReiserFS is finally rock-solid and highly recommended. |
428 | XFS is a filesystem with metadata journaling that |
381 | XFS is a filesystem with metadata journaling that |
429 | is fully supported under Gentoo Linux's <path>xfs-sources</path> kernel, but |
382 | is fully supported under Gentoo Linux's <path>xfs-sources</path> kernel, but |
430 | is generally not recommended due to its tendency to lose recently-modified |
383 | is generally not recommended due to its tendency to lose recently-modified |
431 | data if your system locks up or unexpectedly reboots (due to a power failure, for instance.) |
384 | data if your system locks up or unexpectedly reboots (as a result of power failure, for instance) |
432 | Finially, jfs is IBM's own high performance journaling filesystem. Since it is obscure, we cannot comment either positvely nor negatively on its stability.</p> |
385 | Finally, jfs is IBM's own high performance journaling filesystem. Since it is obscure, we cannot comment either positively nor negatively on its stability.</p> |
433 | <p>If you're looking for the most standard filesystem, use ext2. If you're looking |
386 | <p>If you're looking for the most standard filesystem, use ext2. If you're looking |
434 | for the most rugged journalled filesystem, use ext3. If you're looking for a |
387 | for the most rugged journaling filesystem, use ext3. If you're looking for a |
435 | high-performance filesystem with journaling support, use ReiserFS; both ext3 and ReiserFS are |
388 | high-performance filesystem with journaling support, use ReiserFS; both ext3 and ReiserFS are |
436 | mature and refined. |
389 | mature and refined. |
437 | Here are our basic recommended filesystem |
390 | Here are our basic recommended filesystem |
438 | sizes and types: |
391 | sizes and types: |
439 | </p> |
392 | </p> |
440 | <table> |
393 | <table> |
441 | <tr> |
394 | <tr> |
442 | <th>Partition</th> |
395 | <th>Partition</th> |
443 | <th>Size</th> |
396 | <th>Size</th> |
444 | <th>Type</th> |
397 | <th>Type</th> |
445 | <th>example device</th> |
398 | <th>example device</th> |
446 | </tr> |
399 | </tr> |
447 | <tr> |
400 | <tr> |
448 | <ti>boot partition, containing kernel(s) and boot information</ti> |
401 | <ti>boot partition, containing kernel(s) and boot information</ti> |
449 | <ti>100 Megabytes</ti> |
402 | <ti>100 Megabytes</ti> |
450 | <ti>ext2/3 highly recommended (easiest); if ReiserFS then mount with <c>-o notail</c></ti> |
403 | <ti>ext2/3 highly recommended (easiest); if ReiserFS then mount with <c>-o notail</c></ti> |
451 | <ti>/dev/hda1</ti> |
404 | <ti>/dev/hda1</ti> |
452 | </tr> |
405 | </tr> |
453 | <tr> |
406 | <tr> |
454 | <ti>swap partition (no longer a 128 Megabyte limit, now 2GB)</ti> |
407 | <ti>swap partition (no longer a 128 Megabyte limit, now 2GB)</ti> |
455 | <ti>Generally, configure a swap area that's between one to two times the size of the physical RAM |
408 | <ti>Generally, configure a swap area that is between one to two times the size of the physical RAM |
456 | in your system.</ti> |
409 | in your system.</ti> |
457 | <ti>Linux swap</ti> |
410 | <ti>Linux swap</ti> |
458 | <ti>/dev/hda2</ti> |
411 | <ti>/dev/hda2</ti> |
459 | </tr> |
412 | </tr> |
460 | <tr> |
413 | <tr> |
461 | <ti>root partition, containing main filesystem (/usr, /home, etc)</ti> |
414 | <ti>root partition, containing main filesystem (/usr, /home, etc)</ti> |
462 | <ti>>=1.5 Gigabytes</ti> |
415 | <ti>>=1.5 Gigabytes</ti> |
463 | <ti>ReiserFS, ext3 recommended; ext2 ok</ti> |
416 | <ti>ReiserFS, ext3 recommended; ext2 ok</ti> |
464 | <ti>/dev/hda3</ti> |
417 | <ti>/dev/hda3</ti> |
465 | </tr> |
418 | </tr> |
466 | </table> |
419 | </table> |
467 | |
420 | |
468 | |
421 | |
469 | <p>At this point, create your partitions using <c>fdisk</c>. Note that your partitions |
422 | <p>At this point, create your partitions using <c>fdisk</c>. Note that your partitions |
470 | should be of type 82 if swap and 83 for regular filesystems (whether ReiserFS, ext2/3 or other). </p> |
423 | should be of type 82 for swap and 83 for regular filesystems (whether ReiserFS, ext2/3 or other). </p> |
471 | <note><c>cfdisk</c> is included on the install CD, and it is <i>considerably</i> easier to use than |
424 | <note><c>cfdisk</c> is included on the install CD, and it is <i>considerably</i> easier to use than |
472 | <c>fdisk</c>. Just type <c>cfdisk</c> to run it; by default, cfdisk will work with <b>/dev/hda</b>. If /dev/hda is not the hard disk you want to partition, give the right value to cfdisk as a parameter. For example: <c>cfdisk /dev/hde</c></note> |
425 | <c>fdisk</c>. Just type <c>cfdisk</c> to run it; by default, cfdisk will work with <b>/dev/hda</b>. If /dev/hda is not the hard disk you want to partition, give the right value to cfdisk as a parameter. For example: <c>cfdisk /dev/hde</c></note> |
473 | <note>If <c>fdisk</c> or <c>cfdisk</c> instruct you to do so, please reboot to allow your system to detect the |
426 | <note>If <c>fdisk</c> or <c>cfdisk</c> instruct you to do so, please reboot to allow your system to detect the |
474 | new partition configuration.</note> |
427 | new partition configuration.</note> |
475 | <note>If you are using RAID your partitions will be a little different. You |
428 | <note>If you are using RAID your partitions will be a little different. You |
476 | will have the partitions like this: <path>/dev/ataraid/discX/partY</path> X is |
429 | will have the partitions like this: <path>/dev/ataraid/discX/partY</path> X are |
477 | the arrays you have made, so if you only have made 1 array, then it will be |
430 | the arrays you have made, so if you only have made 1 array, then it will be |
478 | disc0.Y is the partition number as in <path>/dev/hdaY</path> </note> |
431 | disc0.Y is the partition number as in <path>/dev/hdaY</path> </note> |
479 | <p>Once you've created your partitions, it's time to initialize |
432 | <p>Once you've created your partitions, it is time to initialize |
480 | the filesystems that will be used to house our data.</p> |
433 | the filesystems that will be used to house your data.</p> |
481 | |
434 | |
482 | <p>But before creating filesystems, you may want to initialize the |
435 | <p>But before creating filesystems, you may want to initialize the |
483 | beginning of your HD using <c>dd</c> if you are using a pre-existing partition that has been used before. |
436 | beginning of your hard disk using <c>dd</c> if you are using a pre-existing partition that has been used before. |
484 | This is particularly helpful when you're going to create a new XFS filesystem on a partition that previously contained |
437 | This is particularly helpful when you're going to create a new XFS filesystem on a partition that previously contained |
485 | a ReiserFS filesystem. Doing this will ensure that your new filesystem |
438 | a ReiserFS filesystem. Doing this will ensure that your new filesystem |
486 | will not be mis-indentified by Linux's filesystem auto-detection code. |
439 | will not be mis-indentified by Linux's filesystem auto-detection code. |
487 | This can be done as follows: |
440 | This can be done as follows: |
488 | </p> |
441 | </p> |
489 | <pre caption="Initializing first 1024 Sectors of HD"> |
442 | <pre caption="Initializing first 1024 Sectors of HD"> |
490 | # <c>dd if=/dev/zero of=/dev/hdxy bs=1K count=1</c> |
443 | # <c>dd if=/dev/zero of=/dev/hdxy bs=1K count=1</c> |
491 | <comment>Replace /dev/hdxy with the device you wish to "clean."</comment> |
444 | <comment>Replace /dev/hdxy with the device you wish to "clean."</comment> |
492 | </pre> |
445 | </pre> |
493 | <warn>The command above will destroy all data from <path>/dev/hdxy</path>. |
446 | <warn>The command above will destroy all data from <path>/dev/hdxy</path>. |
494 | Be careful and check twice which partition you specify for zeroing. |
447 | Be careful and check twice which partition you specify for zeroing. |
495 | If you make a mistake it might result in a loss of data. |
448 | If you make a mistake it might result in a loss of data. |
496 | </warn> |
449 | </warn> |
497 | <p>Now, initialize your swap partition as follows:</p> |
450 | <p>Now, initialize your swap partition as follows:</p> |
498 | <pre caption="Initializing Swap"> |
451 | <pre caption="Initializing Swap"> |
… | |
… | |
501 | <p>You can use the <c>mke2fs</c> command to create ext2 filesystems.</p> |
454 | <p>You can use the <c>mke2fs</c> command to create ext2 filesystems.</p> |
502 | <pre caption="Creating an ext2 Filesystem"> |
455 | <pre caption="Creating an ext2 Filesystem"> |
503 | # <i>mke2fs /dev/hda1</i> |
456 | # <i>mke2fs /dev/hda1</i> |
504 | </pre> |
457 | </pre> |
505 | <p>To create an XFS filesystem, use the <c>mkfs.xfs</c> command.</p> |
458 | <p>To create an XFS filesystem, use the <c>mkfs.xfs</c> command.</p> |
506 | <pre caption="Creating a XFS Filesystem"> |
459 | <pre caption="Creating a XFS Filesystem"> |
507 | # <c>mkfs.xfs /dev/hda3</c> |
460 | # <c>mkfs.xfs /dev/hda3</c> |
508 | </pre> |
461 | </pre> |
509 | <note> |
462 | <note> |
510 | You may want to add a couple of additional flags to the <c>mkfs.xfs</c> command: <c>-d agcount=3 -l size=32m</c>. |
463 | You may want to add a couple of additional flags to the <c>mkfs.xfs</c> command: <c>-d agcount=3 -l size=32m</c>. |
511 | The <c>-d agcount=3</c> command will lower |
464 | The <c>-d agcount=3</c> command will lower |
512 | the number of allocation groups. XFS will insist on using at least 1 allocation group per 4 GB of your partition, |
465 | the number of allocation groups. XFS will insist on using at least 1 allocation group per 4 GB of your partition, |
513 | so, for example, if you hava a 20 GB partition you will need a minimum agcount of 5. |
466 | so, for example, if you hava a 20 GB partition you will need a minimum agcount of 5. |
514 | The <c>-l size=32m</c> command increases the journal size to 32 Mb, increasing performance. |
467 | The <c>-l size=32m</c> command increases the journal size to 32 Mb, increasing performance. |
515 | </note> |
468 | </note> |
516 | <p>If you'd like to use ext3, you can create ext3 filesystems using <c>mke2fs -j</c>.</p> |
469 | <p>If you would like to use ext3, you can create ext3 filesystems using <c>mke2fs -j</c>.</p> |
517 | <pre caption="Creating an ext3 Filesystem"> |
470 | <pre caption="Creating an ext3 Filesystem"> |
518 | # <c>mke2fs -j /dev/hda3</c> |
471 | # <c>mke2fs -j /dev/hda3</c> |
519 | </pre> |
472 | </pre> |
520 | <note>You can find out more about using ext3 under Linux 2.4 at |
473 | <note>You can find out more about using ext3 under Linux 2.4 at |
521 | <uri>http://www.zip.com.au/~akpm/linux/ext3/ext3-usage.html</uri>. |
474 | <uri>http://www.zip.com.au/~akpm/linux/ext3/ext3-usage.html</uri>. |
522 | </note> |
475 | </note> |
523 | <p>To create ReiserFS filesystems, use the <c>mkreiserfs</c> command.</p> |
476 | <p>To create ReiserFS filesystems, use the <c>mkreiserfs</c> command.</p> |
524 | <pre caption="Creating a ReiserFS Filesystem"> |
477 | <pre caption="Creating a ReiserFS Filesystem"> |
525 | # <c>mkreiserfs /dev/hda3</c> |
478 | # <c>mkreiserfs /dev/hda3</c> |
526 | </pre> |
479 | </pre> |
527 | |
480 | |
528 | <p>To create JFS filesystems, use the <c>mkfs.jfs</c> comamnd.</p> |
481 | <p>To create JFS filesystems, use the <c>mkfs.jfs</c> comamnd.</p> |
529 | <pre caption="Creating a JFS Filesystem"> |
482 | <pre caption="Creating a JFS Filesystem"> |
530 | # <c>mkfs.jfs /dev/hda3</c> |
483 | # <c>mkfs.jfs /dev/hda3</c> |
531 | </pre> |
484 | </pre> |
532 | |
485 | |
533 | </body> |
486 | </body> |
534 | </section> |
487 | </section> |
535 | </chapter> |
488 | </chapter> |
536 | <chapter> |
489 | <chapter> |
537 | <title>Mount Partitions</title> |
490 | <title>Mount Partitions</title> |
538 | <section> |
491 | <section> |
539 | <body> |
492 | <body> |
540 | <p>Now, we'll activate our new swap, since we may need the additional virtual memory that it |
493 | <p>Now, we will activate our new swap, since we may need the additional virtual memory that it |
541 | provides later: |
494 | provides later: |
542 | </p> |
495 | </p> |
543 | <pre caption="Activating Swap"> |
496 | <pre caption="Activating Swap"> |
544 | # <c>swapon /dev/hda2</c> |
497 | # <c>swapon /dev/hda2</c> |
545 | </pre> |
498 | </pre> |
546 | <p>Next, we'll create the <path>/mnt/gentoo</path> and <path>/mnt/gentoo/boot</path> mountpoints, |
499 | <p>Next, we will create the <path>/mnt/gentoo</path> and <path>/mnt/gentoo/boot</path> mount points, |
547 | and we'll mount our filesystems to these mountpoints. </p> |
500 | and we will mount our filesystems to these mountpoints. </p> |
548 | <pre caption="Creating Mount Points"> |
501 | <pre caption="Creating Mount Points"> |
549 | # <c>mkdir /mnt/gentoo</c> |
502 | # <c>mkdir /mnt/gentoo</c> |
550 | # <c>mount /dev/hda3 /mnt/gentoo</c> |
503 | # <c>mount /dev/hda3 /mnt/gentoo</c> |
551 | # <c>mkdir /mnt/gentoo/boot</c> |
504 | # <c>mkdir /mnt/gentoo/boot</c> |
552 | # <c>mount /dev/hda1 /mnt/gentoo/boot</c> |
505 | # <c>mount /dev/hda1 /mnt/gentoo/boot</c> |
553 | </pre> |
506 | </pre> |
554 | <p> |
507 | <p> |
555 | If you are setting up Gentoo |
508 | If you are setting up Gentoo |
556 | Linux with a separate <path>/usr</path> or <path>/var</path>, these would get mounted to |
509 | Linux with a separate <path>/usr</path> or <path>/var</path>, these would get mounted to |
557 | <path>/mnt/gentoo/usr</path> and <path>/mnt/gentoo/var</path>, respectively. |
510 | <path>/mnt/gentoo/usr</path> and <path>/mnt/gentoo/var</path>, respectively. |
558 | </p> |
511 | </p> |
559 | <impo>If your <e>boot</e> partition (the one holding the kernel) is ReiserFS, be sure to mount it |
512 | <impo>If your <e>boot</e> partition (the one holding the kernel) is ReiserFS, be sure to mount it |
560 | with the <c>-o notail</c> option so GRUB gets properly installed. Make sure |
513 | with the <c>-o notail</c> option so GRUB gets properly installed. Make sure |
561 | that <c>notail</c> ends up in your new <path>/etc/fstab</path> boot partition entry, too. |
514 | that <c>notail</c> ends up in your new <path>/etc/fstab</path> boot partition entry, too. |
562 | We'll get to that in a bit. |
515 | We will get to that in a bit. |
563 | </impo> |
516 | </impo> |
564 | <impo>If you are having problems mounting your boot partition with ext2, try using |
517 | <impo>If you are having problems mounting your boot partition with ext2, try using |
565 | <c>mount /dev/hXX /mnt/gentoo/boot -t ext2 </c> </impo> |
518 | <c>mount /dev/hXX /mnt/gentoo/boot -t ext2 </c> </impo> |
566 | </body> |
519 | </body> |
567 | </section> |
520 | </section> |
568 | </chapter> |
521 | </chapter> |
569 | <chapter> |
522 | <chapter> |
570 | <title>Obtaining the Desired 'stage-x' Tarball</title> |
523 | <title>Obtaining the Desired 'stage-x' Tarball</title> |
571 | <section> |
524 | <section> |
572 | <body> |
525 | <body> |
573 | <p>If you are using a GRP CD to install, you already have all of the stage |
526 | <p>If you are using the 3stages LiveCD to install, you already have all of the stage |
574 | tarballs available on the CD. |
527 | tarballs available on the CD. |
575 | If this is the case, copy the tarball of your choice to <mnt>/mnt/gentoo</mnt> |
528 | If this is the case, copy the tarball of your choice to <mnt>/mnt/gentoo</mnt> |
576 | </p> |
529 | </p> |
577 | |
530 | |
578 | <p>Alternatively, if you do not have a GRP CD, the stage1 tarball is still available on |
531 | <p>Alternatively, if you have the basic LiveCD, the stage1 tarball is still available on |
579 | the CD in <path>/mnt/cdrom/gentoo</path>. You will have to download the other stages though, |
532 | the CD in <path>/mnt/cdrom/gentoo</path>. You will have to download the other stages though, |
580 | and the best place to download those to is <path>/mnt/gentoo</path>. |
533 | and the best place to which to download them is <path>/mnt/gentoo</path>. |
581 | </p> |
534 | </p> |
582 | |
535 | |
583 | <pre caption="Downloading Required Stages"> |
536 | <pre caption="Downloading Required Stages"> |
584 | # <c>cd /mnt/gentoo</c> |
537 | # <c>cd /mnt/gentoo</c> |
585 | <comment>Use lynx to get the URL for your tarball:</comment> |
538 | <comment>Use lynx to get the URL for your tarball:</comment> |
586 | # <c>lynx http://www.ibiblio.org/pub/Linux/distributions/gentoo/releases/1.4_rc2/x86/</c> |
539 | # <c>lynx http://www.ibiblio.org/pub/Linux/distributions/gentoo/releases/1.4_rc2/x86/</c> |
587 | <comment>Use <c>Up</c> and <c>Down</c> arrows keys (or the <c>TAB</c> key) to go to the right directory |
540 | <comment>Use <c>Up</c> and <c>Down</c> arrows keys (or the <c>TAB</c> key) to go to the right directory |
588 | Highlight the appropriate stage you want to download |
541 | Highlight the appropriate stage you want to download |
589 | Press <c>d</c> which will initiate the download |
542 | Press <c>d</c> which will initiate the download |
590 | Save the file and quit the browser |
543 | Save the file and quit the browser |
591 | |
544 | |
592 | <b>OR</b> use wget from the command line:</comment> |
545 | <b>OR</b> use wget from the command line:</comment> |
593 | # <c>wget <comment>insert URL to the required stage tarball here.</comment></c> |
546 | # <c>wget <comment>insert URL to the required stage tarball here.</comment></c> |
594 | </pre> |
547 | </pre> |
595 | </body> |
548 | </body> |
596 | </section> |
549 | </section> |
597 | </chapter> |
550 | </chapter> |
598 | <chapter> |
551 | <chapter> |
599 | <title>Unpacking the Stage Tarballs</title> |
552 | <title>Unpacking the Stage Tarballs</title> |
600 | <section> |
553 | <section> |
601 | <body> |
554 | <body> |
602 | <p>Now it's time to extract the compressed stage tarball of your choice to <path>/mnt/gentoo</path>. |
555 | <p>Now it is time to extract the compressed stage tarball of your choice to <path>/mnt/gentoo</path>. |
603 | Then, we'll <c>chroot</c> over to the new Gentoo Linux build installation to "enter" the new |
556 | Then, we will <c>chroot</c> over to the new Gentoo Linux build installation to "enter" the new |
604 | Gentoo Linux system. |
557 | Gentoo Linux system. |
605 | </p> |
558 | </p> |
606 | <impo>Be sure to use the <c>p</c> option with <c>tar</c>. Forgetting to do this will |
559 | <impo>Be sure to use the <c>p</c> option with <c>tar</c>. Forgetting to do this will |
607 | cause certain files to have incorrect permissions.</impo> |
560 | cause certain files to have incorrect permissions.</impo> |
608 | <p>If you are using the "from scratch, build everything" install method, |
561 | <p>If you are using the "from scratch, build everything" install method, |
609 | you will want to use the <path>stage1-ix86-1.4_beta.tbz2</path> image. |
562 | you will want to use the <path>stage1-ix86-1.4_beta.tbz2</path> image. |
610 | If you're using one of our bigger CDs, you'll also have a choice of a stage2 and stage3 image. |
563 | If you're using one of our bigger CDs, you will also have a choice of a stage2 and stage3 image. |
611 | These images allow you to save time at the expense of configurability (we've already chosen |
564 | These images allow you to save time at the expense of configurability (we've already chosen |
612 | compiler optimizations and default USE variables for you.) |
565 | compiler optimizations and default USE variables for you.) |
613 | </p> |
566 | </p> |
614 | <pre caption="Unpacking the Stages"> |
567 | <pre caption="Unpacking the Stages"> |
615 | # <c>cd /mnt/gentoo</c> |
568 | # <c>cd /mnt/gentoo</c> |
616 | # <c>tar -xvjpf /mnt/cdrom/gentoo/stage?-*.tbz2</c> |
569 | # <c>tar -xvjpf /mnt/cdrom/gentoo/stage?-*.tbz2</c> |
617 | # <c>mount -o bind /proc /mnt/gentoo/proc</c> |
570 | # <c>mount -o bind /proc /mnt/gentoo/proc</c> |
618 | |
|
|
619 | <!--# <c>mount -o bind /dev /mnt/gentoo/dev</c> |
|
|
620 | <comment>The /dev bind-mount is required for perl to build properly for some people.</comment> |
|
|
621 | --> |
|
|
622 | # <c>cp /etc/resolv.conf /mnt/gentoo/etc/resolv.conf</c> |
571 | # <c>cp /etc/resolv.conf /mnt/gentoo/etc/resolv.conf</c> |
623 | </pre> |
572 | </pre> |
624 | <p>If you are going to use GRP, now would be a good time to execute the following commands: |
|
|
625 | </p> |
|
|
626 | |
|
|
627 | <pre caption="Getting ready for GRP"> |
|
|
628 | # <c>mkdir /mnt/gentoo/GRP</c> |
|
|
629 | # <c>mount -o bind /mnt/cdrom/gentoo/packages /mnt/gentoo/GRP</c> |
|
|
630 | </pre> |
|
|
631 | |
|
|
632 | <pre caption="Entering the chroot Environment"> |
573 | <pre caption="Entering the chroot Environment"> |
633 | # <c>chroot /mnt/gentoo /bin/bash</c> |
574 | # <c>chroot /mnt/gentoo /bin/bash</c> |
634 | # <c>env-update</c> |
575 | # <c>env-update</c> |
635 | Regenerating /etc/ld.so.cache... |
576 | Regenerating /etc/ld.so.cache... |
636 | # <c>source /etc/profile</c> |
577 | # <c>source /etc/profile</c> |
637 | <comment>The above points your shell to the new paths and updated binaries. </comment> |
578 | <comment>The above points your shell to the new paths and updated binaries. </comment> |
638 | </pre> |
579 | </pre> |
639 | <p>After you execute these commands, you'll be "inside" your new Gentoo Linux environment. |
580 | <p>After you execute these commands, you will be "inside" your new Gentoo Linux environment. |
640 | </p> |
581 | </p> |
641 | </body> |
582 | </body> |
642 | </section> |
583 | </section> |
643 | </chapter> |
|
|
644 | <chapter> |
584 | </chapter> |
|
|
585 | <chapter> |
645 | <title>Getting the Current Portage Tree using Rsync</title> |
586 | <title>Getting the Current Portage Tree using sync</title> |
646 | <section> |
587 | <section> |
647 | <body> |
588 | <body> |
648 | <p>Now, you'll need to run <c>emerge sync</c>. This will make sure that |
589 | <p>Now, you will need to run <c>emerge sync</c>. This will make sure that |
649 | you have the most current copy of the Portage tree. </p> |
590 | you have the most current copy of the Portage tree. </p> |
650 | <pre caption="Updating Using Rsync"> |
591 | <pre caption="Updating Using sync"> |
651 | |
592 | |
652 | # <c>emerge sync</c> |
593 | # <c>emerge sync</c> |
653 | # <c>export CONFIG_PROTECT="-*"</c> |
594 | # <c>export CONFIG_PROTECT="-*"</c> |
654 | # <c>export USE="-* bootstrap build"</c> |
595 | # <c>export USE="-* bootstrap build"</c> |
655 | # <c>emerge portage</c> |
596 | # <c>emerge portage</c> |
656 | # <c>unset USE</c> |
597 | # <c>unset USE</c> |
657 | </pre> |
598 | </pre> |
658 | <p>The Portage tree will be downloaded and stored in <path>/usr/portage</path>; |
599 | <p>The Portage tree will be downloaded and stored in <path>/usr/portage</path>; |
659 | it's about 90Mb in size without tarballs. |
600 | it is about 90Mb in size without tarballs. |
660 | </p> |
601 | </p> |
661 | <note>The <c>export CONFIG_PROTECT="-*"</c> line ensures that any new scripts |
602 | <note>The <c>export CONFIG_PROTECT="-*"</c> line ensures that any new scripts |
662 | installed to <path>/etc</path> will overwrite the old scripts (stored in |
603 | installed to <path>/etc</path> will overwrite the old scripts (stored in |
663 | <path>sys-apps/baselayout</path>), bypassing Portage's new config file |
604 | <path>sys-apps/baselayout</path>), bypassing Portage's new config file |
664 | management support. Type <c>emerge --help config</c> for more details.</note> |
605 | management support. Type <c>emerge --help config</c> for more details.</note> |
665 | |
606 | |
666 | </body> |
607 | </body> |
667 | </section> |
608 | </section> |
668 | </chapter> |
609 | </chapter> |
669 | <chapter> |
610 | <chapter> |
670 | <title>Setting Gentoo optimizations (make.conf)</title> |
611 | <title>Setting Gentoo optimizations (make.conf)</title> |
671 | <section> |
612 | <section> |
672 | <body> |
613 | <body> |
673 | <p>Now that you have a working copy of the Portage tree, |
614 | <p>Now that you have a working copy of the Portage tree, |
674 | it's time to customize the optimization and optional build-time settings to use |
615 | it is time to customize the optimization and optional build-time settings to use |
675 | on your Gentoo Linux system. First |
616 | on your Gentoo Linux system. First |
676 | edit the file <path>/etc/make.conf</path>. In this file, you should set your |
617 | edit the file <path>/etc/make.conf</path>. In this file, you should set your |
677 | <c>USE</c> flags, which specify optional functionality that you would |
618 | <c>USE</c> flags, which specify optional functionality that you would |
678 | like to be built into packages if available; generally, the defaults (an <e>empty</e> |
619 | like to be built into packages if available; generally, the defaults (an <e>empty</e> |
679 | or unset <c>USE</c> variable) are fine. |
620 | or unset <c>USE</c> variable) are fine. |
680 | More information on <c>USE</c> flags can be found |
621 | More information on <c>USE</c> flags can be found |
681 | <uri link="http://www.gentoo.org/doc/en/use-howto.xml">here</uri>. |
622 | <uri link="http://www.gentoo.org/doc/en/use-howto.xml">here</uri>. |
682 | A complete list of current USE flags can be found |
623 | A complete list of current USE flags can be found |
683 | <uri link="http://www.gentoo.org/dyn/use-index.xml">here</uri>. |
624 | <uri link="http://www.gentoo.org/dyn/use-index.xml">here</uri>. |
684 | </p> |
625 | </p> |
685 | <p>You also should set appropriate <c>CHOST</c>, <c>CFLAGS</c> and |
626 | <p>You also should set appropriate <c>CHOST</c>, <c>CFLAGS</c> and |
686 | <c>CXXFLAGS</c> settings for the kind of system that you are creating |
627 | <c>CXXFLAGS</c> settings for the kind of system that you are creating |
687 | (commented examples can be found further down in the file.) These settings |
628 | (commented examples can be found further down in the file.) These settings |
688 | will be used to tell the C and C++ compiler how to optimize the code that |
629 | will be used to tell the C and C++ compiler how to optimize the code that |
689 | is generated on your system. It is common for users with Athlon XP processors |
630 | is generated on your system. It is common for users with Athlon XP processors |
690 | to specify a "-march=athlon-xp" setting in their CFLAGS and CXXFLAGS settings |
631 | to specify a "-march=athlon-xp" setting in their CFLAGS and CXXFLAGS settings |
691 | so that all packages built will be optimized for the instruction set and |
632 | so that all packages built will be optimized for the instruction set and |
692 | performance characteristics of their CPU, for example. The <path>/etc/make.conf</path> |
633 | performance characteristics of their CPU, for example. The <path>/etc/make.conf</path> |
693 | file contains a general guide for the proper settings of CFLAGS and CXXFLAGS.</p> |
634 | file contains a general guide for the proper settings of CFLAGS and CXXFLAGS.</p> |
694 | |
635 | |
695 | <p>If necessary, you can also set proxy information here if you are behind a |
636 | <p>If necessary, you can also set proxy information here if you are behind a |
696 | firewall. |
637 | firewall. |
697 | </p> |
638 | </p> |
698 | <pre caption="Setting make.conf Options"> |
639 | <pre caption="Setting make.conf Options"> |
699 | # <c>nano -w /etc/make.conf</c> <comment>(Adjust these settings)</comment> |
640 | # <c>nano -w /etc/make.conf</c> <comment>(Adjust these settings)</comment> |
700 | </pre> |
641 | </pre> |
701 | <note> |
642 | <note> |
702 | People who need to substantially tweak the build process should take a look at |
643 | People who need to substantially customize the build process should take a look at |
703 | the <path>/etc/make.globals</path> file. This file comprises gentoo defaults and |
644 | the <path>/etc/make.globals</path> file. This file comprises gentoo defaults and |
704 | should never be touched. If the defaults do not suffice, then new values should |
645 | should never be touched. If the defaults do not suffice, then new values should |
705 | be put in <path>/etc/make.conf</path>, as entries in <path>make.conf</path> |
646 | be put in <path>/etc/make.conf</path>, as entries in <path>make.conf</path> |
706 | <comment>override</comment> the entries in <path>make.globals</path>. If you're |
647 | <comment>override</comment> the entries in <path>make.globals</path>. If you're |
707 | interested in tweaking USE settings, look in <path>/etc/make.profile/make.defaults</path>. |
648 | interested in customizing USE settings, look in <path>/etc/make.profile/make.defaults</path>. |
708 | If you want to turn off any USE settings found here, add an appropriate <c>USE="-foo"</c> |
649 | If you want to turn off any USE settings found here, add an appropriate <c>USE="-foo"</c> |
709 | in /etc/make.conf (to turn off the <c>foo</c> USE setting.) |
650 | in /etc/make.conf (to turn off the <c>foo</c> USE setting.) |
710 | </note> |
651 | </note> |
711 | </body> |
652 | </body> |
712 | </section> |
653 | </section> |
713 | </chapter> |
654 | </chapter> |
714 | <chapter> |
655 | <chapter> |
|
|
656 | <title>Setting your time zone and date</title> |
|
|
657 | <section> |
|
|
658 | <body> |
|
|
659 | <p>You need to set your time zone and date before you start installing your system.</p> |
|
|
660 | <p>Look for your time zone (or GMT if you are using Greenwich Mean Time) in |
|
|
661 | <path>/usr/share/zoneinfo</path>. Then, make a symbolic link by typing: |
|
|
662 | </p> |
|
|
663 | <pre caption="Creating a symbolic link for time zome"> |
|
|
664 | # <c>ln -sf /usr/share/zoneinfo/path/to/timezonefile /etc/localtime</c> |
|
|
665 | # <c>date</c> |
|
|
666 | Thu Feb 27 09:04:42 CST 2003 |
|
|
667 | <comment>(If your date is wrong set your date with this next command)</comment> |
|
|
668 | # <c>date 022709042003</c> |
|
|
669 | <comment>(date MMDDhhmmCCYY)</comment> |
|
|
670 | |
|
|
671 | </pre> |
|
|
672 | |
|
|
673 | </body> |
|
|
674 | </section> |
|
|
675 | </chapter> |
|
|
676 | <chapter> |
715 | <title>Starting from Stage1</title> |
677 | <title>Starting from Stage1</title> |
716 | <section> |
678 | <section> |
717 | <body> |
679 | <body> |
718 | <p>The stage1 tarball is for ultimate tweakage. If you have picked this tarball, |
680 | <p>The stage1 tarball is for complete customization and optimization. If you have picked this tarball, |
719 | you are most likely looking to have an uber-optimized system. Have fun, because optimization |
681 | you are most likely looking to have an uber-optimized system. Have fun, because optimization |
720 | is what Gentoo Linux is all about! Installing from a stage1 takes a lot of time, but the result |
682 | is what Gentoo Linux is all about! Installing from a stage1 takes a lot of time, but the result |
721 | is a system that has been optimized from the ground up for your specific machine and needs. |
683 | is a system that has been optimized from the ground up for your specific machine and needs. |
722 | </p> |
684 | </p> |
723 | <p>Now, it's time to start the "bootstrap" process. This process takes about two hours on |
685 | <p>Now, it is time to start the "bootstrap" process. This process takes about two hours on |
724 | my 1200Mhz AMD Athlon system. During this time, the extracted build image will be prepped |
686 | my 1200Mhz AMD Athlon system. |
725 | for compiling the rest of the system. The GNU compiler suite will be built, as well as the GNU C library. |
687 | During this time, the extracted build image will be prepared and the GNU compiler suite and Libraries will be built. </p> |
726 | These are time consuming builds and make up the bulk of the bootstrap process. |
|
|
727 | </p> |
|
|
728 | <pre caption="Bootstrapping"> |
688 | <pre caption="Bootstrapping"> |
729 | # <c>cd /usr/portage</c> |
689 | # <c>cd /usr/portage</c> |
730 | # <c>scripts/bootstrap.sh</c> |
690 | # <c>scripts/bootstrap.sh</c> |
731 | </pre> |
691 | </pre> |
732 | <p>The "bootstrap" process will now begin. |
692 | <p>The "bootstrap" process will now begin. |
733 | </p> |
693 | </p> |
734 | <note> |
694 | <note> |
735 | Portage by default uses <c>/var/tmp</c> during package building, often |
695 | Portage by default uses <c>/var/tmp</c> during package building, often |
736 | using several hundred megabytes of temporary storage. If you would like to |
696 | using several hundred megabytes of temporary storage. If you would like to |
737 | change where Portage stores these temporary files, set a new PORTAGE_TMPDIR <e>before</e> |
697 | change where Portage stores these temporary files, set a new PORTAGE_TMPDIR <e>before</e> |
738 | starting the bootstrap process, as follows: |
698 | starting the bootstrap process, as follows: |
739 | </note> |
699 | </note> |
740 | <pre caption="Changing Portage's Storage Path"> |
700 | <pre caption="Changing Portage's Storage Path"> |
741 | # <c>export PORTAGE_TMPDIR="/otherdir/tmp"</c> |
701 | # <c>export PORTAGE_TMPDIR="/otherdir/tmp"</c> |
742 | </pre> |
702 | </pre> |
743 | <p><c>bootstrap.sh</c> will build <c>binutils</c>, <c>gcc</c>, <c>gettext</c>, |
703 | <p><c>bootstrap.sh</c> will build <c>binutils</c>, <c>gcc</c>, <c>gettext</c>, |
744 | and <c>glibc</c>, rebuilding <c>binutils</c>, <c>gcc</c>, and <c>gettext</c> |
704 | and <c>glibc</c>, rebuilding <c>binutils</c>, <c>gcc</c>, and <c>gettext</c> |
745 | after <c>glibc</c>. Needless to say, this process takes a while. |
705 | after <c>glibc</c>. Needless to say, this process takes a while. |
746 | Have a nice nap. Once this process completes, your system will be equivalent to a "stage2" system, |
706 | Once this process completes, your system will be equivalent to a "stage2" system, |
747 | which means you can now move on to the stage2 instructions. |
707 | which means you can now move on to the stage2 instructions. |
748 | </p> |
708 | </p> |
749 | </body> |
709 | </body> |
750 | </section> |
710 | </section> |
751 | </chapter> |
711 | </chapter> |
752 | <chapter> |
712 | <chapter> |
753 | <title>Starting from Stage2</title> |
713 | <title>Starting from Stage2</title> |
754 | <section> |
714 | <section> |
755 | <body> |
715 | <body> |
756 | <p>The stage2 tarball already has the bootstrapping done for you. All that you have |
716 | <p>The stage2 tarball already has the bootstrapping done for you. All that you have |
757 | to do is install the rest of the system. |
717 | to do is install the rest of the system. |
758 | </p> |
718 | </p> |
759 | <note> |
719 | <note> |
760 | If you haven't done so, please edit <path>/etc/make.conf</path> to your flavor. |
720 | If you have not already edited /etc/make.conf to fit your specifications, |
|
|
721 | now would be a good time to do so. |
761 | </note> |
722 | </note> |
762 | <pre caption="Installing the Rest of the System"> |
723 | <pre caption="Installing the Rest of the System"> |
763 | # <c>emerge -p system</c> |
724 | # <c>emerge -p system</c> |
764 | <comment>[lists the packages to be installed]</comment> |
725 | <comment>[lists the packages to be installed]</comment> |
765 | # <c>emerge system</c> |
726 | # <c>emerge system</c> |
766 | </pre> |
727 | </pre> |
767 | <p>It's going to take a while |
728 | <p>It is going to take a while |
768 | to finish building the entire base system. Your reward is that it will be |
729 | to finish building the entire base system. Your reward is that it will be |
769 | thoroughly optimized for your system. The drawback is that you have to find a |
730 | thoroughly optimized for your system. The drawback is that you have to find a |
770 | way to keep yourself occupied for some time to come. The author suggests "Star |
731 | way to keep yourself occupied for some time to come. The author suggests "Star |
771 | Wars - Super Bombad Racing" for the PS2. |
732 | Wars - Super Bombad Racing" for the PS2. |
772 | </p> |
733 | </p> |
773 | <p>When this process completes, your system will be the equivalent of a stage3 system. You have |
734 | <p>When this process completes, your system will be the equivalent of a stage3 system. You have |
774 | a couple of choices on how to continue |
735 | a couple of choices on how to continue |
775 | at this point. You can move onto the stage3 instructions and complete those. Doing that will |
736 | at this point. You can move onto the stage3 instructions and complete those. Doing that will |
776 | get your system right up to date with what is in the current Portage tree. This is not necessary, |
737 | get your system right up to date with what is in the current Portage tree. This is not necessary, |
777 | but it is highly recommended. If you do not choose to get up to date with the stage3 instructions, |
738 | but it is highly recommended. |
778 | you can move onto the GRP install section. If you do not wish to use GRP, you can move |
|
|
779 | onto <uri link="http://www.gentoo.org/doc/en/gentoo-x86-install.xml#doc_chp16">Chapter 16: Final Steps</uri>. |
|
|
780 | </p> |
739 | </p> |
781 | </body> |
740 | </body> |
782 | </section> |
741 | </section> |
783 | </chapter> |
742 | </chapter> |
784 | <chapter> |
743 | <chapter> |
785 | <title>Starting from Stage3</title> |
744 | <title>Starting from Stage3</title> |
786 | <section> |
745 | <section> |
787 | <body> |
746 | <body> |
788 | <p>The stage3 tarball is already configured for your system. There is not much to do for this stage, |
747 | <p>The stage3 tarball is already configured for your system. There is not much to do for this stage, |
789 | but it is a very good idea to update your system to the newest available packages. </p> |
748 | but it is a very good idea to update your system to the newest available packages. </p> |
790 | |
749 | |
791 | <note>If you have not already edited <path>/etc/make.conf</path> to fit your specifications, |
750 | <note>If you have not already edited <path>/etc/make.conf</path> to fit your specifications, |
792 | now would be a good time to do so. </note> |
751 | now would be a good time to do so. </note> |
793 | <pre caption="Getting up-to-date"> |
752 | <pre caption="Getting up-to-date"> |
794 | # <c>emerge sync</c> |
753 | # <c>emerge sync</c> |
795 | # <c>emerge -up world</c> |
754 | # <c>emerge -up world</c> |
796 | <comment>lists [<i>packages</i>] to be installed</comment> |
755 | <comment>lists [<i>packages</i>] to be installed</comment> |
797 | # <c>emerge -u world</c> |
756 | # <c>emerge -u world</c> |
798 | </pre> |
757 | </pre> |
799 | <p>Once you complete this step, you have some options on how to continue. If you are going to be using GRP, |
|
|
800 | please move onto the GRP section. If you are not going to use GRP, you may continue onto |
|
|
801 | <uri link="http://www.gentoo.org/doc/en/gentoo-x86-install.xml#doc_chp16">Chapter 16: Final Steps</uri>. |
|
|
802 | </p> |
|
|
803 | </body> |
|
|
804 | </section> |
|
|
805 | </chapter> |
|
|
806 | <chapter> |
|
|
807 | <title>Using GRP</title> |
|
|
808 | <section> |
|
|
809 | <body> |
|
|
810 | <p>You can take advantage of pre-built GRP package sets to avoid compiling certain popular and large packages. Currently, we provide full builds of everything you need for <c>openoffice-bin</c>, |
|
|
811 | <c>GNOME</c>, <c>KDE</c> and <c>xfree</c>. |
|
|
812 | </p> |
|
|
813 | <p>First, you will need to <c>cd</c> to the location of the packages directory. We have already |
|
|
814 | mounted the directory at <path>/GRP</path>. In that directory you |
|
|
815 | will find the <c>grp-install.sh</c> script, an <i>All</i> directory that contains all of the binary |
|
|
816 | packages, and a list of available GRP packages. To install any/all of these |
|
|
817 | package sets you should do the following: </p> |
|
|
818 | <pre caption="Using GRP"> |
|
|
819 | # <c>cd /GRP</c> |
|
|
820 | # <c>sh grp-install.sh <list of package lists></c> |
|
|
821 | <comment>where <list of package lists> may be any of the *-list.txt files found in the same directory.</comment> |
|
|
822 | </pre> |
|
|
823 | <p><c>grp-install.sh</c> can be run multiple times without replacing existing installations. You can |
|
|
824 | do a <c>sh grp-install.sh</c> for a basic usage description if you are still a bit foggy. |
|
|
825 | </p> |
|
|
826 | </body> |
|
|
827 | </section> |
|
|
828 | </chapter> |
|
|
829 | <chapter> |
|
|
830 | <title>Setting your Timezone</title> |
|
|
831 | <section> |
|
|
832 | <body> |
|
|
833 | <p>At this point, you should have system that's ready for final configuration. |
|
|
834 | We'll start the configuration process by setting the timezone. By setting the timezone before building |
|
|
835 | the kernel we ensure that users get reasonable <c>uname -a</c> output. |
|
|
836 | </p> |
|
|
837 | <p>Look for your timezone (or GMT if you using Greenwich Mean Time) in |
|
|
838 | <path>/usr/share/zoneinfo</path>. Then, make a symbolic link by typing: |
|
|
839 | </p> |
|
|
840 | <pre caption="Creating a symbolic link for timezome"> |
|
|
841 | # <c>ln -sf /usr/share/zoneinfo/path/to/timezonefile /etc/localtime</c> |
|
|
842 | </pre> |
|
|
843 | <p>You might also want to check <path>/etc/rc.conf</path> to make sure your timezone settings |
|
|
844 | are correct. |
|
|
845 | </p> |
|
|
846 | </body> |
758 | </body> |
847 | </section> |
759 | </section> |
848 | </chapter> |
760 | </chapter> |
849 | <chapter> |
761 | <chapter> |
850 | <title>Installing the kernel and a System Logger</title> |
762 | <title>Installing the kernel and a System Logger</title> |
851 | <section> |
763 | <section> |
852 | <body> |
764 | <body> |
853 | <note> |
765 | <note> |
854 | If you haven't done so, please edit <path>/etc/make.conf</path> to your flavor. |
766 | If you haven't done so, please edit <path>/etc/make.conf</path> to your flavor. |
855 | </note> |
767 | </note> |
856 | <p>You now need to merge Linux source ebuilds. Here are the ones we currently |
768 | <p>You now need to merge Linux kernel sources. Here are the ones we currently |
857 | offer: |
769 | offer: |
858 | </p> |
770 | </p> |
859 | <table> |
771 | <table> |
860 | <tr> |
772 | <tr> |
861 | <th>ebuild</th> |
773 | <th>ebuild</th> |
862 | <th>description</th> |
774 | <th>description</th> |
863 | </tr> |
775 | </tr> |
864 | <tr> |
776 | <tr> |
865 | <ti> |
777 | <ti> |
866 | <path>gentoo-sources</path> |
778 | <path>gentoo-sources</path> |
867 | </ti> |
779 | </ti> |
868 | <ti>Our own performance and functionality-enhanced kernel does not include XFS support.</ti> |
780 | <ti>Our own performance and functionality-enhanced kernel does not include XFS support.</ti> |
869 | </tr> |
781 | </tr> |
870 | <tr> |
782 | <tr> |
871 | <ti> |
783 | <ti> |
… | |
… | |
877 | <ti> |
789 | <ti> |
878 | <path>openmosix-sources</path> |
790 | <path>openmosix-sources</path> |
879 | </ti> |
791 | </ti> |
880 | <ti>A stock Linux kernel source tree patched with support for the GPL <uri link="http://www.openmosix.com">openMosix</uri> load-balancing/clustering technology</ti> |
792 | <ti>A stock Linux kernel source tree patched with support for the GPL <uri link="http://www.openmosix.com">openMosix</uri> load-balancing/clustering technology</ti> |
881 | </tr> |
793 | </tr> |
882 | <tr> |
794 | <tr> |
883 | <ti> |
795 | <ti> |
884 | <path>usermode-sources</path> |
796 | <path>usermode-sources</path> |
885 | </ti> |
797 | </ti> |
886 | <ti>A stock Linux kernel source tree patched with support for User-Mode Linux. ("Linux inside Linux" technology)</ti> |
798 | <ti>A stock Linux kernel source tree patched with support for User-Mode Linux. ("Linux inside Linux" technology)</ti> |
887 | </tr> |
799 | </tr> |
888 | <tr> |
800 | <tr> |
889 | <ti> |
801 | <ti> |
890 | <path>vanilla-sources</path> |
802 | <path>vanilla-sources</path> |
891 | </ti> |
803 | </ti> |
892 | <ti>A stock Linux kernel source tree, just like you'd get from kernel.org</ti> |
804 | <ti>A stock Linux kernel source tree, just like you would get from kernel.org</ti> |
893 | </tr> |
805 | </tr> |
894 | </table> |
806 | </table> |
895 | <warn> |
807 | <warn> |
896 | If you are configuring your own kernel, be careful with the <i>grsecurity</i> option. Being too aggressive with your |
808 | If you are configuring your own kernel, be careful with the <i>grsecurity</i> option. Being too aggressive with your |
897 | security settings can cause certain programs (such as X) to not run properly. If in doubt, leave it out. |
809 | security settings can cause certain programs (such as X) to not run properly. If in doubt, leave it out. |
898 | </warn> |
810 | </warn> |
899 | <p>Choose a kernel and then merge as follows:</p> |
811 | <p>Choose a kernel and then merge as follows:</p> |
900 | <pre caption="Emerging Kernel Sources"> |
812 | <pre caption="Emerging Kernel Sources"> |
901 | # <c>emerge sys-kernel/gentoo-sources</c> |
813 | # <c>emerge sys-kernel/gentoo-sources</c> |
902 | </pre> |
814 | </pre> |
903 | <p>Once you have a Linux kernel source tree available, it's time to compile your own custom kernel. |
815 | <p>Once you have a Linux kernel source tree available, it is time to compile your own custom kernel. |
904 | </p> |
816 | </p> |
905 | <p>Please note that <path>/usr/src/linux</path> is a symlink to your current emerged kernel source package, |
817 | <p>Please note that <path>/usr/src/linux</path> is a symlink to your current emerged kernel source package, |
906 | which is set automatically by Portage at emerge time. |
818 | and is set automatically by Portage at emerge time. |
907 | If you have multiple kernel source packages, it is necessary to set the <path>/usr/src/linux</path> symlink |
819 | If you have multiple kernel source packages, it is necessary to set the <path>/usr/src/linux</path> symlink |
908 | to the correct one before proceeding. |
820 | to the correct one before proceeding. |
909 | </p> |
821 | </p> |
910 | <pre caption="Compiling the Linux Kernel"> |
822 | <pre caption="Compiling the Linux Kernel"> |
911 | # <c>cd /usr/src/linux</c> |
823 | # <c>cd /usr/src/linux</c> |
912 | # <c>source /etc/profile</c> |
824 | # <c>source /etc/profile</c> |
913 | <comment>Again, this updates your paths. If you get an error saying gcc is not found, |
825 | <comment>Again, this updates your paths. If you get an error saying gcc is not found, |
914 | this is what you may have to do. </comment> |
826 | this is what you may have to do. </comment> |
915 | # <c>make menuconfig</c> |
827 | # <c>make menuconfig</c> |
916 | # <c>make dep && make clean bzImage modules modules_install</c> |
828 | # <c>make dep && make clean bzImage modules modules_install</c> |
917 | # <c>mv /boot/bzImage /boot/bzImage.orig</c> |
829 | # <c>mv /boot/bzImage /boot/bzImage.orig</c> |
918 | <comment>[if bzImage already exists]</comment> |
830 | <comment>[if bzImage already exists]</comment> |
919 | # <c>cp /usr/src/linux/arch/i386/boot/bzImage /boot</c> |
831 | # <c>cp /usr/src/linux/arch/i386/boot/bzImage /boot</c> |
920 | </pre> |
832 | </pre> |
921 | <warn>For your kernel to function properly, there are several options that you will |
833 | <warn>For your kernel to function properly, there are several options that you will |
922 | need to ensure are in the kernel proper -- that is, they should <i>be enabled and not |
834 | need to ensure are in the kernel proper -- that is, they should <i>be enabled and not |
923 | compiled as modules</i>. You will need to enable the <i>"Code maturity |
835 | compiled as modules</i>. You will need to enable the <i>"Code maturity |
924 | level options --> Prompt for development and/or incomplete code/drivers"</i> |
836 | level options --> Prompt for development and/or incomplete code/drivers"</i> |
925 | option to see several of these selections. |
837 | option to see several of these selections. |
926 | Under the "File systems" section, be sure to enable the <i>"/dev" file system support</i> (note that |
838 | Under the "File systems" section, be sure to enable the <i>"/dev" file system support</i> (note that |
927 | you <e>don't</e> need to enable the "/dev/pts file system support" option). You'll also |
839 | you <e>do not</e> need to enable the "/dev/pts file system support" option). You will also |
928 | need to enable the <i>"Virtual Memory Filesystem"</i>. Be sure to enable "ReiserFS" if you have |
840 | need to enable the <i>"Virtual Memory Filesystem"</i>. Be sure to enable "ReiserFS" if you have |
929 | any ReiserFS partitions; the same goes for "Ext3". If you're using XFS, enable the |
841 | any ReiserFS partitions; the same goes for "Ext3". If you're using XFS, enable the |
930 | "SGI XFS filesystem support" |
842 | "SGI XFS filesystem support" |
931 | option. It's always a good idea to leave ext2 |
843 | option. It is always a good idea to leave ext2 |
932 | enabled whether you are using it or not. Also, most people using IDE hard drives will |
844 | enabled whether you are using it or not. Also, most people using IDE hard drives will |
933 | want to enable the "USE DMA by default" option; otherwise, your IDE drives may perform |
845 | want to enable the "USE DMA by default" option; otherwise, your IDE drives may perform |
934 | very poorly. Of course, remember to enable "IDE disk" support as well -- otherwise your |
846 | very poorly. Of course, remember to enable "IDE disk" support as well -- otherwise your |
935 | kernel won't be able to see your IDE disks. |
847 | kernel won't be able to see your IDE disks. |
936 | </warn> |
848 | </warn> |
937 | <p>If you are using hardware RAID you will need to enable a couple more options in the kernel: |
849 | <p>If you are using hardware RAID you will need to enable a couple more options in the kernel: |
938 | For Highpoint RAID controllers select hpt366 chipset support, support for IDE RAID controllers and Highpoint |
850 | For Highpoint RAID controllers select hpt366 chipset support, support for IDE RAID controllers and Highpoint |
939 | 370 software RAID.For Promise RAID controllers select PROMISE PDC202{46|62|65|67|68|69|70} support, |
851 | 370 software RAID.For Promise RAID controllers select PROMISE PDC202{46|62|65|67|68|69|70} support, |
940 | support for IDE RAID |
852 | support for IDE RAID |
941 | controllers and Support Promise software RAID (Fasttrak(tm)) |
853 | controllers and Support Promise software RAID (Fasttrak(tm)) |
942 | </p> |
854 | </p> |
943 | <p>If you use PPPoE to connect to Internet, you will need the following |
855 | <p>If you use PPPoE to connect to Internet, you will need the following |
944 | options in the kernel (built-in or as preferably as modules) : |
856 | options in the kernel (built-in or as preferably as modules) : |
945 | "PPP (point-to-point protocol) support", "PPP support for async serial ports", |
857 | "PPP (point-to-point protocol) support", "PPP support for async serial ports", |
946 | "PPP support for sync tty ports". The two compression options won't harm but |
858 | "PPP support for sync tty ports". The two compression options won't harm but |
… | |
… | |
955 | also choose to use modules, then <c>echo -e "ide-scsi\nsg\nsr_mod" |
867 | also choose to use modules, then <c>echo -e "ide-scsi\nsg\nsr_mod" |
956 | >> /etc/modules.autoload</c> to have them automatically added at boot time. |
868 | >> /etc/modules.autoload</c> to have them automatically added at boot time. |
957 | </p> |
869 | </p> |
958 | <note> |
870 | <note> |
959 | For those who prefer it, |
871 | For those who prefer it, |
960 | it is now possible to install Gentoo Linux with a 2.2 kernel. |
872 | it is now possible to install Gentoo Linux with a 2.2 kernel. |
961 | However, doing this comes at a price: |
873 | However, doing this comes at a price: |
962 | you will lose many of the nifty features that |
874 | you will lose many of the nifty features that |
963 | are new to the 2.4 series kernels (such as XFS and tmpfs |
875 | are new to the 2.4 series kernels (such as XFS and tmpfs |
964 | filesystems, iptables, and more), although the 2.2 kernel sources can be |
876 | filesystems, iptables, and more), although the 2.2 kernel sources can be |
965 | patched with ReiserFS and devfs support. |
877 | patched with ReiserFS and devfs support. |
966 | Gentoo linux boot scripts require either tmpfs or ramdisk support in the kernel, so |
878 | Gentoo linux boot scripts require either tmpfs or ramdisk support in the kernel, so |
967 | 2.2 kernel users need to make sure that ramdisk support is compiled in (ie, not a module). |
879 | 2.2 kernel users need to make sure that ramdisk support is compiled in (ie, not a module). |
968 | It is <comment>vital</comment> that a <e>gentoo=notmpfs</e> flag be added to the kernel |
880 | It is <comment>vital</comment> that a <e>gentoo=notmpfs</e> flag be added to the kernel |
969 | line in <path>/boot/grub/grub.conf</path> for the 2.2 kernel so that a ramdisk is mounted |
881 | line in <path>/boot/grub/grub.conf</path> for the 2.2 kernel so that a ramdisk is mounted |
970 | for the bootscripts instead of tmpfs. If you choose not to use devfs, then |
882 | for the boot scripts instead of tmpfs. If you choose not to use devfs, then |
971 | <e>gentoo=notmpfs,nodevfs</e> should be used instead. |
883 | <e>gentoo=notmpfs,nodevfs</e> should be used instead. |
972 | </note> |
884 | </note> |
973 | <p>Your new custom kernel (and modules) are now installed. Now you need to choose a system |
885 | <p>Your new custom kernel (and modules) are now installed. Now you need to choose a system |
974 | logger that you would like to install. We offer sysklogd, which is the traditional set |
886 | logger that you would like to install. We offer sysklogd, which is the traditional set |
975 | of system logging daemons. We also have msyslog and syslog-ng as well as metalog. Power users seem |
887 | of system logging daemons. We also have msyslog and syslog-ng as well as metalog. Power users seem |
976 | to gravitate away from sysklogd (not very good performance) and towards the |
888 | to gravitate away from sysklogd (not very good performance) and towards the |
977 | newer alternatives. |
889 | newer alternatives. |
978 | If in doubt, you may want to try metalog, since it seems to be quite popular. |
890 | If in doubt, you may want to try metalog, since it seems to be quite popular. |
979 | To merge your logger of choice, type <e>one</e> of the next four lines: |
891 | To merge your logger of choice, type <e>one</e> of the next four lines: |
980 | </p> |
892 | </p> |
981 | <pre caption="Emerging System Logger of Choice"> |
893 | <pre caption="Emerging System Logger of Choice"> |
982 | # <c>emerge app-admin/sysklogd</c> |
894 | # <c>emerge app-admin/sysklogd</c> |
983 | # <c>rc-update add sysklogd default</c> |
895 | # <c>rc-update add sysklogd default</c> |
984 | <comment>or</comment> |
896 | <comment>or</comment> |
985 | # <c>emerge app-admin/syslog-ng</c> |
897 | # <c>emerge app-admin/syslog-ng</c> |
… | |
… | |
996 | <path>/etc/syslog-ng/syslog-ng.conf</path>. |
908 | <path>/etc/syslog-ng/syslog-ng.conf</path>. |
997 | See <path>/etc/syslog-ng</path> |
909 | See <path>/etc/syslog-ng</path> |
998 | for a sample configuration file. |
910 | for a sample configuration file. |
999 | </warn> |
911 | </warn> |
1000 | <impo> |
912 | <impo> |
1001 | Metalog flushes output to the disk in blocks, so messages aren't immediately recorded into |
913 | Metalog flushes output to the disk in blocks, so messages aren't immediately recorded into |
1002 | the system logs. If you are trying to debug a daemon, this performance-enhancing behavior |
914 | the system logs. If you are trying to debug a daemon, this performance-enhancing behavior |
1003 | is less than helpful. When your Gentoo Linux system is up and running, you can send |
915 | is less than helpful. When your Gentoo Linux system is up and running, you can send |
1004 | metalog a USR1 signal to temporarily turn off this message buffering (meaning that |
916 | metalog a USR1 signal to temporarily turn off this message buffering (meaning that |
1005 | <i>tail -f <path>/var/log/everything/current</path></i> will now work |
917 | <i>tail -f <path>/var/log/everything/current</path></i> will now work |
1006 | in real time, as expected), |
918 | in real time, as expected), |
1007 | and a USR2 signal to turn buffering back on |
919 | and a USR2 signal to turn buffering back on |
1008 | again. If you want to disable buffering permanently, you can change METALOG_OPTS="-B" to METALOG_OPTS="-B -s" |
920 | again. If you want to disable buffering permanently, you can change METALOG_OPTS="-B" to METALOG_OPTS="-B -s" |
1009 | in <path>/etc/conf.d/metalog</path>. |
921 | in <path>/etc/conf.d/metalog</path>. |
1010 | </impo> |
922 | </impo> |
1011 | <p>Now, you may optionally choose a cron package that you'd like to use. |
923 | <p>Now, you may optionally choose a cron package that you would like to use. |
1012 | Right now, we offer dcron, fcron and vcron. If you don't know which one to choose, |
924 | Right now, we offer dcron, fcron and vcron. If you do not know which one to choose, |
1013 | you might as well grab vcron. They can be installed as follows: |
925 | you might as well grab vcron. They can be installed as follows: |
1014 | </p> |
926 | </p> |
1015 | <pre caption="Choosing a CRON Daemon"> |
927 | <pre caption="Choosing a CRON Daemon"> |
1016 | # <c>emerge sys-apps/dcron</c> |
928 | # <c>emerge sys-apps/dcron</c> |
1017 | # <c>crontab /etc/crontab</c> |
929 | # <c>crontab /etc/crontab</c> |
1018 | <comment>or</comment> |
930 | <comment>or</comment> |
1019 | # <c>emerge sys-apps/fcron</c> |
931 | # <c>emerge sys-apps/fcron</c> |
1020 | # <c>crontab /etc/crontab</c> |
932 | # <c>crontab /etc/crontab</c> |
1021 | <comment>or</comment> |
933 | <comment>or</comment> |
1022 | # <c>emerge sys-apps/vcron</c> |
934 | # <c>emerge sys-apps/vcron</c> |
1023 | <comment>You do not need to run <c>crontab /etc/crontab</c> if using vcron. </comment> |
935 | <comment>You do not need to run <c>crontab /etc/crontab</c> if using vcron. </comment> |
1024 | <comment>Don't forget to add your *cron to the proper init level. </comment> |
936 | <comment>Do not forget to add your *cron to the proper init level. </comment> |
1025 | # <c>rc-update add *cron default </c> |
937 | # <c>rc-update add *cron default </c> |
1026 | </pre> |
938 | </pre> |
1027 | <!--<p>For more information how how cron works under Gentoo Linux, |
939 | <!--<p>For more information how how cron works under Gentoo Linux, |
1028 | see <uri link="http://lists.gentoo.org/pipermail/gentoo-announce/2002-April/000151.html">this announcement</uri>.</p>--> |
940 | see <uri link="http://lists.gentoo.org/pipermail/gentoo-announce/2002-April/000151.html">this announcement</uri>.</p>--> |
1029 | <p>For more information on starting programs and daemons at startup, see the |
941 | <p>For more information on starting programs and daemons at startup, see the |
1030 | <uri link="/doc/en/rc-scripts.xml">rc-script guide</uri>. |
942 | <uri link="/doc/en/rc-scripts.xml">rc-script guide</uri>. |
1031 | </p> |
943 | </p> |
1032 | </body> |
944 | </body> |
1033 | </section> |
945 | </section> |
1034 | </chapter> |
946 | </chapter> |
1035 | <chapter> |
947 | <chapter> |
1036 | <title>Installing miscellany necessary packages</title> |
948 | <title>Installing miscellany necessary packages</title> |
1037 | <section> |
949 | <section> |
1038 | <body> |
950 | <body> |
1039 | <p>If you need rp-pppoe to connect to the net, be aware that at this point |
951 | <p>If you need rp-pppoe to connect to the net, be aware that at this point |
… | |
… | |
1044 | |
956 | |
1045 | <note>The <i>USE="-X"</i> prevents pppoe from installing its optional X interface, which is a good thing, |
957 | <note>The <i>USE="-X"</i> prevents pppoe from installing its optional X interface, which is a good thing, |
1046 | because X and its dependencies would also be emerged. You can always recompile <i>rp-pppoe</i> with |
958 | because X and its dependencies would also be emerged. You can always recompile <i>rp-pppoe</i> with |
1047 | X support later. |
959 | X support later. |
1048 | </note> |
960 | </note> |
1049 | <note> Please note that the rp-pppoe is built but not configured. |
961 | <note> Please note that the rp-pppoe is built but not configured. |
1050 | You will have to do it again using <c>adsl-setup</c> when you boot into your Gentoo system |
962 | You will have to do it again using <c>adsl-setup</c> when you boot into your Gentoo system |
1051 | for the first time. |
963 | for the first time. |
1052 | </note> |
964 | </note> |
1053 | <p>You may need to install some additional packages in the Portage tree |
965 | <p>You may need to install some additional packages in the Portage tree |
1054 | if you are using any optional features like XFS, ReiserFS or LVM. If you're |
966 | if you are using any optional features like XFS, ReiserFS or LVM. If you're |
1055 | using XFS, you should emerge the <c>xfsprogs</c> package: |
967 | using XFS, you should emerge the <c>xfsprogs</c> package: |
1056 | </p> |
968 | </p> |
1057 | <pre caption="Emerging Filesystem Tools"> |
969 | <pre caption="Emerging Filesystem Tools"> |
1058 | # <c>emerge sys-apps/xfsprogs</c> |
970 | # <c>emerge sys-apps/xfsprogs</c> |
1059 | <comment>If you'd like to use ReiserFS, you should emerge the ReiserFS tools: </comment> |
971 | <comment>If you would like to use ReiserFS, you should emerge the ReiserFS tools: </comment> |
1060 | # <c>emerge sys-apps/reiserfsprogs</c> |
972 | # <c>emerge sys-apps/reiserfsprogs</c> |
1061 | <comment>If you'd like to use JFS, you should emerge the JFS tools: </comment> |
973 | <comment>If you would like to use JFS, you should emerge the JFS tools: </comment> |
1062 | # <c>emerge jfsutils</c> |
974 | # <c>emerge jfsutils</c> |
1063 | <comment>If you're using LVM, you should emerge the <c>lvm-user</c> package: </comment> |
975 | <comment>If you're using LVM, you should emerge the <c>lvm-user</c> package: </comment> |
1064 | # <c>emerge sys-apps/lvm-user</c> |
976 | # <c>emerge sys-apps/lvm-user</c> |
1065 | </pre> |
977 | </pre> |
1066 | <p>If you're a laptop user and wish to use your PCMCIA slots on your first |
978 | <p>If you're a laptop user and wish to use your PCMCIA slots on your first |
1067 | real reboot, you'll want to make sure you install the <i>pcmcia-cs</i> package. |
979 | real reboot, you will want to make sure you install the <i>pcmcia-cs</i> package. |
1068 | </p> |
980 | </p> |
1069 | <pre caption="Emerging PCMCIA-cs"> |
981 | <pre caption="Emerging PCMCIA-cs"> |
1070 | # <c>emerge sys-apps/pcmcia-cs</c> |
982 | # <c>emerge sys-apps/pcmcia-cs</c> |
1071 | </pre> |
983 | </pre> |
1072 | <warn>You will have to re-emerge <i>pcmcia-cs</i> after installation to get PCMCIA |
984 | <warn>You will have to re-emerge <i>pcmcia-cs</i> after installation to get PCMCIA |
1073 | to work. |
985 | to work. |
1074 | </warn> |
986 | </warn> |
1075 | </body> |
987 | </body> |
1076 | </section> |
988 | </section> |
1077 | </chapter> |
989 | </chapter> |
1078 | <chapter> |
990 | <chapter> |
1079 | <title>Modifying /etc/fstab for your machine</title> |
991 | <title>Modifying /etc/fstab for your machine</title> |
1080 | <section> |
992 | <section> |
1081 | <body> |
993 | <body> |
1082 | <p>Your Gentoo Linux system is almost ready for use. All we need to do now is configure |
994 | <p>Your Gentoo Linux system is almost ready for use. All we need to do now is configure |
1083 | a few important system files and install the GRUB boot loader. |
995 | a few important system files and install the boot loader. |
1084 | The first file we need to |
996 | The first file we need to |
1085 | configure is <path>/etc/fstab</path>. Remember that you should use |
997 | configure is <path>/etc/fstab</path>. Remember that you should use |
1086 | the <c>notail</c> option for your boot partition if you chose to create a ReiserFS filesystem on it. |
998 | the <c>notail</c> option for your boot partition if you chose to create a ReiserFS filesystem on it. |
1087 | Remember to specify <c>ext2</c>, <c>ext3</c> or <c>reiserfs</c> filesystem types as appropriate. |
999 | Remember to specify <c>ext2</c>, <c>ext3</c> or <c>reiserfs</c> filesystem types as appropriate. |
1088 | </p> |
1000 | </p> |
1089 | <p>Use something like the <path>/etc/fstab</path> listed below, but of course be sure to replace "BOOT", |
1001 | <p>Use something like the <path>/etc/fstab</path> listed below, but of course be sure to replace "BOOT", |
1090 | "ROOT" and "SWAP" with the actual block devices you are using (such as <c>hda1</c>, etc.)</p> |
1002 | "ROOT" and "SWAP" with the actual block devices you are using (such as <c>hda1</c>, etc.)</p> |
1091 | <pre caption="Editing fstab"><comment> |
1003 | <pre caption="Editing fstab"><comment> |
1092 | # /etc/fstab: static file system information. |
1004 | # /etc/fstab: static file system information. |
1093 | # |
1005 | # |
1094 | # noatime turns off atimes for increased performance (atimes normally aren't |
1006 | # noatime turns off atimes for increased performance (atimes normally aren't |
1095 | # needed; notail increases performance of ReiserFS (at the expense of storage |
1007 | # needed; notail increases performance of ReiserFS (at the expense of storage |
1096 | # efficiency). It's safe to drop the noatime options if you want and to |
1008 | # efficiency). It is safe to drop the noatime options if you want and to |
1097 | # switch between notail and tail freely. |
1009 | # switch between notail and tail freely. |
1098 | |
1010 | |
1099 | # <fs> <mountpoint> <type> <opts> <dump/pass> |
1011 | # <fs> <mountpoint> <type> <opts> <dump/pass> |
1100 | |
1012 | |
1101 | # NOTE: If your BOOT partition is ReiserFS, add the notail option to opts. |
1013 | # NOTE: If your BOOT partition is ReiserFS, add the notail option to opts. |
1102 | </comment> |
1014 | </comment> |
1103 | /dev/BOOT /boot ext2 noauto,noatime 1 2 |
1015 | /dev/BOOT /boot ext2 noauto,noatime 1 2 |
1104 | /dev/ROOT / ext3 noatime 0 1 |
1016 | /dev/ROOT / ext3 noatime 0 1 |
1105 | /dev/SWAP none swap sw 0 0 |
1017 | /dev/SWAP none swap sw 0 0 |
1106 | /dev/cdroms/cdrom0 /mnt/cdrom iso9660 noauto,ro 0 0 |
1018 | /dev/cdroms/cdrom0 /mnt/cdrom iso9660 noauto,ro 0 0 |
1107 | proc /proc proc defaults 0 0 |
1019 | proc /proc proc defaults 0 0 |
1108 | </pre> |
1020 | </pre> |
1109 | <warn>Please notice that <i>/boot</i> is NOT mounted at boottime. |
1021 | <warn>Please notice that <i>/boot</i> is NOT mounted at boot time. |
1110 | This is to protect the data in <i>/boot</i> from |
1022 | This is to protect the data in <i>/boot</i> from |
1111 | corruption. If you need to access <i>/boot</i>, please mount it! |
1023 | corruption. If you need to access <i>/boot</i>, please mount it! |
1112 | </warn> |
1024 | </warn> |
1113 | </body> |
1025 | </body> |
1114 | </section> |
1026 | </section> |
1115 | </chapter> |
1027 | </chapter> |
1116 | <chapter> |
1028 | <chapter> |
1117 | <title>Setting the Root Password</title> |
1029 | <title>Setting the Root Password</title> |
1118 | <section> |
1030 | <section> |
1119 | <body> |
1031 | <body> |
1120 | <p>Before you forget, set the root password by typing: </p> |
1032 | <p>Before you forget, set the root password by typing: </p> |
1121 | <pre caption="Setting the root Password"> |
1033 | <pre caption="Setting the root Password"> |
1122 | # <c>passwd</c> |
1034 | # <c>passwd</c> |
1123 | </pre> |
1035 | </pre> |
1124 | |
1036 | |
… | |
… | |
1134 | <body> |
1046 | <body> |
1135 | <p>Edit this file so that it contains your fully-qualified domain name on a single line, |
1047 | <p>Edit this file so that it contains your fully-qualified domain name on a single line, |
1136 | i.e. <c>mymachine.mydomain.com</c>. |
1048 | i.e. <c>mymachine.mydomain.com</c>. |
1137 | </p> |
1049 | </p> |
1138 | <pre caption="Configuring Hostname"> |
1050 | <pre caption="Configuring Hostname"> |
1139 | # <c>echo mymachine.mydomain.com > /etc/hostname</c> |
1051 | # <c>echo mymachine.mydomain.com > /etc/hostname</c> |
1140 | </pre> |
1052 | </pre> |
1141 | </body> |
1053 | </body> |
1142 | </section> |
1054 | </section> |
1143 | </chapter> |
1055 | </chapter> |
1144 | <chapter> |
1056 | <chapter> |
1145 | <title>Modifying /etc/hosts</title> |
1057 | <title>Modifying /etc/hosts</title> |
1146 | <section> |
1058 | <section> |
1147 | <body> |
1059 | <body> |
1148 | <p>This file contains a list of ip addresses and their associated hostnames. |
1060 | <p>This file contains a list of ip addresses and their associated hostnames. |
1149 | It's used by the system to resolve the IP addresses |
1061 | It is used by the system to resolve the IP addresses |
1150 | of any hostnames that may not be in your nameservers. Here's a template for this file: |
1062 | of any hostnames that may not be in your nameservers. Here is a template for this file: |
1151 | </p> |
1063 | </p> |
1152 | <pre caption="Hosts Template"> |
1064 | <pre caption="Hosts Template"> |
1153 | 127.0.0.1 localhost |
1065 | 127.0.0.1 localhost |
1154 | <comment># the next line contains your IP for your local LAN, and your associated machine name</comment> |
1066 | <comment># the next line contains your IP for your local LAN, and your associated machine name</comment> |
1155 | 192.168.1.1 mymachine.mydomain.com mymachine |
1067 | 192.168.1.1 mymachine.mydomain.com mymachine |
1156 | </pre> |
1068 | </pre> |
1157 | <note>If you are on a DHCP network, it might be helpful to set <i>localhost</i> to your machine's |
1069 | <note>If you are on a DHCP network, it might be helpful to set <i>localhost</i> to your machine's |
1158 | actual hostname. This will help GNOME and many other programs in name resolution. |
1070 | actual hostname. This will help GNOME and many other programs in name resolution. |
1159 | </note> |
1071 | </note> |
1160 | </body> |
1072 | </body> |
1161 | </section> |
1073 | </section> |
1162 | </chapter> |
1074 | </chapter> |
1163 | <chapter> |
1075 | <chapter> |
1164 | <title>Final Network Configuration</title> |
1076 | <title>Final Network Configuration</title> |
1165 | <section> |
1077 | <section> |
1166 | <body> |
1078 | <body> |
1167 | <p>Add the names of any modules that are necessary for the proper functioning of your system to |
1079 | <p>Add the names of any modules that are necessary for the proper functioning of your system to |
1168 | <path>/etc/modules.autoload</path> file (you can also add any options you |
1080 | <path>/etc/modules.autoload</path> file (you can also add any options you |
1169 | need to the same line.) When Gentoo Linux boots, these modules will be automatically |
1081 | need to the same line.) When Gentoo Linux boots, these modules will be automatically |
1170 | loaded. Of particular importance is your ethernet card module, if you happened to compile |
1082 | loaded. Of particular importance is your ethernet card module, if you happened to compile |
1171 | it as a module: |
1083 | it as a module: |
1172 | </p> |
1084 | </p> |
1173 | <pre caption="/etc/modules.autoload"><comment>This is assuming that you are using a 3com card. |
1085 | <pre caption="/etc/modules.autoload"><comment>This is assuming that you are using a 3com card. |
1174 | Check <path>/lib/modules/`uname -r`/kernel/drivers/net</path> for your card. </comment> |
1086 | Check <path>/lib/modules/`uname -r`/kernel/drivers/net</path> for your card. </comment> |
1175 | 3c59x |
1087 | 3c59x |
1176 | </pre> |
1088 | </pre> |
1177 | <p>Edit the <path>/etc/conf.d/net</path> script to get your network configured for your |
1089 | <p>Edit the <path>/etc/conf.d/net</path> script to get your network configured for your |
1178 | first boot: </p> |
1090 | first boot: </p> |
1179 | <pre caption="Boottime Network Configuration"> |
1091 | <pre caption="Boot time Network Configuration"> |
1180 | # <c>nano -w /etc/conf.d/net</c> |
1092 | # <c>nano -w /etc/conf.d/net</c> |
1181 | # <c>rc-update add net.eth0 default</c> |
1093 | # <c>rc-update add net.eth0 default</c> |
1182 | </pre> |
1094 | </pre> |
1183 | <p>If you have multiple network cards you need to create additional <path>net.eth<comment>x</comment></path> |
1095 | <p>If you have multiple network cards you need to create additional <path>net.eth<comment>x</comment></path> |
1184 | scripts for each one (<comment>x</comment> = 1, 2, ...): </p> |
1096 | scripts for each one (<comment>x</comment> = 1, 2, ...): </p> |
1185 | <pre caption="Multiple Network Interfaces"> |
1097 | <pre caption="Multiple Network Interfaces"> |
1186 | # <c>cd /etc/init.d</c> |
1098 | # <c>cd /etc/init.d</c> |
1187 | # <c>cp net.eth0 net.eth<comment>x</comment></c> |
1099 | # <c>cp net.eth0 net.eth<comment>x</comment></c> |
1188 | # <c>rc-update add net.eth<comment>x</comment> default</c> |
1100 | # <c>rc-update add net.eth<comment>x</comment> default</c> |
1189 | </pre> |
1101 | </pre> |
1190 | <p>If you have a PCMCIA card installed, have a quick look into |
1102 | <p>If you have a PCMCIA card installed, have a quick look into |
1191 | <path>/etc/init.d/pcmcia</path> to verify that things seem all right for your setup, |
1103 | <path>/etc/init.d/pcmcia</path> to verify that things seem all right for your setup, |
1192 | then add this line to the top of <path>/etc/init.d/net.ethx</path>: |
1104 | then add this line to the top of <path>/etc/init.d/net.ethx</path>: |
1193 | </p> |
1105 | </p> |
1194 | <pre caption="PCMCIA depend in /etc/init.d/net.ethx"> |
1106 | <pre caption="PCMCIA depend in /etc/init.d/net.ethx"> |
… | |
… | |
1215 | possibilities). |
1127 | possibilities). |
1216 | </p> |
1128 | </p> |
1217 | </body> |
1129 | </body> |
1218 | </section> |
1130 | </section> |
1219 | </chapter> |
1131 | </chapter> |
1220 | <chapter> |
1132 | <chapter> |
1221 | <title>Configure a Bootloader</title> |
1133 | <title>Configure a Bootloader</title> |
1222 | <section> |
1134 | <section> |
1223 | <title>Notes</title> |
1135 | <title>Notes</title> |
1224 | <body> |
1136 | <body> |
1225 | <p> In the spirit of Gentoo, users now have more than one bootloader to choose from. |
1137 | <p> In the spirit of Gentoo, users now have more than one bootloader to choose from. |
1226 | Using our virtual package system, users are now able to choose between both GRUB and |
1138 | Using our virtual package system, users are now able to choose between both GRUB and |
1227 | LILO as their bootloaders. |
1139 | LILO as their bootloaders. |
1228 | </p> |
1140 | </p> |
1229 | <p> Please keep in mind that having both bootloaders installed is not necessary. |
1141 | <p> Please keep in mind that having both bootloaders installed is not necessary. |
1230 | In fact, it can be a hinderance, so please only choose one. |
1142 | In fact, it can be a hindrance, so please only choose one. |
1231 | </p> |
1143 | </p> |
1232 | <impo>If you are installing Gentoo Linux on a system with an NVIDIA nForce or nForce2 chipset |
1144 | <impo>If you are installing Gentoo Linux on a system with an NVIDIA nForce or nForce2 chipset |
1233 | with an integrated GeForce graphics card, you should use LILO and avoid GRUB. With on-board |
1145 | with an integrated GeForce graphics card, you should use LILO and avoid GRUB. With on-board |
1234 | video enabled, the low memory area of your RAM may be used as video RAM. Since GRUB also uses low |
1146 | video enabled, the low memory area of your RAM may be used as video RAM. Since GRUB also uses low |
1235 | memory at boot time, it may experience an "out of memory" condition. So, if you have an nForce |
1147 | memory at boot time, it may experience an "out of memory" condition. So, if you have an nForce |
1236 | or potentially other board with on-board video, use LILO. Even if you're using off-board video |
1148 | or potentially other board with on-board video, use LILO. Even if you're using off-board video |
1237 | right now, it'd be nice to be able to remove the graphics card and use the on-board video in a |
1149 | right now, it would be nice to be able to remove the graphics card and use the on-board video in a |
1238 | pinch, wouldn't it? :)</impo> |
1150 | pinch, wouldn't it? :)</impo> |
1239 | |
1151 | |
1240 | </body> |
1152 | </body> |
1241 | </section> |
1153 | </section> |
1242 | <section> |
1154 | <section> |
1243 | <title>Configuring GRUB</title> |
1155 | <title>Configuring GRUB</title> |
1244 | <body> |
1156 | <body> |
1245 | <p>The most critical part of understanding GRUB is getting comfortable with how GRUB |
1157 | <p>The most critical part of understanding GRUB is getting comfortable with how GRUB |
1246 | refers to hard drives and partitions. Your Linux partition <path>/dev/hda1</path> is called |
1158 | refers to hard drives and partitions. Your Linux partition <path>/dev/hda1</path> is called |
1247 | <path>(hd0,0)</path> under GRUB. Notice the parenthesis around the hd0,0 - they are required. |
1159 | <path>(hd0,0)</path> under GRUB. Notice the parenthesis around the hd0,0 - they are required. |
1248 | Hard drives count from zero rather than "a", and partitions start at zero rather than one. |
1160 | Hard drives count from zero rather than "a", and partitions start at zero rather than one. |
1249 | Be aware too that with the hd devices, only harddrives are counted, not atapi-ide devices such as |
1161 | Be aware too that with the hd devices, only harddrives are counted, not atapi-ide devices such as |
1250 | cdrom players, burners, and that the same construct can be used with scsi drives. |
1162 | cdrom players, burners, and that the same construct can be used with scsi drives. |
1251 | (Normally they get higher numbers than ide drives except when the bios is configured |
1163 | (Normally they get higher numbers than ide drives except when the bios is configured |
1252 | to boot from scsi devices.) Assuming you have a harddrive on /dev/hda, a cdrom player on /dev/hdb, |
1164 | to boot from scsi devices.) Assuming you have a harddrive on /dev/hda, a cdrom player on /dev/hdb, |
1253 | a burner on /dev/hdc and a second hardrive on /dev/hdd, for example, and no scsi harddrive |
1165 | a burner on /dev/hdc and a second hardrive on /dev/hdd, for example, and no scsi harddrive |
1254 | <path>/dev/hdd7</path> gets translated to <path>(hd1,6)</path>. |
1166 | <path>/dev/hdd7</path> gets translated to <path>(hd1,6)</path>. |
1255 | |
1167 | |
1256 | It might sound tricky, and tricky it is indeed, but as we will see, grub |
1168 | It might sound tricky, and tricky it is indeed, but as we will see, grub |
1257 | offers a tab completion mechanism that comes handy for those of you having |
1169 | offers a tab completion mechanism that comes handy for those of you having |
1258 | a lot of harddrives and partitions and who are a little lost in the |
1170 | a lot of harddrives and partitions and who are a little lost in the |
1259 | grub numbering scheme. Having gotten the feel for that, |
1171 | grub numbering scheme. Having gotten the feel for that, |
1260 | it's time to install GRUB. |
1172 | it is time to install GRUB. |
1261 | </p> |
1173 | </p> |
1262 | <p>The easiest way to install GRUB is to simply type <c>grub</c> at your chrooted shell prompt: </p> |
1174 | <p>The easiest way to install GRUB is to simply type <c>grub</c> at your chrooted shell prompt: </p> |
1263 | <pre caption="Installing GRUB"> |
1175 | <pre caption="Installing GRUB"> |
1264 | # <c>emerge grub</c> |
1176 | # <c>emerge grub</c> |
1265 | # <c>grub</c> |
1177 | # <c>grub</c> |
1266 | </pre> |
1178 | </pre> |
1267 | <impo>If you are using hardware RAID this part will not work at |
1179 | <impo>If you are using hardware RAID this part will not work at |
1268 | this time. |
1180 | this time. |
1269 | Skip to the section on making your <path>grub.conf</path>. After that we will complete the |
1181 | Skip to the section on making your <path>grub.conf</path>. After that we will complete the |
1270 | grub setup for RAID controllers |
1182 | grub setup for RAID controllers |
1271 | </impo> |
1183 | </impo> |
1272 | <p>You'll be presented with the <c>grub></c> grub |
1184 | <p>You will be presented with the <c>grub></c> grub |
1273 | command-line prompt. Now, you need to type in the |
1185 | command-line prompt. Now, you need to type in the |
1274 | right commands to install the GRUB boot record onto your hard drive. In my example configuration, |
1186 | right commands to install the GRUB boot record onto your hard drive. In my example configuration, |
1275 | I want to install the GRUB boot record on my hard drive's MBR (master boot record), so that |
1187 | I want to install the GRUB boot record on my hard drive's MBR (master boot record), so that |
1276 | the first thing I see when I turn on the computer is the GRUB prompt. In my case, the commands |
1188 | the first thing I see when I turn on the computer is the GRUB prompt. In my case, the commands |
1277 | I want to type are: |
1189 | I want to type are: |
1278 | </p> |
1190 | </p> |
1279 | |
1191 | |
1280 | <pre caption="GRUB on the MBR"> |
1192 | <pre caption="GRUB on the MBR"> |
1281 | grub> <c>root (hd0,0)</c> <codenote>Your boot partition</codenote> |
1193 | grub> <c>root (hd0,0)</c> <codenote>Your boot partition</codenote> |
1282 | grub> <c>setup (hd0)</c> <codenote>Where the boot record is installed, here, it is the MBR</codenote> |
1194 | grub> <c>setup (hd0)</c> <codenote>Where the boot record is installed, here, it is the MBR</codenote> |
1283 | </pre> |
1195 | </pre> |
1284 | |
1196 | |
1285 | <pre caption="GRUB not on the MBR"> |
1197 | <pre caption="GRUB not on the MBR"> |
1286 | <comment>Alternatively, if you wanted to install the bootloader somewhere other than the MBR</comment> |
1198 | <comment>Alternatively, if you wanted to install the bootloader somewhere other than the MBR</comment> |
1287 | grub> <c>root (hd0,0)</c> <codenote>Your boot partition</codenote> |
1199 | grub> <c>root (hd0,0)</c> <codenote>Your boot partition</codenote> |
1288 | grub> <c>setup (hd0,4)</c> <codenote>Where the boot record is installed, here it is /dev/hda5</codenote> |
1200 | grub> <c>setup (hd0,4)</c> <codenote>Where the boot record is installed, here it is /dev/hda5</codenote> |
1289 | grub> <c>quit</c> |
1201 | grub> <c>quit</c> |
1290 | </pre> |
1202 | </pre> |
1291 | |
1203 | |
1292 | <p>Here's how the two commands work. The first <c>root ( )</c> command tells GRUB |
1204 | <p>Here is how the two commands work. The first <c>root ( )</c> command tells GRUB |
1293 | the location of your boot partition (in our example, <path>/dev/hda1</path> or |
1205 | the location of your boot partition (in our example, <path>/dev/hda1</path> or |
1294 | <path>(hd0,0)</path> in GRUB terminology. Then, the second <c>setup ( ) |
1206 | <path>(hd0,0)</path> in GRUB terminology. Then, the second <c>setup ( ) |
1295 | </c> command tells GRUB where to install the |
1207 | </c> command tells GRUB where to install the |
1296 | boot record - it will be configured to look for its special files at the <c>root |
1208 | boot record - it will be configured to look for its special files at the <c>root |
1297 | ( )</c> location that you specified. In my case, I want the boot record on the |
1209 | ( )</c> location that you specified. In my case, I want the boot record on the |
1298 | MBR of the hard drive, so I simply specify <path>/dev/hda</path> (also known as <path>(hd0)</path>). |
1210 | MBR of the hard drive, so I simply specify <path>/dev/hda</path> (also known as <path>(hd0)</path>). |
1299 | If I were using another boot loader and wanted to set up GRUB as a secondary boot-loader, I |
1211 | If I were using another boot loader and wanted to set up GRUB as a secondary boot-loader, I |
1300 | could install GRUB to the boot record of a particular partition. In that case, |
1212 | could install GRUB to the boot record of a particular partition. In that case, |
1301 | I'd specify a particular partition rather than the entire disk. Once the GRUB |
1213 | I would specify a particular partition rather than the entire disk. Once the GRUB |
1302 | boot record has been successfully installed, you can type <c>quit</c> to quit GRUB. |
1214 | boot record has been successfully installed, you can type <c>quit</c> to quit GRUB. |
1303 | </p> |
1215 | </p> |
1304 | |
1216 | |
1305 | <note> The tab completion mechanism of grub can be used from within grub, |
1217 | <note> The tab completion mechanism of grub can be used from within grub, |
1306 | assuming you wrote <c> root (</c> and that you hit the TAB key, you would |
1218 | assuming you wrote <c> root (</c> and that you hit the TAB key, you would |
1307 | be prompted with a list of the available devices (not only harddrives), |
1219 | be prompted with a list of the available devices (not only harddrives), |
1308 | hitting the TAB key having written <c> root (hd</c>, grub would print the |
1220 | hitting the TAB key having written <c> root (hd</c>, grub would print the |
1309 | available harddrives and hitting the TAB key after writing <c> root (hd0,</c> |
1221 | available harddrives and hitting the TAB key after writing <c> root (hd0,</c> |
1310 | would make grub print the list of partitions on the first harddrive. |
1222 | would make grub print the list of partitions on the first harddrive. |
1311 | |
1223 | |
1312 | Checking the syntax of the grub location with completion should really help |
1224 | Checking the syntax of the grub location with completion should really help |
1313 | to make the right choice. |
1225 | to make the right choice. |
1314 | </note> |
1226 | </note> |
1315 | |
1227 | |
1316 | <p> |
1228 | <p> |
1317 | Gentoo Linux is now |
1229 | Gentoo Linux is now |
1318 | installed, but we need to create the <path>/boot/grub/grub.conf</path> file so that |
1230 | installed, but we need to create the <path>/boot/grub/grub.conf</path> file so that |
1319 | we get a nice GRUB boot menu when the system reboots. Here's how to do it. |
1231 | we get a nice GRUB boot menu when the system reboots. Here is how to do it. |
1320 | </p> |
1232 | </p> |
1321 | <impo>To ensure backwards compatibility with GRUB, make sure to make a link from |
1233 | <impo>To ensure backwards compatibility with GRUB, make sure to make a link from |
1322 | <i>grub.conf</i> to <i>menu.lst</i>. You can do this by doing |
1234 | <i>grub.conf</i> to <i>menu.lst</i>. You can do this by doing |
1323 | <c>ln -s /boot/grub/grub.conf /boot/grub/menu.lst </c>. </impo> |
1235 | <c>ln -s /boot/grub/grub.conf /boot/grub/menu.lst </c>. </impo> |
1324 | <p>Now, create the grub.conf file (<c>nano -w /boot/grub/grub.conf</c>), and add the following to it: |
1236 | <p>Now, create the grub.conf file (<c>nano -w /boot/grub/grub.conf</c>), and add the following to it: |
1325 | </p> |
1237 | </p> |
1326 | <pre caption="Grub.conf for GRUB"> |
1238 | <pre caption="Grub.conf for GRUB"> |
1327 | default 0 |
1239 | default 0 |
1328 | timeout 30 |
1240 | timeout 30 |
1329 | splashimage=(hd0,0)/boot/grub/splash.xpm.gz |
1241 | splashimage=(hd0,0)/boot/grub/splash.xpm.gz |
1330 | |
1242 | |
1331 | title=My example Gentoo Linux |
1243 | title=My example Gentoo Linux |
1332 | root (hd0,0) |
1244 | root (hd0,0) |
1333 | kernel (hd0,0)/boot/bzImage root=/dev/hda3 |
1245 | kernel (hd0,0)/boot/bzImage root=/dev/hda3 |
1334 | |
1246 | |
… | |
… | |
1366 | add them to the end of the <c>kernel</c> command. We're already passing one option |
1278 | add them to the end of the <c>kernel</c> command. We're already passing one option |
1367 | (<c>root=/dev/hda3</c>), but you can pass others as well. In particular, you can |
1279 | (<c>root=/dev/hda3</c>), but you can pass others as well. In particular, you can |
1368 | turn off devfs by default (not recommended unless you know what you're doing) by |
1280 | turn off devfs by default (not recommended unless you know what you're doing) by |
1369 | adding the <c>gentoo=nodevfs</c> option to the <c>kernel</c> command. |
1281 | adding the <c>gentoo=nodevfs</c> option to the <c>kernel</c> command. |
1370 | </p> |
1282 | </p> |
1371 | <note>Unlike in earlier versions of Gentoo Linux, you no longer have to add |
1283 | <note>Unlike in earlier versions of Gentoo Linux, you no longer have to add |
1372 | <c>devfs=mount</c> to the end of the <c>kernel</c> line to enable devfs. In rc6 |
1284 | <c>devfs=mount</c> to the end of the <c>kernel</c> line to enable devfs. In rc6 |
1373 | devfs is enabled by default. |
1285 | devfs is enabled by default. |
1374 | </note> |
1286 | </note> |
1375 | </body> |
1287 | </body> |
1376 | </section> |
1288 | </section> |
1377 | <section> |
1289 | <section> |
1378 | <title>Configuring LILO</title> |
1290 | <title>Configuring LILO</title> |
1379 | <body> |
1291 | <body> |
1380 | <p>While GRUB may be the new alternative for most people, it is not always the best choice. |
1292 | <p>While GRUB may be the new alternative for most people, it is not always the best choice. |
1381 | LILO, the LInuxLOader, is the tried and true workhorse of Linux bootloaders. Here's how to install |
1293 | LILO, the LInuxLOader, is the tried and true workhorse of Linux bootloaders. Here is how to install |
1382 | LILO if you would like to use it instead of GRUB: |
1294 | LILO if you would like to use it instead of GRUB: |
1383 | </p> |
1295 | </p> |
1384 | <p>The first step is to emerge LILO: |
1296 | <p>The first step is to emerge LILO: |
1385 | </p> |
1297 | </p> |
1386 | <pre caption="Emerging LILO"> |
1298 | <pre caption="Emerging LILO"> |
1387 | # <c>emerge lilo</c> |
1299 | # <c>emerge lilo</c> |
1388 | </pre> |
1300 | </pre> |
1389 | <p>Now it is time to configure LILO. I will give you a small <i>lilo.conf</i> to use, and I will explain |
1301 | <p>Now it is time to configure LILO. Here is a sample configuration file (lilo.conf) |
1390 | the different parts of the file. |
|
|
1391 | </p> |
1302 | </p> |
1392 | <pre caption="Example lilo.conf"> |
1303 | <pre caption="Example lilo.conf"> |
1393 | boot=/dev/hda |
1304 | boot=/dev/hda |
1394 | map=/boot/map |
1305 | map=/boot/map |
1395 | install=/boot/boot.b |
1306 | install=/boot/boot.b |
1396 | prompt |
1307 | prompt |
1397 | timeout=50 |
1308 | timeout=50 |
1398 | message=/boot/message |
1309 | message=/boot/message |
1399 | lba32 |
1310 | lba32 |
1400 | default=linux |
1311 | default=linux |
1401 | |
1312 | |
1402 | image=/boot/vmlinuz-2.4.20 |
1313 | image=/boot/vmlinuz-2.4.20 |
1403 | label=linux |
1314 | label=linux |
1404 | read-only |
1315 | read-only |
1405 | root=/dev/hda5 |
1316 | root=/dev/hda5 |
… | |
… | |
1448 | </section> |
1359 | </section> |
1449 | </chapter> |
1360 | </chapter> |
1450 | <chapter> |
1361 | <chapter> |
1451 | <title>Creating Bootdisks</title> |
1362 | <title>Creating Bootdisks</title> |
1452 | <section> |
1363 | <section> |
1453 | <title>GRUB Bootdisks</title> |
1364 | <title>GRUB Bootdisks</title> |
1454 | <body> |
1365 | <body> |
1455 | <p>It is always a good idea to make a boot disk the first |
1366 | <p>It is always a good idea to make a boot disk the first |
1456 | time you install any Linux distribution. This is a security |
1367 | time you install any Linux distribution. This is a security |
1457 | blanket, and generally not a bad thing to do. If you are using some kinds of hardware RAID, you may <e>need</e> make a GRUB boot |
1368 | blanket, and generally not a bad thing to do. If you are using some kinds of hardware RAID, you may <e>need</e> make a GRUB boot |
1458 | disk. With these types of hardware RAID, |
1369 | disk. With these types of hardware RAID, |
1459 | if you try to install grub from your chrooted shell it will fail. If you are in this camp, |
1370 | if you try to install grub from your chrooted shell it will fail. If you are in this camp, |
1460 | make a GRUB |
1371 | make a GRUB |
1461 | boot disk, and when you reboot the first time you can install GRUB |
1372 | boot disk, and when you reboot the first time you can install GRUB |
1462 | to the MBR. Make your |
1373 | to the MBR. Make your |
1463 | bootdisk like this: |
1374 | bootdisks like this: |
1464 | </p> |
1375 | </p> |
1465 | <pre caption="Creating a GRUB Bootdisk"> |
1376 | <pre caption="Creating a GRUB Bootdisk"> |
1466 | # <c>mke2fs /dev/fd0</c> |
1377 | # <c>mke2fs /dev/fd0</c> |
1467 | # <c>mount /dev/fd0 /mnt/floppy</c> |
1378 | # <c>mount /dev/fd0 /mnt/floppy</c> |
1468 | # <c>mkdir -p /mnt/floppy/boot/grub</c> |
1379 | # <c>mkdir -p /mnt/floppy/boot/grub</c> |
1469 | # <c>cp /usr/share/grub/i386-pc/stage1 /mnt/floppy/boot/grub/</c> |
1380 | # <c>cp /usr/share/grub/i386-pc/stage1 /mnt/floppy/boot/grub/</c> |
1470 | # <c>cp /usr/share/grub/i386-pc/stage2 /mnt/floppy/boot/grub/</c> |
1381 | # <c>cp /usr/share/grub/i386-pc/stage2 /mnt/floppy/boot/grub/</c> |
1471 | # <c>umount /mnt/floppy</c> |
1382 | # <c>umount /mnt/floppy</c> |
1472 | # <c>grub</c> |
1383 | # <c>grub</c> |
1473 | |
1384 | |
1474 | grub> <c>root (fd0)</c> |
1385 | grub> <c>root (fd0)</c> |
1475 | grub> <c>setup (fd0)</c> |
1386 | grub> <c>setup (fd0)</c> |
1476 | grub> <c>quit</c> |
1387 | grub> <c>quit</c> |
1477 | </pre> |
1388 | </pre> |
1478 | <p>Now reboot and load the floppy. At the floppy's <c>grub></c> prompt, you can now execute the necessary <c>root</c> |
1389 | <p>Now reboot and load the floppy. At the floppy's <c>grub></c> prompt, you can now execute the necessary <c>root</c> |
… | |
… | |
1483 | <title>LILO Bootdisks</title> |
1394 | <title>LILO Bootdisks</title> |
1484 | <body> |
1395 | <body> |
1485 | <p>If you are using LILO, it is also a good idea to make a bootdisk: |
1396 | <p>If you are using LILO, it is also a good idea to make a bootdisk: |
1486 | </p> |
1397 | </p> |
1487 | <pre caption="Making a LILO Bootdisk"> |
1398 | <pre caption="Making a LILO Bootdisk"> |
1488 | # <c>dd if=/boot/your_kernel of=/dev/fd0 </c> |
1399 | # <c>dd if=/boot/your_kernel of=/dev/fd0 </c> |
1489 | <comment>This will only work if your kernel is smaller than 1.4MB</comment> |
1400 | <comment>This will only work if your kernel is smaller than 1.4MB</comment> |
1490 | </pre> |
1401 | </pre> |
1491 | </body> |
1402 | </body> |
1492 | </section> |
1403 | </section> |
1493 | </chapter> |
1404 | </chapter> |
1494 | <chapter> |
1405 | <chapter> |
1495 | <title>Installation Complete!</title> |
1406 | <title>Installation Complete!</title> |
1496 | <section> |
1407 | <section> |
1497 | <body> |
1408 | <body> |
1498 | <p>Now, Gentoo Linux is installed. The only remaining step is to exit the chrooted shell, |
1409 | <p>Now, Gentoo Linux is installed. The only remaining step is to update necessary configuration files, exit the chrooted shell, |
1499 | update necessary configuration files, |
1410 | |
1500 | safely unmount your partitions |
1411 | safely unmount your partitions |
1501 | and reboot the system: |
1412 | and reboot the system: |
1502 | </p> |
1413 | </p> |
1503 | <pre caption="Rebooting the System"> |
1414 | <pre caption="Rebooting the System"> |
1504 | # <c>etc-update</c> |
1415 | # <c>etc-update</c> |
1505 | # <c>exit</c> |
1416 | # <c>exit</c> |
1506 | <codenote>This exits the chrooted shell; you can also type <c>^D</c></codenote> |
1417 | <codenote>This exits the chrooted shell; you can also type <c>^D</c></codenote> |
1507 | # <c>cd / </c> |
1418 | # <c>cd / </c> |
1508 | # <c>umount /mnt/gentoo/boot</c> |
1419 | # <c>umount /mnt/gentoo/boot</c> |
1509 | # <c>umount /mnt/gentoo/proc</c> |
1420 | # <c>umount /mnt/gentoo/proc</c> |
1510 | # <c>umount /mnt/gentoo/dev</c> |
1421 | # <c>umount /mnt/gentoo/dev</c> |
1511 | # <c>umount /mnt/gentoo</c> |
1422 | # <c>umount /mnt/gentoo</c> |
1512 | # <c>reboot</c> |
1423 | # <c>reboot</c> |
1513 | </pre> |
1424 | </pre> |
1514 | <note> |
1425 | <note> |
1515 | After rebooting, it is a good idea to run the <c>update-modules</c> command to create |
1426 | After rebooting, it is a good idea to run the <c>update-modules</c> command to create |
1516 | the <path>/etc/modules.conf</path> file. Instead of modifying this file directly, you should |
1427 | the <path>/etc/modules.conf</path> file. Instead of modifying this file directly, you should |
1517 | generally make changes to the files in <path>/etc/modules.d</path>. |
1428 | generally make changes to the files in <path>/etc/modules.d</path>. |
1518 | </note> |
1429 | </note> |
1519 | <impo>Remember if you are running hardware RAID, you must |
1430 | <impo>Remember if you are running hardware RAID, you must |
1520 | use the bootdisk for the first reboot. |
1431 | use the bootdisk for the first reboot. |
1521 | then go back and install grub the way everyone else did the first |
1432 | then go back and install grub the way everyone else did the first |
1522 | time. You are done -- congratulations!</impo> |
1433 | time. You are done -- congratulations!</impo> |
1523 | <p>If you have any questions or would like to get involved with Gentoo Linux development, |
1434 | <p>If you have any questions or would like to get involved with Gentoo Linux development, |
1524 | consider joining our gentoo-user and gentoo-dev mailing lists |
1435 | consider joining our gentoo-user and gentoo-dev mailing lists |
1525 | (there's a "click to subscribe" link on our <uri link="http://www.gentoo.org">main page</uri>). |
1436 | (there is a "click to subscribe" link on our <uri link="http://www.gentoo.org">main page</uri>). |
1526 | We also have a handy <uri link="http://www.gentoo.org/doc/en/desktop.xml">Desktop configuration guide</uri> |
1437 | We also have a handy <uri link="http://www.gentoo.org/doc/en/desktop.xml">Desktop configuration guide</uri> |
1527 | that will |
1438 | that will |
1528 | help you to continue configuring your new Gentoo Linux system, and a useful |
1439 | help you to continue configuring your new Gentoo Linux system, and a useful |
1529 | <uri link="http://www.gentoo.org/doc/en/portage-user.xml">Portage user guide</uri> |
1440 | <uri link="http://www.gentoo.org/doc/en/portage-user.xml">Portage user guide</uri> |
1530 | to help familiarize you with Portage basics. You can find the rest of the Gentoo Documentation |
1441 | to help familiarize you with Portage basics. You can find the rest of the Gentoo Documentation |
1531 | <uri link="http://www.gentoo.org/main/en/docs.xml">here</uri>. If you have any other questions |
1442 | <uri link="http://www.gentoo.org/main/en/docs.xml">here</uri>. If you have any other questions |
1532 | involving installation or anything for that matter, please check the Gentoo Linux |
1443 | involving installation or anything for that matter, please check the Gentoo Linux |
1533 | <uri link="http://www.gentoo.org/doc/en/faq.xml">FAQ</uri>. |
1444 | <uri link="http://www.gentoo.org/doc/en/faq.xml">FAQ</uri>. |
1534 | Enjoy and welcome to Gentoo Linux! |
1445 | Enjoy and welcome to Gentoo Linux! |
1535 | </p> |
1446 | </p> |
1536 | </body> |
1447 | </body> |
1537 | </section> |
1448 | </section> |
1538 | </chapter> |
1449 | </chapter> |
1539 | <chapter> |
1450 | <chapter> |
1540 | <title>Gentoo-Stats</title> |
1451 | <title>Gentoo-Stats</title> |
… | |
… | |
1574 | <pre caption="Installing gentoo-stats"> |
1485 | <pre caption="Installing gentoo-stats"> |
1575 | # <c>emerge gentoo-stats</c> <codenote>Installs gentoo-stats</codenote> |
1486 | # <c>emerge gentoo-stats</c> <codenote>Installs gentoo-stats</codenote> |
1576 | # <c>gentoo-stats --new</c> <codenote>Obtains a new system ID</codenote> |
1487 | # <c>gentoo-stats --new</c> <codenote>Obtains a new system ID</codenote> |
1577 | </pre> |
1488 | </pre> |
1578 | <p>The second command above will request a new system ID and enter it into |
1489 | <p>The second command above will request a new system ID and enter it into |
1579 | <path>/etc/gentoo-stats/gentoo-stats.conf</path> automatically. You can view this file |
1490 | <path>/etc/gentoo-stats/gentoo-stats.conf</path> automatically. You can view this file |
1580 | to see additional configuration options. |
1491 | to see additional configuration options. |
1581 | </p> |
1492 | </p> |
1582 | <p>After that, the program should be run on a regular schedule |
1493 | <p>After that, the program should be run on a regular schedule |
1583 | (gentoo-stats does not have to be run as root). Add this line to your <path>crontab</path>: |
1494 | (gentoo-stats does not have to be run as root). Add this line to your <path>crontab</path>: |
1584 | </p> |
1495 | </p> |
1585 | <pre caption="Updating gentoo-stats with cron"> |
1496 | <pre caption="Updating gentoo-stats with cron"> |
1586 | <c>0 0 * * 0,4 /usr/sbin/gentoo-stats --update > /dev/null</c> |
1497 | <c>0 0 * * 0,4 /usr/sbin/gentoo-stats --update > /dev/null</c> |
1587 | </pre> |
1498 | </pre> |
1588 | <p>The <c>gentoo-stats</c> program is a simple perl script which can be |
1499 | <p>The <c>gentoo-stats</c> program is a simple perl script which can be |
1589 | viewed with your favortive pager or editor: <path>/usr/sbin/gentoo-stats</path>. </p> |
1500 | viewed with your favorite pager or editor: <path>/usr/sbin/gentoo-stats</path>. </p> |
1590 | </body> |
1501 | </body> |
1591 | </section> |
1502 | </section> |
1592 | </chapter> |
1503 | </chapter> |
1593 | </guide> |
1504 | </guide> |