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

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

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

Revision 1.2 Revision 1.3
41<b>Advanced Installations</b> 41<b>Advanced Installations</b>
42</p> 42</p>
43 43
44<ul> 44<ul>
45 <li><uri link="#software-raid">Software RAID</uri></li> 45 <li><uri link="#software-raid">Software RAID</uri></li>
46</ul>
47
48<p>
49<b>Simplifying the Installation</b>
50</p>
51
52<ul>
53 <li><uri link="#leave_terminal">Leaving the Terminal</uri></li>
46</ul> 54</ul>
47 55
48</body> 56</body>
49</section> 57</section>
50</chapter> 58</chapter>
158</p> 166</p>
159 167
160</body> 168</body>
161</section> 169</section>
162</chapter> 170</chapter>
171
172<chapter>
173<title>Simplifying the Installation</title>
174<section id="leave_terminal">
175<title>Leaving your Terminal</title>
176<body>
177
178<p>
179Many people want to leave their system when it's compiling. In certain cases
180this is rather difficult as the installation is done in a public environment
181where you cannot trust everyone. If this is the case, you want to be able to
182perform the compilation in the background and log out from all terminals.
183</p>
184
185<p>
186There 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
188screen session:
189</p>
190
191<note>
192Not all LiveCDs provide screen. If this is the case, you will have to use one of
193the 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>
201Once inside the screen session you can perform the entire installation. When you
202want to leave your terminal, press <c>Ctrl-a, d</c> (that is, control and a at
203the same time, then followed by a d) to <e>detach</e> your screen session. You
204can now safely log out of your system.
205</p>
206
207<p>
208To regain access to your terminal, log in as root again and <e>attach</e> to
209the 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>
217If you can't use screen, there is still a way to leave your terminal. Follow the
218installation instructions, but when you come to the point where a long-term
219compilation would be started (for instance the <c>./scripts/bootstrap.sh</c>
220step), use <c>nohup</c> which allows for a process to continue even when you log
221out. Don't forget the trailing "&amp;", otherwise the process won't be placed in
222the background! Remember where you are (the <c>pwd</c> command will show you
223that) 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>
233Now exit the chrooted environment (<c>exit</c>) and the LiveCD session. Your
234compilation will continue in the background.
235</p>
236
237<p>
238When you want to check the compilation, log in as root (on the LiveCD) and
239chroot 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>
249Now use the <c>less</c> command on the <path>nohup.out</path> file that is
250situated inside that directory. The compilation will append its output to that
251file, so if you want to follow the compilation progress, run <c>less
252nohup.out</c> and press <c>F</c> to follow the changes. When the compilation is
253finished, you can continue with the next step of the installation instructions.
254</p>
255
256<p>
257If you ever get tired of following the changes, press <c>Ctrl-C</c> followed by
258a <c>q</c>. This won't stop the compilation process, only the <c>less</c>
259process.
260</p>
261
262</body>
263</section>
264</chapter>
265
163</guide> 266</guide>

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

  ViewVC Help
Powered by ViewVC 1.1.20