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

Contents of /xml/htdocs/doc/en/gentoo-x86-tipsntricks.xml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (hide annotations) (download) (as text)
Sun Apr 11 14:58:27 2004 UTC (10 years, 8 months ago) by swift
Branch: MAIN
Changes since 1.2: +103 -0 lines
File MIME type: application/xml
#44332 - Inform users how they can leave their terminal unattended safely when installing gentoo. Using screen or nohup

1 swift 1.1 <?xml version='1.0' encoding="UTF-8"?>
2     <!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
3    
4     <guide link="/doc/en/gentoo-x86-tipsntricks.xml">
5     <title>Gentoo/x86 Installation Tips &amp; Tricks</title>
6     <author title="Author">
7     <mail link="swift@gentoo.org">Sven Vermeulen</mail>
8     </author>
9    
10     <abstract>
11     The Gentoo installation allows for very flexible approaches to the various
12     installation methods. As it is almost impossible to insert every single tip or
13     trick in the installation instructions this document tries to deal with all
14     submitted tips and tricks for reference purposes.
15     </abstract>
16    
17     <license/>
18    
19     <version>1.0</version>
20     <date>April 11, 2004</date>
21    
22     <chapter>
23     <title>Introduction</title>
24     <section>
25     <title>Preliminary</title>
26     <body>
27    
28     <p>
29     This document contains various tips and tricks for the Gentoo/x86 installation.
30     Most of them are discussed in a dense way - they are meant as an addendum to the
31     installation instructions and not as a replacement.
32     </p>
33    
34     </body>
35     </section>
36     <section>
37     <title>Contents</title>
38     <body>
39    
40 swift 1.2 <p>
41     <b>Advanced Installations</b>
42     </p>
43    
44 swift 1.1 <ul>
45     <li><uri link="#software-raid">Software RAID</uri></li>
46     </ul>
47    
48 swift 1.3 <p>
49     <b>Simplifying the Installation</b>
50     </p>
51    
52     <ul>
53     <li><uri link="#leave_terminal">Leaving the Terminal</uri></li>
54     </ul>
55    
56 swift 1.1 </body>
57     </section>
58     </chapter>
59     <chapter>
60     <title>Advanced Installations</title>
61     <section id="software-raid">
62     <title>Software RAID</title>
63     <body>
64    
65     <note>
66     If you are not known to software raid, please read the <uri
67     link="http://tldp.org/HOWTO/Software-RAID-HOWTO.html">Software-RAID-HOWTO</uri>.
68     </note>
69    
70     <p>
71     Once you are booted from the LiveCD, load the appropriate RAID modules. For
72     instance, if you plan on using RAID-1:
73     </p>
74    
75     <pre caption="Loading the RAID-1 module">
76     # <i>modprobe raid1</i>
77     </pre>
78    
79     <p>
80     When you partition your disks, make sure that your partitions use <c>fd</c>
81     (Linux raid autodetect) as Partition Type instead of <c>83</c> (Linux native).
82     You can alter the partition type using the <c>t</c> command in <c>fdisk</c>.
83     </p>
84    
85     <p>
86     After partitioning, create the <path>/etc/raidtab</path> file (yes, indeed, on
87     the LiveCD environment) and insert the necessary commands for your RAID setup.
88     For instance, to have your boot, swap and root partition mirrored (RAID-1)
89     covering <path>/dev/sda</path> and <path>/dev/sdb</path>, you can use:
90     </p>
91    
92     <pre caption="/etc/raidtab for RAID-1 setup">
93     raiddev /dev/md0
94     raid-level 1
95     nr-raid-disks 2
96     chunk-size 32
97     persistent-superblock 1
98     device /dev/sda1
99     raid-disk 0
100     device /dev/sdb1
101     raid-disk 1
102    
103     raiddev /dev/md1
104     raid-level 1
105     nr-raid-disks 2
106     chunk-size 32
107     persistent-superblock 1
108     device /dev/sda2
109     raid-disk 0
110     device /dev/sdb2
111     raid-disk 1
112    
113     raiddev /dev/md2
114     raid-level 1
115     nr-raid-disks 2
116     chunk-size 32
117     persistent-superblock 1
118     device /dev/sda3
119     raid-disk 0
120     device /dev/sdb3
121     raid-disk 1
122     </pre>
123    
124     <p>
125     Now create the necessary RAID devices for each RAID device you listed in
126     <path>/etc/raidtab</path>:
127     </p>
128    
129     <pre caption="Creating RAID devices">
130     # <i>mkraid /dev/md0</i>
131     # <i>mkraid /dev/md1</i>
132     # <i>mkraid /dev/md2</i>
133     </pre>
134    
135     <p>
136     The Linux Software RAID driver will start creating the metadevices. You can see
137     its progress in <path>/proc/mdstat</path>. Wait until the metadevices are
138     completely finished before proceeding.
139     </p>
140    
141     <p>
142     From now onwards, use <path>/dev/md0</path> for the boot partition,
143     <path>/dev/md1</path> for the swap partition and <path>/dev/md2</path> for the
144     root partition.
145     </p>
146    
147     <p>
148     After mounting <path>/dev/md2</path> on <path>/mnt/gentoo</path>, don't forget
149     to copy over <path>/etc/raidtab</path> to <path>/mnt/gentoo/etc</path>.
150     </p>
151    
152     <p>
153     When you're configuring your kernel, make sure you have the appropriate RAID
154     support <e>in</e> your kernel and not as module.
155     </p>
156    
157     <p>
158     When installing extra tools, emerge <c>raidtools</c> as well. Note that this
159     isn't available on all LiveCDs so you might not be able to install Gentoo on a
160     Software RAID when using a networkless installation!
161     </p>
162    
163     <p>
164     When configuring your bootloader, make sure it gets installed in the MBR of
165     <e>both</e> disks if you use mirroring.
166     </p>
167    
168     </body>
169     </section>
170     </chapter>
171 swift 1.3
172     <chapter>
173     <title>Simplifying the Installation</title>
174     <section id="leave_terminal">
175     <title>Leaving your Terminal</title>
176     <body>
177    
178     <p>
179     Many people want to leave their system when it's compiling. In certain cases
180     this is rather difficult as the installation is done in a public environment
181     where you cannot trust everyone. If this is the case, you want to be able to
182     perform the compilation in the background and log out from all terminals.
183     </p>
184    
185     <p>
186     There are several possible solutions for this. The first one is to use
187     <c>screen</c>. After booting the LiveCD, set your root password and start a
188     screen session:
189     </p>
190    
191     <note>
192     Not all LiveCDs provide screen. If this is the case, you will have to use one of
193     the other methods described in this section.
194     </note>
195    
196     <pre caption="Starting a screen session">
197     # <i>screen -S gentoo</i>
198     </pre>
199    
200     <p>
201     Once inside the screen session you can perform the entire installation. When you
202     want to leave your terminal, press <c>Ctrl-a, d</c> (that is, control and a at
203     the same time, then followed by a d) to <e>detach</e> your screen session. You
204     can now safely log out of your system.
205     </p>
206    
207     <p>
208     To regain access to your terminal, log in as root again and <e>attach</e> to
209     the running screen session:
210     </p>
211    
212     <pre caption="Attaching to a screen session">
213     # <i>screen -x gentoo</i>
214     </pre>
215    
216     <p>
217     If you can't use screen, there is still a way to leave your terminal. Follow the
218     installation instructions, but when you come to the point where a long-term
219     compilation would be started (for instance the <c>./scripts/bootstrap.sh</c>
220     step), use <c>nohup</c> which allows for a process to continue even when you log
221     out. Don't forget the trailing "&amp;", otherwise the process won't be placed in
222     the background! Remember where you are (the <c>pwd</c> command will show you
223     that) as you will need to know this later on.
224     </p>
225    
226     <pre caption="Using nohup">
227     # <i>pwd</i>
228     /usr/portage
229     # <i>nohup ./scripts/bootstrap.sh &amp;</i>
230     </pre>
231    
232     <p>
233     Now exit the chrooted environment (<c>exit</c>) and the LiveCD session. Your
234     compilation will continue in the background.
235     </p>
236    
237     <p>
238     When you want to check the compilation, log in as root (on the LiveCD) and
239     chroot back into your environment and go to the directory where you left off:
240     </p>
241    
242     <pre caption="Chrooting back">
243     # <i>chroot /mnt/gentoo /bin/bash</i>
244     # <i>env-update &amp;&amp; source /etc/profile</i>
245     # <i>cd /usr/portage</i>
246     </pre>
247    
248     <p>
249     Now use the <c>less</c> command on the <path>nohup.out</path> file that is
250     situated inside that directory. The compilation will append its output to that
251     file, so if you want to follow the compilation progress, run <c>less
252     nohup.out</c> and press <c>F</c> to follow the changes. When the compilation is
253     finished, you can continue with the next step of the installation instructions.
254     </p>
255    
256     <p>
257     If you ever get tired of following the changes, press <c>Ctrl-C</c> followed by
258     a <c>q</c>. This won't stop the compilation process, only the <c>less</c>
259     process.
260     </p>
261    
262     </body>
263     </section>
264     </chapter>
265    
266 swift 1.1 </guide>

  ViewVC Help
Powered by ViewVC 1.1.20