8793 lines
342 KiB
HTML
8793 lines
342 KiB
HTML
<!DOCTYPE html>
|
||
<html>
|
||
<head>
|
||
<meta charset="utf-8">
|
||
<title>
|
||
Live Systems Manual
|
||
</title>
|
||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
||
<meta name="dc.title" content="Live Systems Manual" />
|
||
<meta name="dc.author" content="Live Systems Project <debian-live@lists.debian.org>" />
|
||
<meta name="dc.publisher" content="Live Systems Project <debian-live@lists.debian.org>" />
|
||
<meta name="dc.date" content="2015-09-22" />
|
||
<meta name="dc.rights" content="Copyright: Copyright (C) 2006-2015 Live Systems Project \\ License: This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. \\ \\ This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. \\ \\ You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/. \\ \\ The complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL-3 file." />
|
||
|
||
<meta name="generator" content="SiSU 7.2.1_pre_rel of 2019w35/4 (2019-09-05) (n*x and Ruby!)" />
|
||
<link rel="generator" href="http://www.sisudoc.org/" />
|
||
<link rel="shortcut icon" href="../_sisu/image/rb7.ico" />
|
||
|
||
<link href="../_sisu/css/html.css" rel="stylesheet"> <link href="../../_sisu/css/html.css" rel="stylesheet">
|
||
</head>
|
||
<body lang="en">
|
||
<a name="top" id="top"></a>
|
||
|
||
<table summary="table of contents scroll navigation band" id="toc" width="100%" bgcolor="#ffffff">
|
||
<tr><td width="20%">
|
||
<table summary="home button / home information" border="0" cellpadding="3" cellspacing="0">
|
||
<tr><td align="left" bgcolor="#ffffff">
|
||
<p class="tiny_left"><a href="http://debian-live.alioth.debian.org/manual" target="_top">
|
||
Live manual
|
||
</a></p>
|
||
<p class="tiny_left"><a href="http://debian-live.alioth.debian.org" target="_top">
|
||
Live Systems
|
||
</a></p>
|
||
</td></tr>
|
||
</table>
|
||
</td>
|
||
<td width="75%" align="center">
|
||
|
||
<table summary="segment navigation available documents types: toc,doc,pdf,concordance" border="0" cellpadding="3" cellspacing="0">
|
||
<tr>
|
||
<td align="center" bgcolor="#ffffff">
|
||
|
||
|
||
</tr></table>
|
||
</td>
|
||
<td width="20%">
|
||
|
||
</td></tr>
|
||
</table>
|
||
<p>
|
||
|
||
<table summary="scroll instrument cover band" width="100%" border="0" cellpadding="8" align="center">
|
||
<tr><td align="center">
|
||
|
||
<p class="centerbold">Live Systems Manual
|
||
</p>
|
||
|
||
<p class="centerbold">Live Systems Project <debian-live@lists.debian.org>
|
||
</p>
|
||
|
||
</td></tr>
|
||
</table>
|
||
|
||
<p class="small_left">Rights: Copyright: Copyright (C) 2006-2015 Live Systems Project <br> License: This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. <br> <br> This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. <br> <br> You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/. <br> <br> The complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL-3 file.</p>
|
||
<p>
|
||
|
||
<br>
|
||
|
||
<h1 class="toc">
|
||
<b><a href="#1">Live Systems Manual</a></b>
|
||
</h1>
|
||
|
||
<br>
|
||
|
||
<h1 class="toc">
|
||
<b><a href="#2">About</a></b>
|
||
</h1>
|
||
|
||
<br>
|
||
|
||
<h1 class="toc">
|
||
<b><a href="#3">About this manual</a></b>
|
||
</h1>
|
||
|
||
<h4 class="toc">
|
||
<a href="#4">1. About this manual</a>
|
||
</h4>
|
||
|
||
<h5 class="toc">
|
||
<a href="#8">1.1 For the impatient</a>
|
||
</h5>
|
||
|
||
<h5 class="toc">
|
||
<a href="#12">1.2 Terms</a>
|
||
</h5>
|
||
|
||
<h5 class="toc">
|
||
<a href="#29">1.3 Authors</a>
|
||
</h5>
|
||
|
||
<h5 class="toc">
|
||
<a href="#44">1.4 Contributing to this document</a>
|
||
</h5>
|
||
|
||
<h6 class="toc">
|
||
<a href="#46">1.4.1 Applying changes</a>
|
||
</h6>
|
||
|
||
<h6 class="toc">
|
||
<a href="#60">1.4.2 Translation</a>
|
||
</h6>
|
||
|
||
<br>
|
||
|
||
<h1 class="toc">
|
||
<b><a href="#73">About the Live Systems Project</a></b>
|
||
</h1>
|
||
|
||
<h4 class="toc">
|
||
<a href="#74">2. About the Live Systems Project</a>
|
||
</h4>
|
||
|
||
<h5 class="toc">
|
||
<a href="#75">2.1 Motivation</a>
|
||
</h5>
|
||
|
||
<h6 class="toc">
|
||
<a href="#76">2.1.1 What is wrong with current live systems</a>
|
||
</h6>
|
||
|
||
<h6 class="toc">
|
||
<a href="#86">2.1.2 Why create our own live system?</a>
|
||
</h6>
|
||
|
||
<h5 class="toc">
|
||
<a href="#94">2.2 Philosophy</a>
|
||
</h5>
|
||
|
||
<h6 class="toc">
|
||
<a href="#95">2.2.1 Only unchanged packages from Debian "main"</a>
|
||
</h6>
|
||
|
||
<h6 class="toc">
|
||
<a href="#99">2.2.2 No package configuration of the live system</a>
|
||
</h6>
|
||
|
||
<h5 class="toc">
|
||
<a href="#103">2.3 Contact</a>
|
||
</h5>
|
||
|
||
<br>
|
||
|
||
<h1 class="toc">
|
||
<b><a href="#107">User</a></b>
|
||
</h1>
|
||
|
||
<br>
|
||
|
||
<h1 class="toc">
|
||
<b><a href="#108">Installation</a></b>
|
||
</h1>
|
||
|
||
<h4 class="toc">
|
||
<a href="#109">3. Installation</a>
|
||
</h4>
|
||
|
||
<h5 class="toc">
|
||
<a href="#110">3.1 Requirements</a>
|
||
</h5>
|
||
|
||
<h5 class="toc">
|
||
<a href="#118">3.2 Installing live-build</a>
|
||
</h5>
|
||
|
||
<h6 class="toc">
|
||
<a href="#124">3.2.1 From the Debian repository</a>
|
||
</h6>
|
||
|
||
<h6 class="toc">
|
||
<a href="#127">3.2.2 From source</a>
|
||
</h6>
|
||
|
||
<h6 class="toc">
|
||
<a href="#138">3.2.3 From 'snapshots'</a>
|
||
</h6>
|
||
|
||
<h5 class="toc">
|
||
<a href="#140">3.3 Installing live-boot and live-config</a>
|
||
</h5>
|
||
|
||
<h6 class="toc">
|
||
<a href="#142">3.3.1 From the Debian repository</a>
|
||
</h6>
|
||
|
||
<h6 class="toc">
|
||
<a href="#144">3.3.2 From source</a>
|
||
</h6>
|
||
|
||
<h6 class="toc">
|
||
<a href="#156">3.3.3 From 'snapshots'</a>
|
||
</h6>
|
||
|
||
<br>
|
||
|
||
<h1 class="toc">
|
||
<b><a href="#158">The basics</a></b>
|
||
</h1>
|
||
|
||
<h4 class="toc">
|
||
<a href="#159">4. The basics</a>
|
||
</h4>
|
||
|
||
<h5 class="toc">
|
||
<a href="#163">4.1 What is a live system?</a>
|
||
</h5>
|
||
|
||
<h5 class="toc">
|
||
<a href="#171">4.2 Downloading prebuilt images</a>
|
||
</h5>
|
||
|
||
<h5 class="toc">
|
||
<a href="#173">4.3 Using the web live image builder</a>
|
||
</h5>
|
||
|
||
<h6 class="toc">
|
||
<a href="#175">4.3.1 Web builder usage and caveats</a>
|
||
</h6>
|
||
|
||
<h5 class="toc">
|
||
<a href="#179">4.4 First steps: building an ISO hybrid image</a>
|
||
</h5>
|
||
|
||
<h5 class="toc">
|
||
<a href="#190">4.5 Using an ISO hybrid live image</a>
|
||
</h5>
|
||
|
||
<h6 class="toc">
|
||
<a href="#192">4.5.1 Burning an ISO image to a physical medium</a>
|
||
</h6>
|
||
|
||
<h6 class="toc">
|
||
<a href="#195">4.5.2 Copying an ISO hybrid image to a USB stick</a>
|
||
</h6>
|
||
|
||
<h6 class="toc">
|
||
<a href="#200">4.5.3 Using the space left on a USB stick</a>
|
||
</h6>
|
||
|
||
<h6 class="toc">
|
||
<a href="#207">4.5.4 Booting the live medium</a>
|
||
</h6>
|
||
|
||
<h5 class="toc">
|
||
<a href="#211">4.6 Using a virtual machine for testing</a>
|
||
</h5>
|
||
|
||
<h6 class="toc">
|
||
<a href="#218">4.6.1 Testing an ISO image with QEMU</a>
|
||
</h6>
|
||
|
||
<h6 class="toc">
|
||
<a href="#225">4.6.2 Testing an ISO image with VirtualBox</a>
|
||
</h6>
|
||
|
||
<h5 class="toc">
|
||
<a href="#233">4.7 Building and using an HDD image</a>
|
||
</h5>
|
||
|
||
<h5 class="toc">
|
||
<a href="#245">4.8 Building a netboot image</a>
|
||
</h5>
|
||
|
||
<h6 class="toc">
|
||
<a href="#258">4.8.1 DHCP server</a>
|
||
</h6>
|
||
|
||
<h6 class="toc">
|
||
<a href="#262">4.8.2 TFTP server</a>
|
||
</h6>
|
||
|
||
<h6 class="toc">
|
||
<a href="#267">4.8.3 NFS server</a>
|
||
</h6>
|
||
|
||
<h6 class="toc">
|
||
<a href="#275">4.8.4 Netboot testing HowTo</a>
|
||
</h6>
|
||
|
||
<h6 class="toc">
|
||
<a href="#278">4.8.5 Qemu</a>
|
||
</h6>
|
||
|
||
<h5 class="toc">
|
||
<a href="#284">4.9 Webbooting</a>
|
||
</h5>
|
||
|
||
<h6 class="toc">
|
||
<a href="#286">4.9.1 Getting the webboot files</a>
|
||
</h6>
|
||
|
||
<h6 class="toc">
|
||
<a href="#292">4.9.2 Booting webboot images</a>
|
||
</h6>
|
||
|
||
<br>
|
||
|
||
<h1 class="toc">
|
||
<b><a href="#297">Overview of tools</a></b>
|
||
</h1>
|
||
|
||
<h4 class="toc">
|
||
<a href="#298">5. Overview of tools</a>
|
||
</h4>
|
||
|
||
<h5 class="toc">
|
||
<a href="#300">5.1 The live-build package</a>
|
||
</h5>
|
||
|
||
<h6 class="toc">
|
||
<a href="#310">5.1.1 The <tt>lb config</tt> command</a>
|
||
</h6>
|
||
|
||
<h6 class="toc">
|
||
<a href="#320">5.1.2 The <tt>lb build</tt> command</a>
|
||
</h6>
|
||
|
||
<h6 class="toc">
|
||
<a href="#322">5.1.3 The <tt>lb clean</tt> command</a>
|
||
</h6>
|
||
|
||
<h5 class="toc">
|
||
<a href="#324">5.2 The live-boot package</a>
|
||
</h5>
|
||
|
||
<h5 class="toc">
|
||
<a href="#328">5.3 The live-config package</a>
|
||
</h5>
|
||
|
||
<br>
|
||
|
||
<h1 class="toc">
|
||
<b><a href="#330">Managing a configuration</a></b>
|
||
</h1>
|
||
|
||
<h4 class="toc">
|
||
<a href="#331">6. Managing a configuration</a>
|
||
</h4>
|
||
|
||
<h5 class="toc">
|
||
<a href="#333">6.1 Dealing with configuration changes</a>
|
||
</h5>
|
||
|
||
<h6 class="toc">
|
||
<a href="#335">6.1.1 Why use auto scripts? What do they do?</a>
|
||
</h6>
|
||
|
||
<h6 class="toc">
|
||
<a href="#338">6.1.2 Use example auto scripts</a>
|
||
</h6>
|
||
|
||
<h5 class="toc">
|
||
<a href="#345">6.2 Clone a configuration published via Git</a>
|
||
</h5>
|
||
|
||
<br>
|
||
|
||
<h1 class="toc">
|
||
<b><a href="#356">Customizing contents</a></b>
|
||
</h1>
|
||
|
||
<h4 class="toc">
|
||
<a href="#357">7. Customization overview</a>
|
||
</h4>
|
||
|
||
<h5 class="toc">
|
||
<a href="#359">7.1 Build time vs. boot time configuration</a>
|
||
</h5>
|
||
|
||
<h5 class="toc">
|
||
<a href="#362">7.2 Stages of the build</a>
|
||
</h5>
|
||
|
||
<h5 class="toc">
|
||
<a href="#365">7.3 Supplement lb config with files</a>
|
||
</h5>
|
||
|
||
<h5 class="toc">
|
||
<a href="#367">7.4 Customization tasks</a>
|
||
</h5>
|
||
|
||
<br>
|
||
|
||
<h1 class="toc">
|
||
<b><a href="#369">Customizing package installation</a></b>
|
||
</h1>
|
||
|
||
<h4 class="toc">
|
||
<a href="#370">8. Customizing package installation</a>
|
||
</h4>
|
||
|
||
<h5 class="toc">
|
||
<a href="#372">8.1 Package sources</a>
|
||
</h5>
|
||
|
||
<h6 class="toc">
|
||
<a href="#373">8.1.1 Distribution, archive areas and mode</a>
|
||
</h6>
|
||
|
||
<h6 class="toc">
|
||
<a href="#380">8.1.2 Distribution mirrors</a>
|
||
</h6>
|
||
|
||
<h6 class="toc">
|
||
<a href="#382">8.1.3 Distribution mirrors used at build time</a>
|
||
</h6>
|
||
|
||
<h6 class="toc">
|
||
<a href="#386">8.1.4 Distribution mirrors used at run time</a>
|
||
</h6>
|
||
|
||
<h6 class="toc">
|
||
<a href="#389">8.1.5 Additional repositories</a>
|
||
</h6>
|
||
|
||
<h5 class="toc">
|
||
<a href="#397">8.2 Choosing packages to install</a>
|
||
</h5>
|
||
|
||
<h6 class="toc">
|
||
<a href="#399">8.2.1 Package lists</a>
|
||
</h6>
|
||
|
||
<h6 class="toc">
|
||
<a href="#402">8.2.2 Using metapackages</a>
|
||
</h6>
|
||
|
||
<h6 class="toc">
|
||
<a href="#410">8.2.3 Local package lists</a>
|
||
</h6>
|
||
|
||
<h6 class="toc">
|
||
<a href="#414">8.2.4 Local binary package lists</a>
|
||
</h6>
|
||
|
||
<h6 class="toc">
|
||
<a href="#416">8.2.5 Generated package lists</a>
|
||
</h6>
|
||
|
||
<h6 class="toc">
|
||
<a href="#420">8.2.6 Using conditionals inside package lists</a>
|
||
</h6>
|
||
|
||
<h6 class="toc">
|
||
<a href="#429">8.2.7 Removing packages at install time</a>
|
||
</h6>
|
||
|
||
<h6 class="toc">
|
||
<a href="#431">8.2.8 Desktop and language tasks</a>
|
||
</h6>
|
||
|
||
<h6 class="toc">
|
||
<a href="#436">8.2.9 Kernel flavour and version</a>
|
||
</h6>
|
||
|
||
<h6 class="toc">
|
||
<a href="#441">8.2.10 Custom kernels</a>
|
||
</h6>
|
||
|
||
<h5 class="toc">
|
||
<a href="#449">8.3 Installing modified or third-party packages</a>
|
||
</h5>
|
||
|
||
<h6 class="toc">
|
||
<a href="#456">8.3.1 Using <tt>packages.chroot</tt> to install custom packages</a>
|
||
</h6>
|
||
|
||
<h6 class="toc">
|
||
<a href="#463">8.3.2 Using an APT repository to install custom packages</a>
|
||
</h6>
|
||
|
||
<h6 class="toc">
|
||
<a href="#466">8.3.3 Custom packages and APT</a>
|
||
</h6>
|
||
|
||
<h5 class="toc">
|
||
<a href="#469">8.4 Configuring APT at build time</a>
|
||
</h5>
|
||
|
||
<h6 class="toc">
|
||
<a href="#471">8.4.1 Choosing apt or aptitude</a>
|
||
</h6>
|
||
|
||
<h6 class="toc">
|
||
<a href="#475">8.4.2 Using a proxy with APT</a>
|
||
</h6>
|
||
|
||
<h6 class="toc">
|
||
<a href="#478">8.4.3 Tweaking APT to save space</a>
|
||
</h6>
|
||
|
||
<h6 class="toc">
|
||
<a href="#487">8.4.4 Passing options to apt or aptitude</a>
|
||
</h6>
|
||
|
||
<h6 class="toc">
|
||
<a href="#492">8.4.5 APT pinning</a>
|
||
</h6>
|
||
|
||
<br>
|
||
|
||
<h1 class="toc">
|
||
<b><a href="#498">Customizing contents</a></b>
|
||
</h1>
|
||
|
||
<h4 class="toc">
|
||
<a href="#499">9. Customizing contents</a>
|
||
</h4>
|
||
|
||
<h5 class="toc">
|
||
<a href="#501">9.1 Includes</a>
|
||
</h5>
|
||
|
||
<h6 class="toc">
|
||
<a href="#506">9.1.1 Live/chroot local includes</a>
|
||
</h6>
|
||
|
||
<h6 class="toc">
|
||
<a href="#513">9.1.2 Binary local includes</a>
|
||
</h6>
|
||
|
||
<h5 class="toc">
|
||
<a href="#517">9.2 Hooks</a>
|
||
</h5>
|
||
|
||
<h6 class="toc">
|
||
<a href="#520">9.2.1 Chroot local hooks</a>
|
||
</h6>
|
||
|
||
<h6 class="toc">
|
||
<a href="#522">9.2.2 Binary local hooks</a>
|
||
</h6>
|
||
|
||
<h6 class="toc">
|
||
<a href="#524">9.2.3 Boot-time hooks</a>
|
||
</h6>
|
||
|
||
<h5 class="toc">
|
||
<a href="#526">9.3 Preseeding Debconf questions</a>
|
||
</h5>
|
||
|
||
<br>
|
||
|
||
<h1 class="toc">
|
||
<b><a href="#529">Customizing run time behaviours</a></b>
|
||
</h1>
|
||
|
||
<h4 class="toc">
|
||
<a href="#530">10. Customizing run time behaviours</a>
|
||
</h4>
|
||
|
||
<h5 class="toc">
|
||
<a href="#532">10.1 Customizing the live user</a>
|
||
</h5>
|
||
|
||
<h5 class="toc">
|
||
<a href="#541">10.2 Customizing locale and language</a>
|
||
</h5>
|
||
|
||
<h5 class="toc">
|
||
<a href="#558">10.3 Persistence</a>
|
||
</h5>
|
||
|
||
<h6 class="toc">
|
||
<a href="#580">10.3.1 The persistence.conf file</a>
|
||
</h6>
|
||
|
||
<h6 class="toc">
|
||
<a href="#585">10.3.2 Using more than one persistence store</a>
|
||
</h6>
|
||
|
||
<h6 class="toc">
|
||
<a href="#591">10.3.3 Using persistence with encryption</a>
|
||
</h6>
|
||
|
||
<br>
|
||
|
||
<h1 class="toc">
|
||
<b><a href="#617">Customizing the binary image</a></b>
|
||
</h1>
|
||
|
||
<h4 class="toc">
|
||
<a href="#618">11. Customizing the binary image</a>
|
||
</h4>
|
||
|
||
<h5 class="toc">
|
||
<a href="#619">11.1 Bootloaders</a>
|
||
</h5>
|
||
|
||
<h5 class="toc">
|
||
<a href="#626">11.2 ISO metadata</a>
|
||
</h5>
|
||
|
||
<br>
|
||
|
||
<h1 class="toc">
|
||
<b><a href="#632">Customizing Debian Installer</a></b>
|
||
</h1>
|
||
|
||
<h4 class="toc">
|
||
<a href="#633">12. Customizing Debian Installer</a>
|
||
</h4>
|
||
|
||
<h5 class="toc">
|
||
<a href="#636">12.1 Types of Debian Installer</a>
|
||
</h5>
|
||
|
||
<h5 class="toc">
|
||
<a href="#648">12.2 Customizing Debian Installer by preseeding</a>
|
||
</h5>
|
||
|
||
<h5 class="toc">
|
||
<a href="#651">12.3 Customizing Debian Installer content</a>
|
||
</h5>
|
||
|
||
<br>
|
||
|
||
<h1 class="toc">
|
||
<b><a href="#653">Project</a></b>
|
||
</h1>
|
||
|
||
<br>
|
||
|
||
<h1 class="toc">
|
||
<b><a href="#654">Contributing to the project</a></b>
|
||
</h1>
|
||
|
||
<h4 class="toc">
|
||
<a href="#655">13. Contributing to the project</a>
|
||
</h4>
|
||
|
||
<h5 class="toc">
|
||
<a href="#667">13.1 Making changes</a>
|
||
</h5>
|
||
|
||
<h5 class="toc">
|
||
<a href="#682">13.2 Translation of man pages</a>
|
||
</h5>
|
||
|
||
<br>
|
||
|
||
<h1 class="toc">
|
||
<b><a href="#691">Reporting bugs</a></b>
|
||
</h1>
|
||
|
||
<h4 class="toc">
|
||
<a href="#692">14. Reporting bugs</a>
|
||
</h4>
|
||
|
||
<h5 class="toc">
|
||
<a href="#698">14.1 Known issues</a>
|
||
</h5>
|
||
|
||
<h5 class="toc">
|
||
<a href="#703">14.2 Rebuild from scratch</a>
|
||
</h5>
|
||
|
||
<h5 class="toc">
|
||
<a href="#705">14.3 Use up-to-date packages</a>
|
||
</h5>
|
||
|
||
<h5 class="toc">
|
||
<a href="#707">14.4 Collect information</a>
|
||
</h5>
|
||
|
||
<h5 class="toc">
|
||
<a href="#724">14.5 Isolate the failing case if possible</a>
|
||
</h5>
|
||
|
||
<h5 class="toc">
|
||
<a href="#726">14.6 Use the correct package to report the bug against</a>
|
||
</h5>
|
||
|
||
<h6 class="toc">
|
||
<a href="#729">14.6.1 At build time while bootstrapping</a>
|
||
</h6>
|
||
|
||
<h6 class="toc">
|
||
<a href="#732">14.6.2 At build time while installing packages</a>
|
||
</h6>
|
||
|
||
<h6 class="toc">
|
||
<a href="#736">14.6.3 At boot time</a>
|
||
</h6>
|
||
|
||
<h6 class="toc">
|
||
<a href="#738">14.6.4 At run time</a>
|
||
</h6>
|
||
|
||
<h5 class="toc">
|
||
<a href="#740">14.7 Do the research</a>
|
||
</h5>
|
||
|
||
<h5 class="toc">
|
||
<a href="#744">14.8 Where to report bugs</a>
|
||
</h5>
|
||
|
||
<br>
|
||
|
||
<h1 class="toc">
|
||
<b><a href="#748">Coding Style</a></b>
|
||
</h1>
|
||
|
||
<h4 class="toc">
|
||
<a href="#749">15. Coding Style</a>
|
||
</h4>
|
||
|
||
<h5 class="toc">
|
||
<a href="#751">15.1 Compatibility</a>
|
||
</h5>
|
||
|
||
<h5 class="toc">
|
||
<a href="#756">15.2 Indenting</a>
|
||
</h5>
|
||
|
||
<h5 class="toc">
|
||
<a href="#758">15.3 Wrapping</a>
|
||
</h5>
|
||
|
||
<h5 class="toc">
|
||
<a href="#770">15.4 Variables</a>
|
||
</h5>
|
||
|
||
<h5 class="toc">
|
||
<a href="#789">15.5 Miscellaneous</a>
|
||
</h5>
|
||
|
||
<br>
|
||
|
||
<h1 class="toc">
|
||
<b><a href="#794">Procedures</a></b>
|
||
</h1>
|
||
|
||
<h4 class="toc">
|
||
<a href="#795">16. Procedures</a>
|
||
</h4>
|
||
|
||
<h5 class="toc">
|
||
<a href="#797">16.1 Major Releases</a>
|
||
</h5>
|
||
|
||
<h5 class="toc">
|
||
<a href="#803">16.2 Point Releases</a>
|
||
</h5>
|
||
|
||
<h6 class="toc">
|
||
<a href="#807">16.2.1 Last Point Release of a Debian Release</a>
|
||
</h6>
|
||
|
||
<h6 class="toc">
|
||
<a href="#809">16.2.2 Point release announcement template</a>
|
||
</h6>
|
||
|
||
<br>
|
||
|
||
<h1 class="toc">
|
||
<b><a href="#814">Git repositories</a></b>
|
||
</h1>
|
||
|
||
<h4 class="toc">
|
||
<a href="#815">17. Git repositories</a>
|
||
</h4>
|
||
|
||
<h5 class="toc">
|
||
<a href="#829">17.1 Handling multiple repositories</a>
|
||
</h5>
|
||
|
||
<br>
|
||
|
||
<h1 class="toc">
|
||
<b><a href="#833">Examples</a></b>
|
||
</h1>
|
||
|
||
<br>
|
||
|
||
<h1 class="toc">
|
||
<b><a href="#834">Examples</a></b>
|
||
</h1>
|
||
|
||
<h4 class="toc">
|
||
<a href="#835">18. Examples</a>
|
||
</h4>
|
||
|
||
<h5 class="toc">
|
||
<a href="#837">18.1 Using the examples</a>
|
||
</h5>
|
||
|
||
<h5 class="toc">
|
||
<a href="#841">18.2 Tutorial 1: A default image</a>
|
||
</h5>
|
||
|
||
<h5 class="toc">
|
||
<a href="#850">18.3 Tutorial 2: A web browser utility</a>
|
||
</h5>
|
||
|
||
<h5 class="toc">
|
||
<a href="#858">18.4 Tutorial 3: A personalized image</a>
|
||
</h5>
|
||
|
||
<h6 class="toc">
|
||
<a href="#861">18.4.1 First revision</a>
|
||
</h6>
|
||
|
||
<h6 class="toc">
|
||
<a href="#875">18.4.2 Second revision</a>
|
||
</h6>
|
||
|
||
<h5 class="toc">
|
||
<a href="#887">18.5 A VNC Kiosk Client</a>
|
||
</h5>
|
||
|
||
<h5 class="toc">
|
||
<a href="#901">18.6 A base image for a 128MB USB key</a>
|
||
</h5>
|
||
|
||
<h5 class="toc">
|
||
<a href="#912">18.7 A localized GNOME desktop and installer</a>
|
||
</h5>
|
||
|
||
<br>
|
||
|
||
<h1 class="toc">
|
||
<b><a href="#924">Appendix</a></b>
|
||
</h1>
|
||
|
||
<br>
|
||
|
||
<h1 class="toc">
|
||
<b><a href="#925">Style guide</a></b>
|
||
</h1>
|
||
|
||
<h4 class="toc">
|
||
<a href="#926">19. Style guide</a>
|
||
</h4>
|
||
|
||
<h5 class="toc">
|
||
<a href="#927">19.1 Guidelines for authors</a>
|
||
</h5>
|
||
|
||
<h6 class="toc">
|
||
<a href="#930">19.1.1 Linguistic features</a>
|
||
</h6>
|
||
|
||
<h6 class="toc">
|
||
<a href="#963">19.1.2 Procedures</a>
|
||
</h6>
|
||
|
||
<h5 class="toc">
|
||
<a href="#1002">19.2 Guidelines for translators</a>
|
||
</h5>
|
||
|
||
<h6 class="toc">
|
||
<a href="#1006">19.2.1 Translation hints</a>
|
||
</h6>
|
||
|
||
<br>
|
||
|
||
<div class="scroll">
|
||
|
||
<br><hr width=90% /><br>
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#1" class="lnkocn">1</a></label>
|
||
<h1 class="norm" id="1"><a name="1"></a>
|
||
Live Systems Manual
|
||
</h1>
|
||
</div>
|
||
|
||
<br><hr width=90% /><br>
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#2" class="lnkocn">2</a></label>
|
||
<h1 class="norm" id="2"><a name="2"></a>
|
||
About
|
||
</h1>
|
||
</div>
|
||
|
||
<br><hr width=90% /><br>
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#3" class="lnkocn">3</a></label>
|
||
<h1 class="norm" id="3"><a name="3"></a>
|
||
About this manual
|
||
</h1>
|
||
</div>
|
||
|
||
<br><hr width=90% /><br>
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#4" class="lnkocn">4</a></label>
|
||
<h4 class="norm" id="4"><a name="4"></a>
|
||
<a name="h1" ></a><a name="about_this_manual" ></a><a name="about-manual" ></a>1. About this manual
|
||
</h4>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#5" class="lnkocn">5</a></label>
|
||
<p class="i0" id="5">
|
||
This manual serves as a single access point to all documentation related to the Live Systems Project and in particular applies to the software produced by the project for the Debian 9.0 "<b>stretch</b>" release. An up-to-date version can always be found at ‹<a href="http://debian-live.alioth.debian.org/" target="_top">http://debian-live.alioth.debian.org/</a>›
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#6" class="lnkocn">6</a></label>
|
||
<p class="i0" id="6">
|
||
While <i>live-manual</i> is primarily focused on helping you build a live system and not on end-user topics, an end user may find some useful information in these sections: <a href="#the-basics">The Basics</a> covers downloading prebuilt images and preparing images to be booted from media or the network, either using the web builder or running <i>live-build</i> directly on your system. <a href="#customizing-run-time-behaviours">Customizing run time behaviours</a> describes some options that may be specified at the boot prompt, such as selecting a keyboard layout and locale, and using persistence.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#7" class="lnkocn">7</a></label>
|
||
<p class="i0" id="7">
|
||
Some of the commands mentioned in the text must be executed with superuser privileges which can be obtained by becoming the root user via <tt>su</tt> or by using <tt>sudo</tt>. To distinguish between commands which may be executed by an unprivileged user and those requiring superuser privileges, commands are prepended by <tt>$</tt> or <tt>#</tt> respectively. This symbol is not a part of the command.
|
||
</p>
|
||
</div>
|
||
|
||
<br><hr width=90% /><br>
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#8" class="lnkocn">8</a></label>
|
||
<h5 class="norm" id="8"><a name="8"></a>
|
||
<a name="c1.1" ></a><a name="h1.1" ></a>1.1 For the impatient
|
||
</h5>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#9" class="lnkocn">9</a></label>
|
||
<p class="i0" id="9">
|
||
While we believe that everything in this manual is important to at least some of our users, we realize it is a lot of material to cover and that you may wish to experience early success using the software before delving into the details. Therefore, we suggest reading in the following order.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#10" class="lnkocn">10</a></label>
|
||
<p class="i0" id="10">
|
||
First, read this chapter, <a href="#about-manual">About this manual</a>, from the beginning and ending with the <a href="#terms">Terms</a> section. Next, skip to the three tutorials at the front of the <a href="#examples">Examples</a> section designed to teach you image building and customization basics. Read <a href="#using-the-examples">Using the examples</a> first, followed by <a href="#tutorial-1">Tutorial 1: A default image</a>, <a href="#tutorial-2">Tutorial 2: A web browser utility</a> and finally <a href="#tutorial-3">Tutorial 3: A personalized image</a>. By the end of these tutorials, you will have a taste of what can be done with live systems.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#11" class="lnkocn">11</a></label>
|
||
<p class="i0" id="11">
|
||
We encourage you to return to more in-depth study of the manual, perhaps next reading <a href="#the-basics">The basics</a>, skimming or skipping <a href="#building-netboot-image">Building a netboot image</a>, and finishing by reading the <a href="#customization-overview">Customization overview</a> and the chapters that follow it. By this point, we hope you are thoroughly excited by what can be done with live systems and motivated to read the rest of the manual, cover-to-cover.
|
||
</p>
|
||
</div>
|
||
|
||
<br><hr width=90% /><br>
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#12" class="lnkocn">12</a></label>
|
||
<h5 class="norm" id="12"><a name="12"></a>
|
||
<a name="h1.2" ></a><a name="terms" ></a>1.2 Terms
|
||
</h5>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#13" class="lnkocn">13</a></label>
|
||
<ul>
|
||
<li class="bullet" id="13">
|
||
<b>Live system</b>: An operating system that can boot without installation to a hard drive. Live systems do not alter local operating system(s) or file(s) already installed on the computer hard drive unless instructed to do so. Live systems are typically booted from media such as CDs, DVDs or USB sticks. Some may also boot over the network (via netboot images, see <a href="#building-netboot-image">Building a netboot image</a>), and over the Internet (via the boot parameter <tt>fetch=URL</tt>, see <a href="#webbooting">Webbooting</a>).
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#14" class="lnkocn">14</a></label>
|
||
<ul>
|
||
<li class="bullet" id="14">
|
||
<b>Live medium</b>: As distinct from live system, the live medium refers to the CD, DVD or USB stick where the binary produced by <i>live-build</i> and used to boot the live system is written. More broadly, the term also refers to any place where this binary resides for the purposes of booting the live system, such as the location for the network boot files.
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#15" class="lnkocn">15</a></label>
|
||
<ul>
|
||
<li class="bullet" id="15">
|
||
<b>Live Systems Project</b>: The project which maintains, among others, the <i>live-boot</i>, <i>live-build</i>, <i>live-config</i>, <i>live-tools</i> and <i>live-manual</i> packages.
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#16" class="lnkocn">16</a></label>
|
||
<ul>
|
||
<li class="bullet" id="16">
|
||
<b>Host system</b>: The environment used to create the live system.
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#17" class="lnkocn">17</a></label>
|
||
<ul>
|
||
<li class="bullet" id="17">
|
||
<b>Target system</b>: The environment used to run the live system.
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#18" class="lnkocn">18</a></label>
|
||
<ul>
|
||
<li class="bullet" id="18">
|
||
<b><i>live-boot</i></b>: A collection of scripts used to boot live systems.
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#19" class="lnkocn">19</a></label>
|
||
<ul>
|
||
<li class="bullet" id="19">
|
||
<b><i>live-build</i></b>: A collection of scripts used to build customized live systems.
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#20" class="lnkocn">20</a></label>
|
||
<ul>
|
||
<li class="bullet" id="20">
|
||
<b><i>live-config</i></b>: A collection of scripts used to configure a live system during the boot process.
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#21" class="lnkocn">21</a></label>
|
||
<ul>
|
||
<li class="bullet" id="21">
|
||
<b><i>live-tools</i></b>: A collection of additional scripts used to perform useful tasks within a running live system.
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#22" class="lnkocn">22</a></label>
|
||
<ul>
|
||
<li class="bullet" id="22">
|
||
<b><i>live-manual</i></b>: This document is maintained in a package called <i>live-manual</i>.
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#23" class="lnkocn">23</a></label>
|
||
<ul>
|
||
<li class="bullet" id="23">
|
||
<b>Debian Installer (d-i)</b>: The official installation system for the Debian distribution.
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#24" class="lnkocn">24</a></label>
|
||
<ul>
|
||
<li class="bullet" id="24">
|
||
<b>Boot parameters</b>: Parameters that can be entered at the bootloader prompt to influence the kernel or <i>live-config</i>.
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#25" class="lnkocn">25</a></label>
|
||
<ul>
|
||
<li class="bullet" id="25">
|
||
<b>chroot</b>: The <i>chroot</i> program, <tt>chroot(8)</tt>, enables us to run different instances of the GNU/Linux environment on a single system simultaneously without rebooting.
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#26" class="lnkocn">26</a></label>
|
||
<ul>
|
||
<li class="bullet" id="26">
|
||
<b>Binary image</b>: A file containing the live system, such as live-image-i386.hybrid.iso or live-image-i386.img.
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#27" class="lnkocn">27</a></label>
|
||
<ul>
|
||
<li class="bullet" id="27">
|
||
<b>Target distribution</b>: The distribution upon which your live system will be based. This can differ from the distribution of your host system.
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#28" class="lnkocn">28</a></label>
|
||
<ul>
|
||
<li class="bullet" id="28">
|
||
<b>stable/testing/unstable</b>: The <b>stable</b> distribution, currently codenamed <b>stretch</b>, contains the latest officially released distribution of Debian. The <b>testing</b> distribution, temporarily codenamed <b>buster</b>, is the staging area for the next <b>stable</b> release. A major advantage of using this distribution is that it has more recent versions of software relative to the <b>stable</b> release. The <b>unstable</b> distribution, permanently codenamed <b>sid</b>, is where active development of Debian occurs. Generally, this distribution is run by developers and those who like to live on the edge. Throughout the manual, we tend to use codenames for the releases, such as <b>buster</b> or <b>sid</b>, as that is what is supported by the tools themselves.
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<br><hr width=90% /><br>
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#29" class="lnkocn">29</a></label>
|
||
<h5 class="norm" id="29"><a name="29"></a>
|
||
<a name="c1.3" ></a><a name="h1.3" ></a>1.3 Authors
|
||
</h5>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#30" class="lnkocn">30</a></label>
|
||
<p class="i0" id="30">
|
||
A list of authors (in alphabetical order):
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#31" class="lnkocn">31</a></label>
|
||
<ul>
|
||
<li class="bullet" id="31">
|
||
Ben Armstrong
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#32" class="lnkocn">32</a></label>
|
||
<ul>
|
||
<li class="bullet" id="32">
|
||
Brendan Sleight
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#33" class="lnkocn">33</a></label>
|
||
<ul>
|
||
<li class="bullet" id="33">
|
||
Carlos Zuferri
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#34" class="lnkocn">34</a></label>
|
||
<ul>
|
||
<li class="bullet" id="34">
|
||
Chris Lamb
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#35" class="lnkocn">35</a></label>
|
||
<ul>
|
||
<li class="bullet" id="35">
|
||
Daniel Baumann
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#36" class="lnkocn">36</a></label>
|
||
<ul>
|
||
<li class="bullet" id="36">
|
||
Franklin Piat
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#37" class="lnkocn">37</a></label>
|
||
<ul>
|
||
<li class="bullet" id="37">
|
||
Jonas Stein
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#38" class="lnkocn">38</a></label>
|
||
<ul>
|
||
<li class="bullet" id="38">
|
||
Kai Hendry
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#39" class="lnkocn">39</a></label>
|
||
<ul>
|
||
<li class="bullet" id="39">
|
||
Marco Amadori
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#40" class="lnkocn">40</a></label>
|
||
<ul>
|
||
<li class="bullet" id="40">
|
||
Mathieu Geli
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#41" class="lnkocn">41</a></label>
|
||
<ul>
|
||
<li class="bullet" id="41">
|
||
Matthias Kirschner
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#42" class="lnkocn">42</a></label>
|
||
<ul>
|
||
<li class="bullet" id="42">
|
||
Richard Nelson
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#43" class="lnkocn">43</a></label>
|
||
<ul>
|
||
<li class="bullet" id="43">
|
||
Trent W. Buck
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<br><hr width=90% /><br>
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#44" class="lnkocn">44</a></label>
|
||
<h5 class="norm" id="44"><a name="44"></a>
|
||
<a name="h1.4" ></a><a name="how-to-contribute" ></a>1.4 Contributing to this document
|
||
</h5>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#45" class="lnkocn">45</a></label>
|
||
<p class="i0" id="45">
|
||
This manual is intended as a community project and all proposals for improvements and contributions are extremely welcome. Please see the section <a href="#contributing-to-project">Contributing to the project</a> for detailed information on how to fetch the commit key and make good commits.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#46" class="lnkocn">46</a></label>
|
||
<h6 class="norm" id="46"><a name="46"></a>
|
||
<a name="h1.4.1" ></a><a name="applying-changes" ></a>1.4.1 Applying changes
|
||
</h6>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#47" class="lnkocn">47</a></label>
|
||
<p class="i0" id="47">
|
||
In order to make changes to the English manual you have to edit the right files in <tt>manual/en/</tt> but prior to the submission of your contribution, please preview your work. To preview the <i>live-manual</i>, ensure the packages needed for building it are installed by executing:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#48" class="lnkocn">48</a></label>
|
||
<p class="code" id="48">
|
||
# apt-get install make po4a ruby ruby-nokogiri sisu-complete<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#49" class="lnkocn">49</a></label>
|
||
<p class="i0" id="49">
|
||
You may build the <i>live-manual</i> from the top level directory of your Git checkout by executing:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#50" class="lnkocn">50</a></label>
|
||
<p class="code" id="50">
|
||
$ make build<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#51" class="lnkocn">51</a></label>
|
||
<p class="i0" id="51">
|
||
Since it takes a while to build the manual in all supported languages, authors may find it convenient to use one of the fast proofing shortcuts when reviewing the new documentation they have added to the English manual. Using <tt>PROOF=1</tt> builds <i>live-manual</i> in html format, but without the segmented html files, and using <tt>PROOF=2</tt> builds <i>live-manual</i> in pdf format, but only the A4 and letter portraits. That is why using either of the <tt>PROOF=</tt> possibilities can save up a considerable amount of time, e.g:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#52" class="lnkocn">52</a></label>
|
||
<p class="code" id="52">
|
||
$ make build PROOF=1<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#53" class="lnkocn">53</a></label>
|
||
<p class="i0" id="53">
|
||
When proofing one of the translations it is possible to build only one language by executing, e.g:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#54" class="lnkocn">54</a></label>
|
||
<p class="code" id="54">
|
||
$ make build LANGUAGES=de<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#55" class="lnkocn">55</a></label>
|
||
<p class="i0" id="55">
|
||
It is also possible to build by document type, e.g:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#56" class="lnkocn">56</a></label>
|
||
<p class="code" id="56">
|
||
$ make build FORMATS=pdf<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#57" class="lnkocn">57</a></label>
|
||
<p class="i0" id="57">
|
||
Or combine both, e.g:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#58" class="lnkocn">58</a></label>
|
||
<p class="code" id="58">
|
||
$ make build LANGUAGES=de FORMATS=html<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#59" class="lnkocn">59</a></label>
|
||
<p class="i0" id="59">
|
||
After revising your work and making sure that everything is fine, do not use <tt>make commit</tt> unless you are updating translations in the commit, and in that case, do not mix changes to the English manual and translations in the same commit, but use separate commits for each. See the <a href="#translation">Translation</a> section for more details.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#60" class="lnkocn">60</a></label>
|
||
<h6 class="norm" id="60"><a name="60"></a>
|
||
<a name="h1.4.2" ></a><a name="translation" ></a>1.4.2 Translation
|
||
</h6>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#61" class="lnkocn">61</a></label>
|
||
<p class="i0" id="61">
|
||
<b>Note:</b> For the translation of the man pages see <a href="#translation-of-manpages">Translation of man pages</a>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#62" class="lnkocn">62</a></label>
|
||
<p class="i0" id="62">
|
||
In order to translate <i>live-manual</i>, follow these steps depending on whether you are starting a translation from scratch or continue working on an already existing one:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#63" class="lnkocn">63</a></label>
|
||
<ul>
|
||
<li class="bullet" id="63">
|
||
Start a new translation from scratch
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#64" class="lnkocn">64</a></label>
|
||
<ul>
|
||
<li class="i2" id="64">
|
||
Translate the <b>about_manual.ssi.pot</b>, <b>about_project.ssi.pot</b> and <b>index.html.in.pot</b> files in <tt>manual/pot/</tt> to your language with your favourite editor (such as <i>poedit</i>) and send the translated <tt>.po</tt> files to the mailing list to check their integrity. <i>live-manual</i>'s integrity check not only ensures that the <tt>.po</tt> files are 100% translated but it also detects possible errors.
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#65" class="lnkocn">65</a></label>
|
||
<ul>
|
||
<li class="i2" id="65">
|
||
Once checked, to enable a new language in the autobuild it is enough to add the initial translated files to <tt>manual/po/${LANGUAGE}/</tt> and run <tt>make commit</tt>. And then, edit <tt>manual/_sisu/home/index.html</tt> adding the name of the language and its name in English between brackets.
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#66" class="lnkocn">66</a></label>
|
||
<ul>
|
||
<li class="bullet" id="66">
|
||
Continue with an already started translation
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#67" class="lnkocn">67</a></label>
|
||
<ul>
|
||
<li class="i2" id="67">
|
||
If your target language has already been added, you can randomly continue translating the remaining .po files in <tt>manual/po/${LANGUAGE}/</tt> using your favourite editor (such as <i>poedit</i>) .
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#68" class="lnkocn">68</a></label>
|
||
<ul>
|
||
<li class="i2" id="68">
|
||
Do not forget that you need to run <tt>make commit</tt> to ensure that the translated manuals are updated from the .po files and then you can review your changes launching <tt>make build</tt> before <tt>git add .</tt>, <tt>git commit -m "Translating..."</tt> and <tt>git push</tt>. Remember that since <tt>make build</tt> can take a considerable amount of time, you can proofread languages individually as explained in <a href="#applying-changes">Applying changes</a>
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#69" class="lnkocn">69</a></label>
|
||
<p class="i0" id="69">
|
||
After running <tt>make commit</tt> you will see some text scroll by. These are basically informative messages about the processing status and also some hints about what can be done in order to improve <i>live-manual</i>. Unless you see a fatal error, you usually can proceed and submit your contribution.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#70" class="lnkocn">70</a></label>
|
||
<p class="i0" id="70">
|
||
<i>live-manual</i> comes with two utilities that can greatly help translators to find untranslated and changed strings. The first one is "make translate". It launches an script that tells you in detail how many untranslated strings there are in each .po file. The second one, the "make fixfuzzy" target, only acts upon changed strings but it helps you to find and fix them one by one.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#71" class="lnkocn">71</a></label>
|
||
<p class="i0" id="71">
|
||
Keep in mind that even though these utilities might be really helpful to do translation work on the command line, the use of an specialized tool like <i>poedit</i> is the recommended way to do the task. It is also a good idea to read the Debian localization (l10n) documentation and, specifically to <i>live-manual</i>, the <a href="#guidelines-translators">Guidelines for translators</a>.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#72" class="lnkocn">72</a></label>
|
||
<p class="i0" id="72">
|
||
<b>Note:</b> You can use <tt>make clean</tt> to clean your git tree before pushing. This step is not compulsory thanks to the .gitignore file but it is a good practice to avoid committing files involuntarily.
|
||
</p>
|
||
</div>
|
||
|
||
<br><hr width=90% /><br>
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#73" class="lnkocn">73</a></label>
|
||
<h1 class="norm" id="73"><a name="73"></a>
|
||
About the Live Systems Project
|
||
</h1>
|
||
</div>
|
||
|
||
<br><hr width=90% /><br>
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#74" class="lnkocn">74</a></label>
|
||
<h4 class="norm" id="74"><a name="74"></a>
|
||
<a name="h2" ></a><a name="about_the_live_systems_project" ></a><a name="about-project" ></a>2. About the Live Systems Project
|
||
</h4>
|
||
</div>
|
||
|
||
<br><hr width=90% /><br>
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#75" class="lnkocn">75</a></label>
|
||
<h5 class="norm" id="75"><a name="75"></a>
|
||
<a name="c2.1" ></a><a name="h2.1" ></a>2.1 Motivation
|
||
</h5>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#76" class="lnkocn">76</a></label>
|
||
<h6 class="norm" id="76"><a name="76"></a>
|
||
<a name="c2.1.1" ></a><a name="h2.1.1" ></a>2.1.1 What is wrong with current live systems
|
||
</h6>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#77" class="lnkocn">77</a></label>
|
||
<p class="i0" id="77">
|
||
When Live Systems Project was initiated, there were already several Debian based live systems available and they are doing a great job. From the Debian perspective most of them have one or more of the following disadvantages:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#78" class="lnkocn">78</a></label>
|
||
<ul>
|
||
<li class="bullet" id="78">
|
||
They are not Debian projects and therefore lack support from within Debian.
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#79" class="lnkocn">79</a></label>
|
||
<ul>
|
||
<li class="bullet" id="79">
|
||
They mix different distributions, e.g. <b>testing</b> and <b>unstable</b>.
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#80" class="lnkocn">80</a></label>
|
||
<ul>
|
||
<li class="bullet" id="80">
|
||
They support i386 only.
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#81" class="lnkocn">81</a></label>
|
||
<ul>
|
||
<li class="bullet" id="81">
|
||
They modify the behaviour and/or appearance of packages by stripping them down to save space.
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#82" class="lnkocn">82</a></label>
|
||
<ul>
|
||
<li class="bullet" id="82">
|
||
They include packages from outside of the Debian archive.
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#83" class="lnkocn">83</a></label>
|
||
<ul>
|
||
<li class="bullet" id="83">
|
||
They ship custom kernels with additional patches that are not part of Debian.
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#84" class="lnkocn">84</a></label>
|
||
<ul>
|
||
<li class="bullet" id="84">
|
||
They are large and slow due to their sheer size and thus not suitable for rescue issues.
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#85" class="lnkocn">85</a></label>
|
||
<ul>
|
||
<li class="bullet" id="85">
|
||
They are not available in different flavours, e.g. CDs, DVDs, USB-stick and netboot images.
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#86" class="lnkocn">86</a></label>
|
||
<h6 class="norm" id="86"><a name="86"></a>
|
||
<a name="c2.1.2" ></a><a name="h2.1.2" ></a>2.1.2 Why create our own live system?
|
||
</h6>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#87" class="lnkocn">87</a></label>
|
||
<p class="i0" id="87">
|
||
Debian is the Universal Operating System: Debian has a live system to show around and to accurately represent the Debian system with the following main advantages:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#88" class="lnkocn">88</a></label>
|
||
<ul>
|
||
<li class="bullet" id="88">
|
||
It is a subproject of Debian.
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#89" class="lnkocn">89</a></label>
|
||
<ul>
|
||
<li class="bullet" id="89">
|
||
It reflects the (current) state of one distribution.
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#90" class="lnkocn">90</a></label>
|
||
<ul>
|
||
<li class="bullet" id="90">
|
||
It runs on as many architectures as possible.
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#91" class="lnkocn">91</a></label>
|
||
<ul>
|
||
<li class="bullet" id="91">
|
||
It consists of unchanged Debian packages only.
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#92" class="lnkocn">92</a></label>
|
||
<ul>
|
||
<li class="bullet" id="92">
|
||
It does not contain any packages that are not in the Debian archive.
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#93" class="lnkocn">93</a></label>
|
||
<ul>
|
||
<li class="bullet" id="93">
|
||
It uses an unaltered Debian kernel with no additional patches.
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<br><hr width=90% /><br>
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#94" class="lnkocn">94</a></label>
|
||
<h5 class="norm" id="94"><a name="94"></a>
|
||
<a name="c2.2" ></a><a name="h2.2" ></a>2.2 Philosophy
|
||
</h5>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#95" class="lnkocn">95</a></label>
|
||
<h6 class="norm" id="95"><a name="95"></a>
|
||
<a name="c2.2.1" ></a><a name="h2.2.1" ></a>2.2.1 Only unchanged packages from Debian "main"
|
||
</h6>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#96" class="lnkocn">96</a></label>
|
||
<p class="i0" id="96">
|
||
We will only use packages from the Debian repository in the "main" section. The non-free section is not part of Debian and therefore cannot be used for official live system images.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#97" class="lnkocn">97</a></label>
|
||
<p class="i0" id="97">
|
||
We will not change any packages. Whenever we need to change something, we will do that in coordination with its package maintainer in Debian.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#98" class="lnkocn">98</a></label>
|
||
<p class="i0" id="98">
|
||
As an exception, our own packages such as <i>live-boot</i>, <i>live-build</i> or <i>live-config</i> may temporarily be used from our own repository for development reasons (e.g. to create development snapshots). They will be uploaded to Debian on a regular basis.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#99" class="lnkocn">99</a></label>
|
||
<h6 class="norm" id="99"><a name="99"></a>
|
||
<a name="c2.2.2" ></a><a name="h2.2.2" ></a>2.2.2 No package configuration of the live system
|
||
</h6>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#100" class="lnkocn">100</a></label>
|
||
<p class="i0" id="100">
|
||
In this phase we will not ship or install sample or alternative configurations. All packages are used in their default configuration as they are after a regular installation of Debian.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#101" class="lnkocn">101</a></label>
|
||
<p class="i0" id="101">
|
||
Whenever we need a different default configuration, we will do that in coordination with its package maintainer in Debian.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#102" class="lnkocn">102</a></label>
|
||
<p class="i0" id="102">
|
||
A system for configuring packages is provided using debconf allowing custom configured packages to be installed in your custom produced live system images, but for the <a href="#downloading-prebuilt-images">prebuilt live images</a> we choose to leave packages in their default configuration, unless absolutely necessary in order to work in the live environment. Wherever possible, we prefer to adapt packages within the Debian archive to work better in a live system versus making changes to the live toolchain or <a href="#clone-configuration-via-git">prebuilt image configurations</a>. For more information, please see <a href="#customization-overview">Customization overview</a>.
|
||
</p>
|
||
</div>
|
||
|
||
<br><hr width=90% /><br>
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#103" class="lnkocn">103</a></label>
|
||
<h5 class="norm" id="103"><a name="103"></a>
|
||
<a name="h2.3" ></a><a name="contact" ></a>2.3 Contact
|
||
</h5>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#104" class="lnkocn">104</a></label>
|
||
<ul>
|
||
<li class="bullet" id="104">
|
||
<b>Mailing list</b>: The primary contact for the project is the mailing list at ‹<a href="https://lists.debian.org/debian-live/" target="_top">https://lists.debian.org/debian-live/</a>›. You can email the list directly by addressing your mail to ‹<a href="mailto:debian-live@lists.debian.org.">debian-live@lists.debian.org.</a>› The list archives are available at ‹<a href="https://lists.debian.org/debian-live/" target="_top">https://lists.debian.org/debian-live/</a>›.
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#105" class="lnkocn">105</a></label>
|
||
<ul>
|
||
<li class="bullet" id="105">
|
||
<b>IRC</b>: A number of users and developers are present in the #debian-live channel on irc.debian.org (OFTC). When asking a question on IRC, please be patient for an answer. If no answer is forthcoming, please email the mailing list.
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#106" class="lnkocn">106</a></label>
|
||
<ul>
|
||
<li class="bullet" id="106">
|
||
<b>BTS</b> : The <a href="https://www.debian.org/Bugs/">Debian Bug Tracking System</a> (BTS) contains details of bugs reported by users and developers. Each bug is given a number, and is kept on file until it is marked as having been dealt with. For more information, please see <a href="#bugs">Reporting bugs</a>.
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<br><hr width=90% /><br>
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#107" class="lnkocn">107</a></label>
|
||
<h1 class="norm" id="107"><a name="107"></a>
|
||
User
|
||
</h1>
|
||
</div>
|
||
|
||
<br><hr width=90% /><br>
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#108" class="lnkocn">108</a></label>
|
||
<h1 class="norm" id="108"><a name="108"></a>
|
||
Installation
|
||
</h1>
|
||
</div>
|
||
|
||
<br><hr width=90% /><br>
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#109" class="lnkocn">109</a></label>
|
||
<h4 class="norm" id="109"><a name="109"></a>
|
||
<a name="h3" ></a><a name="installation" ></a>3. Installation
|
||
</h4>
|
||
</div>
|
||
|
||
<br><hr width=90% /><br>
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#110" class="lnkocn">110</a></label>
|
||
<h5 class="norm" id="110"><a name="110"></a>
|
||
<a name="h3.1" ></a><a name="requirements" ></a>3.1 Requirements
|
||
</h5>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#111" class="lnkocn">111</a></label>
|
||
<p class="i0" id="111">
|
||
Building live system images has very few system requirements:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#112" class="lnkocn">112</a></label>
|
||
<ul>
|
||
<li class="bullet" id="112">
|
||
Superuser (root) access
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#113" class="lnkocn">113</a></label>
|
||
<ul>
|
||
<li class="bullet" id="113">
|
||
An up-to-date version of <i>live-build</i>
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#114" class="lnkocn">114</a></label>
|
||
<ul>
|
||
<li class="bullet" id="114">
|
||
A POSIX-compliant shell, such as <i>bash</i> or <i>dash</i>
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#115" class="lnkocn">115</a></label>
|
||
<ul>
|
||
<li class="bullet" id="115">
|
||
<i>debootstrap</i>
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#116" class="lnkocn">116</a></label>
|
||
<ul>
|
||
<li class="bullet" id="116">
|
||
Linux 2.6 or newer.
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#117" class="lnkocn">117</a></label>
|
||
<p class="i0" id="117">
|
||
Note that using Debian or a Debian-derived distribution is not required - <i>live-build</i> will run on almost any distribution with the above requirements.
|
||
</p>
|
||
</div>
|
||
|
||
<br><hr width=90% /><br>
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#118" class="lnkocn">118</a></label>
|
||
<h5 class="norm" id="118"><a name="118"></a>
|
||
<a name="h3.2" ></a><a name="installing-live-build" ></a>3.2 Installing live-build
|
||
</h5>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#119" class="lnkocn">119</a></label>
|
||
<p class="i0" id="119">
|
||
You can install <i>live-build</i> in a number of different ways:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#120" class="lnkocn">120</a></label>
|
||
<ul>
|
||
<li class="bullet" id="120">
|
||
From the Debian repository
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#121" class="lnkocn">121</a></label>
|
||
<ul>
|
||
<li class="bullet" id="121">
|
||
From source
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#122" class="lnkocn">122</a></label>
|
||
<ul>
|
||
<li class="bullet" id="122">
|
||
From snapshots
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#123" class="lnkocn">123</a></label>
|
||
<p class="i0" id="123">
|
||
If you are using Debian, the recommended way is to install <i>live-build</i> via the Debian repository.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#124" class="lnkocn">124</a></label>
|
||
<h6 class="norm" id="124"><a name="124"></a>
|
||
<a name="c3.2.1" ></a><a name="h3.2.1" ></a>3.2.1 From the Debian repository
|
||
</h6>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#125" class="lnkocn">125</a></label>
|
||
<p class="i0" id="125">
|
||
Simply install <i>live-build</i> like any other package:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#126" class="lnkocn">126</a></label>
|
||
<p class="code" id="126">
|
||
# apt-get install live-build<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#127" class="lnkocn">127</a></label>
|
||
<h6 class="norm" id="127"><a name="127"></a>
|
||
<a name="c3.2.2" ></a><a name="h3.2.2" ></a>3.2.2 From source
|
||
</h6>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#128" class="lnkocn">128</a></label>
|
||
<p class="i0" id="128">
|
||
<i>live-build</i> is developed using the Git version control system. On Debian based systems, this is provided by the <i>git</i> package. To check out the latest code, execute:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#129" class="lnkocn">129</a></label>
|
||
<p class="code" id="129">
|
||
$ git clone git://http://anonscm.debian.org/git/debian-live/live-build.git<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#130" class="lnkocn">130</a></label>
|
||
<p class="i0" id="130">
|
||
You can build and install your own Debian package by executing:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#131" class="lnkocn">131</a></label>
|
||
<p class="code" id="131">
|
||
$ cd live-build<br>
|
||
$ dpkg-buildpackage -b -uc -us<br>
|
||
$ cd ..<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#132" class="lnkocn">132</a></label>
|
||
<p class="i0" id="132">
|
||
Now install whichever of the freshly built <tt>.deb</tt> files you were interested in, e.g.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#133" class="lnkocn">133</a></label>
|
||
<p class="code" id="133">
|
||
# dpkg -i live-build_4.0-1_all.deb<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#134" class="lnkocn">134</a></label>
|
||
<p class="i0" id="134">
|
||
You can also install <i>live-build</i> directly to your system by executing:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#135" class="lnkocn">135</a></label>
|
||
<p class="code" id="135">
|
||
# make install<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#136" class="lnkocn">136</a></label>
|
||
<p class="i0" id="136">
|
||
and uninstall it with:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#137" class="lnkocn">137</a></label>
|
||
<p class="code" id="137">
|
||
# make uninstall<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#138" class="lnkocn">138</a></label>
|
||
<h6 class="norm" id="138"><a name="138"></a>
|
||
<a name="c3.2.3" ></a><a name="h3.2.3" ></a>3.2.3 From 'snapshots'
|
||
</h6>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#139" class="lnkocn">139</a></label>
|
||
<p class="i0" id="139">
|
||
If you do not wish to build or install <i>live-build</i> from source, you can use snapshots. These are built automatically from the latest version in Git and are available on ‹<a href="http://debian-live.alioth.debian.org/debian/" target="_top">http://debian-live.alioth.debian.org/debian/</a>›.
|
||
</p>
|
||
</div>
|
||
|
||
<br><hr width=90% /><br>
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#140" class="lnkocn">140</a></label>
|
||
<h5 class="norm" id="140"><a name="140"></a>
|
||
<a name="c3.3" ></a><a name="h3.3" ></a>3.3 Installing live-boot and live-config
|
||
</h5>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#141" class="lnkocn">141</a></label>
|
||
<p class="i0" id="141">
|
||
<b>Note:</b> You do not need to install <i>live-boot</i> or <i>live-config</i> on your system to create customized live systems. However, doing so will do no harm and is useful for reference purposes. If you only want the documentation, you may now install the <i>live-boot-doc</i> and <i>live-config-doc</i> packages separately.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#142" class="lnkocn">142</a></label>
|
||
<h6 class="norm" id="142"><a name="142"></a>
|
||
<a name="c3.3.1" ></a><a name="h3.3.1" ></a>3.3.1 From the Debian repository
|
||
</h6>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#143" class="lnkocn">143</a></label>
|
||
<p class="i0" id="143">
|
||
Both <i>live-boot</i> and <i>live-config</i> are available from the Debian repository as per <a href="#installing-live-build">Installing live-build</a>.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#144" class="lnkocn">144</a></label>
|
||
<h6 class="norm" id="144"><a name="144"></a>
|
||
<a name="c3.3.2" ></a><a name="h3.3.2" ></a>3.3.2 From source
|
||
</h6>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#145" class="lnkocn">145</a></label>
|
||
<p class="i0" id="145">
|
||
To use the latest source from git, you can follow the process below. Please ensure you are familiar with the terms mentioned in <a href="#terms">Terms</a>.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#146" class="lnkocn">146</a></label>
|
||
<ul>
|
||
<li class="bullet" id="146">
|
||
Checkout the <i>live-boot</i> and <i>live-config</i> sources
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#147" class="lnkocn">147</a></label>
|
||
<p class="code" id="147">
|
||
$ git clone git://http://anonscm.debian.org/git/debian-live/live-boot.git <br>
|
||
$ git clone git://http://anonscm.debian.org/git/debian-live/live-config.git<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#148" class="lnkocn">148</a></label>
|
||
<p class="i0" id="148">
|
||
Consult the <i>live-boot</i> and <i>live-config</i> man pages for details on customizing if that is your reason for building these packages from source.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#149" class="lnkocn">149</a></label>
|
||
<ul>
|
||
<li class="bullet" id="149">
|
||
Build <i>live-boot</i> and <i>live-config</i> .deb files
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#150" class="lnkocn">150</a></label>
|
||
<p class="i0" id="150">
|
||
You must build either on your target distribution or in a chroot containing your target platform: this means if your target is <b>buster</b> then you should build against <b>buster</b>.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#151" class="lnkocn">151</a></label>
|
||
<p class="i0" id="151">
|
||
Use a personal builder such as <i>pbuilder</i> or <i>sbuild</i> if you need to build <i>live-boot</i> for a target distribution that differs from your build system. For example, for <b>buster</b> live images, build <i>live-boot</i> in a <b>buster</b> chroot. If your target distribution happens to match your build system distribution, you may build directly on the build system using <tt>dpkg-buildpackage</tt> (provided by the <i>dpkg-dev</i> package):
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#152" class="lnkocn">152</a></label>
|
||
<p class="code" id="152">
|
||
$ cd live-boot<br>
|
||
$ dpkg-buildpackage -b -uc -us<br>
|
||
$ cd ../live-config<br>
|
||
$ dpkg-buildpackage -b -uc -us<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#153" class="lnkocn">153</a></label>
|
||
<ul>
|
||
<li class="bullet" id="153">
|
||
Use applicable generated .deb files
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#154" class="lnkocn">154</a></label>
|
||
<p class="i0" id="154">
|
||
As <i>live-boot</i> and <i>live-config</i> are installed by <i>live-build</i> system, installing the packages in the host system is not sufficient: you should treat the generated .deb files like any other custom packages. Since your purpose for building from source is likely to test new things over the short term before the official release, follow <a href="#installing-modified-or-third-party-packages">Installing modified or third-party packages</a> to temporarily include the relevant files in your configuration. In particular, notice that both packages are divided into a generic part, a documentation part and one or more back-ends. Include the generic part, only one back-end matching your configuration, and optionally the documentation. Assuming you are building a live image in the current directory and have generated all .deb files for a single version of both packages in the directory above, these bash commands would copy all of the relevant packages including default back-ends:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#155" class="lnkocn">155</a></label>
|
||
<p class="code" id="155">
|
||
$ cp ../live-boot{_,-initramfs-tools,-doc}*.deb config/packages.chroot/<br>
|
||
$ cp ../live-config{_,-sysvinit,-doc}*.deb config/packages.chroot/<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#156" class="lnkocn">156</a></label>
|
||
<h6 class="norm" id="156"><a name="156"></a>
|
||
<a name="c3.3.3" ></a><a name="h3.3.3" ></a>3.3.3 From 'snapshots'
|
||
</h6>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#157" class="lnkocn">157</a></label>
|
||
<p class="i0" id="157">
|
||
You can let <i>live-build</i> automatically use the latest snapshots of <i>live-boot</i> and <i>live-config</i> by configuring the package repository on debian-live.alioth.debian.org as a third-party repository in your <i>live-build</i> configuration directory.
|
||
</p>
|
||
</div>
|
||
|
||
<br><hr width=90% /><br>
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#158" class="lnkocn">158</a></label>
|
||
<h1 class="norm" id="158"><a name="158"></a>
|
||
The basics
|
||
</h1>
|
||
</div>
|
||
|
||
<br><hr width=90% /><br>
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#159" class="lnkocn">159</a></label>
|
||
<h4 class="norm" id="159"><a name="159"></a>
|
||
<a name="h4" ></a><a name="the_basics" ></a><a name="the-basics" ></a>4. The basics
|
||
</h4>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#160" class="lnkocn">160</a></label>
|
||
<p class="i0" id="160">
|
||
This chapter contains a brief overview of the build process and instructions for using the three most commonly used image types. The most versatile image type, <tt>iso-hybrid</tt>, may be used on a virtual machine, optical medium or USB portable storage device. In certain special cases, as explained later, the <tt>hdd</tt> type may be more suitable. The chapter includes detailed instructions for building and using a <tt>netboot</tt> type image, which is a bit more involved due to the setup required on the server. This is an slightly advanced topic for anyone who is not already familiar with netbooting, but it is included here because once the setup is done, it is a very convenient way to test and deploy images for booting on the local network without the hassle of dealing with image media.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#161" class="lnkocn">161</a></label>
|
||
<p class="i0" id="161">
|
||
The section finishes with a quick introduction to <a href="#webbooting">webbooting</a> which is, perhaps, the easiest way of using different images for different purposes, switching from one to the other as needed using the internet as a means.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#162" class="lnkocn">162</a></label>
|
||
<p class="i0" id="162">
|
||
Throughout the chapter, we will often refer to the default filenames produced by <i>live-build</i>. If you are <a href="#downloading-prebuilt-images">downloading a prebuilt image</a> instead, the actual filenames may vary.
|
||
</p>
|
||
</div>
|
||
|
||
<br><hr width=90% /><br>
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#163" class="lnkocn">163</a></label>
|
||
<h5 class="norm" id="163"><a name="163"></a>
|
||
<a name="h4.1" ></a><a name="what-is-live" ></a>4.1 What is a live system?
|
||
</h5>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#164" class="lnkocn">164</a></label>
|
||
<p class="i0" id="164">
|
||
A live system usually means an operating system booted on a computer from a removable medium, such as a CD-ROM or USB stick, or from a network, ready to use without any installation on the usual drive(s), with auto-configuration done at run time (see <a href="#terms">Terms</a>).
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#165" class="lnkocn">165</a></label>
|
||
<p class="i0" id="165">
|
||
With live systems, it's an operating system, built for one of the supported architectures (currently amd64 and i386). It is made from the following parts:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#166" class="lnkocn">166</a></label>
|
||
<ul>
|
||
<li class="bullet" id="166">
|
||
<b>Linux kernel image</b>, usually named <tt>vmlinuz*</tt>
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#167" class="lnkocn">167</a></label>
|
||
<ul>
|
||
<li class="bullet" id="167">
|
||
<b>Initial RAM disk image (initrd)</b>: a RAM disk set up for the Linux boot, containing modules possibly needed to mount the System image and some scripts to do it.
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#168" class="lnkocn">168</a></label>
|
||
<ul>
|
||
<li class="bullet" id="168">
|
||
<b>System image</b>: The operating system's filesystem image. Usually, a SquashFS compressed filesystem is used to minimize the live system image size. Note that it is read-only. So, during boot the live system will use a RAM disk and 'union' mechanism to enable writing files within the running system. However, all modifications will be lost upon shutdown unless optional persistence is used (see <a href="#persistence">Persistence</a>).
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#169" class="lnkocn">169</a></label>
|
||
<ul>
|
||
<li class="bullet" id="169">
|
||
<b>Bootloader</b>: A small piece of code crafted to boot from the chosen medium, possibly presenting a prompt or menu to allow selection of options/configuration. It loads the Linux kernel and its initrd to run with an associated system filesystem. Different solutions can be used, depending on the target medium and format of the filesystem containing the previously mentioned components: isolinux to boot from a CD or DVD in ISO9660 format, syslinux for HDD or USB drive booting from a VFAT partition, extlinux for ext2/3/4 and btrfs partitions, pxelinux for PXE netboot, GRUB for ext2/3/4 partitions, etc.
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#170" class="lnkocn">170</a></label>
|
||
<p class="i0" id="170">
|
||
You can use <i>live-build</i> to build the system image from your specifications, set up a Linux kernel, its initrd, and a bootloader to run them, all in one medium-dependant format (ISO9660 image, disk image, etc.).
|
||
</p>
|
||
</div>
|
||
|
||
<br><hr width=90% /><br>
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#171" class="lnkocn">171</a></label>
|
||
<h5 class="norm" id="171"><a name="171"></a>
|
||
<a name="h4.2" ></a><a name="downloading-prebuilt-images" ></a>4.2 Downloading prebuilt images
|
||
</h5>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#172" class="lnkocn">172</a></label>
|
||
<p class="i0" id="172">
|
||
While the focus of this manual is developing and building your own live images, you may simply wish to try one of our prebuilt images, either as an introduction to their use or instead of building your own. These images are built using our <a href="#clone-configuration-via-git"><i>live-images</i> git repository</a> and official stable releases are published at ‹<a href="https://www.debian.org/CD/live/" target="_top">https://www.debian.org/CD/live/</a>›. In addition, older and upcoming releases, and unofficial images containing non-free firmware and drivers are available at ‹<a href="http://debian-live.alioth.debian.org/cdimage/release/" target="_top">http://debian-live.alioth.debian.org/cdimage/release/</a>›.
|
||
</p>
|
||
</div>
|
||
|
||
<br><hr width=90% /><br>
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#173" class="lnkocn">173</a></label>
|
||
<h5 class="norm" id="173"><a name="173"></a>
|
||
<a name="h4.3" ></a><a name="using-web-builder" ></a>4.3 Using the web live image builder
|
||
</h5>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#174" class="lnkocn">174</a></label>
|
||
<p class="i0" id="174">
|
||
As a service to the community, we run a web-based live image builder service at ‹<a href="http://debian-live.alioth.debian.org/build/" target="_top">http://debian-live.alioth.debian.org/build/</a>›. This site is maintained on a best effort basis. That is, although we strive to keep it up-to-date and operational at all times, and do issue notices for significant operational outages, we cannot guarantee 100% availability or fast image building, and the service may occasionally have issues that take some time to resolve. If you have problems or questions about the service, please <a href="#contact">contact us</a>, providing us with the link to your build.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#175" class="lnkocn">175</a></label>
|
||
<h6 class="norm" id="175"><a name="175"></a>
|
||
<a name="c4.3.1" ></a><a name="h4.3.1" ></a>4.3.1 Web builder usage and caveats
|
||
</h6>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#176" class="lnkocn">176</a></label>
|
||
<p class="i0" id="176">
|
||
The web interface currently makes no provision to prevent the use of invalid combinations of options, and in particular, where changing an option would normally (i.e. using <i>live-build</i> directly) change defaults of other options listed in the web form, the web builder does not change these defaults. Most notably, if you change <tt>--architectures</tt> from the default <tt>i386</tt> to <tt>amd64</tt>, you must change the corresponding option <tt>--linux-flavours</tt> from the default <tt>586</tt> to <tt>amd64</tt>. See the <tt>lb_config</tt> man page for the version of <i>live-build</i> installed on the web builder for more details. The version number of <i>live-build</i> is listed at the bottom of the web builder page.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#177" class="lnkocn">177</a></label>
|
||
<p class="i0" id="177">
|
||
The time estimate given by the web builder is a crude estimate only and may not reflect how long your build actually takes. Nor is the estimate updated once it is displayed. Please be patient. Do not refresh the page you land on after submitting the build, as this will resubmit a new build with the same parameters. You should <a href="#contact">contact us</a> if you don't receive notification of your build only once you are certain you've waited long enough and verified the notification e-mail did not get caught by your own e-mail spam filter.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#178" class="lnkocn">178</a></label>
|
||
<p class="i0" id="178">
|
||
The web builder is limited in the kinds of images it can build. This keeps it simple and efficient to use and maintain. If you would like to make customizations that are not provided for by the web interface, the rest of this manual explains how to build your own images using <i>live-build</i>.
|
||
</p>
|
||
</div>
|
||
|
||
<br><hr width=90% /><br>
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#179" class="lnkocn">179</a></label>
|
||
<h5 class="norm" id="179"><a name="179"></a>
|
||
<a name="h4.4" ></a><a name="building-iso-hybrid" ></a>4.4 First steps: building an ISO hybrid image
|
||
</h5>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#180" class="lnkocn">180</a></label>
|
||
<p class="i0" id="180">
|
||
Regardless of the image type, you will need to perform the same basic steps to build an image each time. As a first example, create a build directory, change to that directory and then execute the following sequence of <i>live-build</i> commands to create a basic ISO hybrid image containing a default live system without X.org. It is suitable for burning to CD or DVD media, and also to copy onto a USB stick.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#181" class="lnkocn">181</a></label>
|
||
<p class="i0" id="181">
|
||
The name of the working directory is absolutely up to you, but if you take a look at the examples used throughout <i>live-manual</i>, it is a good idea to use a name that helps you identify the image you are working with in each directory, especially if you are working or experimenting with different image types. In this case you are going to build a default system so let's call it, for example, live-default.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#182" class="lnkocn">182</a></label>
|
||
<p class="code" id="182">
|
||
$ mkdir live-default && cd live-default<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#183" class="lnkocn">183</a></label>
|
||
<p class="i0" id="183">
|
||
Then, run the <tt>lb config</tt> command. This will create a "config/" hierarchy in the current directory for use by other commands:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#184" class="lnkocn">184</a></label>
|
||
<p class="code" id="184">
|
||
$ lb config<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#185" class="lnkocn">185</a></label>
|
||
<p class="i0" id="185">
|
||
No parameters are passed to these commands, so defaults for all of their various options will be used. See <a href="#lb-config">The lb config command</a> for more details.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#186" class="lnkocn">186</a></label>
|
||
<p class="i0" id="186">
|
||
Now that the "config/" hierarchy exists, build the image with the <tt>lb build</tt> command:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#187" class="lnkocn">187</a></label>
|
||
<p class="code" id="187">
|
||
# lb build<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#188" class="lnkocn">188</a></label>
|
||
<p class="i0" id="188">
|
||
This process can take a while, depending on the speed of your computer and your network connection. When it is complete, there should be a <tt>live-image-i386.hybrid.iso</tt> image file, ready to use, in the current directory.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#189" class="lnkocn">189</a></label>
|
||
<p class="i0" id="189">
|
||
<b>Note:</b> If you are building on an amd64 system the name of the resulting image will be <tt>live-image-amd64.hybrid.iso</tt>. Keep in mind this naming convention throughout the manual.
|
||
</p>
|
||
</div>
|
||
|
||
<br><hr width=90% /><br>
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#190" class="lnkocn">190</a></label>
|
||
<h5 class="norm" id="190"><a name="190"></a>
|
||
<a name="h4.5" ></a><a name="using-iso-hybrid" ></a>4.5 Using an ISO hybrid live image
|
||
</h5>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#191" class="lnkocn">191</a></label>
|
||
<p class="i0" id="191">
|
||
After either building or downloading an ISO hybrid image, which can be obtained at ‹<a href="https://www.debian.org/CD/live/" target="_top">https://www.debian.org/CD/live/</a>›, the usual next step is to prepare your medium for booting, either CD-R(W) or DVD-R(W) optical media or a USB stick.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#192" class="lnkocn">192</a></label>
|
||
<h6 class="norm" id="192"><a name="192"></a>
|
||
<a name="h4.5.1" ></a><a name="burning-iso-image" ></a>4.5.1 Burning an ISO image to a physical medium
|
||
</h6>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#193" class="lnkocn">193</a></label>
|
||
<p class="i0" id="193">
|
||
Burning an ISO image is easy. Just install <i>xorriso</i> and use it from the command-line to burn the image. For instance:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#194" class="lnkocn">194</a></label>
|
||
<p class="code" id="194">
|
||
# apt-get install xorriso<br>
|
||
$ xorriso -as cdrecord -v dev=/dev/sr0 blank=as_needed live-image-i386.hybrid.iso<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#195" class="lnkocn">195</a></label>
|
||
<h6 class="norm" id="195"><a name="195"></a>
|
||
<a name="h4.5.2" ></a><a name="copying-iso-hybrid-to-usb" ></a>4.5.2 Copying an ISO hybrid image to a USB stick
|
||
</h6>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#196" class="lnkocn">196</a></label>
|
||
<p class="i0" id="196">
|
||
ISO images prepared with <tt>xorriso</tt>, can be simply copied to a USB stick with the <tt>cp</tt> program or an equivalent. Plug in a USB stick with a size large enough for your image file and determine which device it is, which we hereafter refer to as <tt>${USBSTICK}</tt>. This is the device file of your key, such as <tt>/dev/sdb</tt>, not a partition, such as <tt>/dev/sdb1</tt>! You can find the right device name by looking in <tt>dmesg</tt>'s output after plugging in the stick, or better yet, <tt>ls -l /dev/disk/by-id</tt>.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#197" class="lnkocn">197</a></label>
|
||
<p class="i0" id="197">
|
||
Once you are certain you have the correct device name, use the <tt>cp</tt> command to copy the image to the stick. <b>This will definitely overwrite any previous contents on your stick!</b>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#198" class="lnkocn">198</a></label>
|
||
<p class="code" id="198">
|
||
$ cp live-image-i386.hybrid.iso ${USBSTICK}<br>
|
||
$ sync<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#199" class="lnkocn">199</a></label>
|
||
<p class="i0" id="199">
|
||
<b>Note:</b> The <i>sync</i> command is useful to ensure that all the data, which is stored in memory by the kernel while copying the image, is written to the USB stick.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#200" class="lnkocn">200</a></label>
|
||
<h6 class="norm" id="200"><a name="200"></a>
|
||
<a name="h4.5.3" ></a><a name="using-usb-extra-space" ></a>4.5.3 Using the space left on a USB stick
|
||
</h6>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#201" class="lnkocn">201</a></label>
|
||
<p class="i0" id="201">
|
||
After copying the <tt>live-image-i386.hybrid.iso</tt> to a USB stick, the first partition on the device will be filled up by the live system. To use the remaining free space, use a partitioning tool such as <i>gparted</i> or <i>parted</i> to create a new partition on the stick.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#202" class="lnkocn">202</a></label>
|
||
<p class="code" id="202">
|
||
# gparted ${USBSTICK}<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#203" class="lnkocn">203</a></label>
|
||
<p class="i0" id="203">
|
||
After the partition is created, where <tt>${PARTITION}</tt> is the name of the partition, such as <tt>/dev/sdb2</tt>, you have to create a filesystem on it. One possible choice would be ext4.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#204" class="lnkocn">204</a></label>
|
||
<p class="code" id="204">
|
||
# mkfs.ext4 ${PARTITION}<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#205" class="lnkocn">205</a></label>
|
||
<p class="i0" id="205">
|
||
<b>Note:</b> If you want to use the extra space with Windows, apparently that OS cannot normally access any partitions but the first. Some solutions to this problem have been discussed on our <a href="#contact">mailing list</a>, but it seems there are no easy answers.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#206" class="lnkocn">206</a></label>
|
||
<p class="i0" id="206">
|
||
<b>Remember: Every time you install a new live-image-i386.hybrid.iso on the stick, all data on the stick will be lost because the partition table is overwritten by the contents of the image, so back up your extra partition first to restore again after updating the live image.</b>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#207" class="lnkocn">207</a></label>
|
||
<h6 class="norm" id="207"><a name="207"></a>
|
||
<a name="h4.5.4" ></a><a name="booting-live-medium" ></a>4.5.4 Booting the live medium
|
||
</h6>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#208" class="lnkocn">208</a></label>
|
||
<p class="i0" id="208">
|
||
The first time you boot your live medium, whether CD, DVD, USB key, or PXE boot, some setup in your computer's BIOS may be needed first. Since BIOSes vary greatly in features and key bindings, we cannot get into the topic in depth here. Some BIOSes provide a key to bring up a menu of boot devices at boot time, which is the easiest way if it is available on your system. Otherwise, you need to enter the BIOS configuration menu and change the boot order to place the boot device for the live system before your normal boot device.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#209" class="lnkocn">209</a></label>
|
||
<p class="i0" id="209">
|
||
Once you've booted the medium, you are presented with a boot menu. If you just press enter here, the system will boot using the default entry, <tt>Live</tt> and default options. For more information about boot options, see the "help" entry in the menu and also the <i>live-boot</i> and <i>live-config</i> man pages found within the live system.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#210" class="lnkocn">210</a></label>
|
||
<p class="i0" id="210">
|
||
Assuming you've selected <tt>Live</tt> and booted a default desktop live image, after the boot messages scroll by, you should be automatically logged into the <tt>user</tt> account and see a desktop, ready to use. If you have booted a console-only image, such as a <tt>standard</tt> flavour <a href="#downloading-prebuilt-images">prebuilt image</a>, you should be automatically logged in on the console to the <tt>user</tt> account and see a shell prompt, ready to use.
|
||
</p>
|
||
</div>
|
||
|
||
<br><hr width=90% /><br>
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#211" class="lnkocn">211</a></label>
|
||
<h5 class="norm" id="211"><a name="211"></a>
|
||
<a name="h4.6" ></a><a name="using-virtual-machine" ></a>4.6 Using a virtual machine for testing
|
||
</h5>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#212" class="lnkocn">212</a></label>
|
||
<p class="i0" id="212">
|
||
It can be a great time-saver for the development of live images to run them in a virtual machine (VM). This is not without its caveats:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#213" class="lnkocn">213</a></label>
|
||
<ul>
|
||
<li class="bullet" id="213">
|
||
Running a VM requires enough RAM for both the guest OS and the host and a CPU with hardware support for virtualization is recommended.
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#214" class="lnkocn">214</a></label>
|
||
<ul>
|
||
<li class="bullet" id="214">
|
||
There are some inherent limitations to running on a VM, e.g. poor video performance, limited choice of emulated hardware.
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#215" class="lnkocn">215</a></label>
|
||
<ul>
|
||
<li class="bullet" id="215">
|
||
When developing for specific hardware, there is no substitute for running on the hardware itself.
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#216" class="lnkocn">216</a></label>
|
||
<ul>
|
||
<li class="bullet" id="216">
|
||
Occasionally there are bugs that relate only to running in a VM. When in doubt, test your image directly on the hardware.
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#217" class="lnkocn">217</a></label>
|
||
<p class="i0" id="217">
|
||
Provided you can work within these constraints, survey the available VM software and choose one that is suitable for your needs.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#218" class="lnkocn">218</a></label>
|
||
<h6 class="norm" id="218"><a name="218"></a>
|
||
<a name="h4.6.1" ></a><a name="testing-iso-with-qemu" ></a>4.6.1 Testing an ISO image with QEMU
|
||
</h6>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#219" class="lnkocn">219</a></label>
|
||
<p class="i0" id="219">
|
||
The most versatile VM in Debian is QEMU. If your processor has hardware support for virtualization, use the <i>qemu-kvm</i> package; the <i>qemu-kvm</i> package description briefly lists the requirements.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#220" class="lnkocn">220</a></label>
|
||
<p class="i0" id="220">
|
||
First, install <i>qemu-kvm</i> if your processor supports it. If not, install <i>qemu</i>, in which case the program name is <tt>qemu</tt> instead of <tt>kvm</tt> in the following examples. The <i>qemu-utils</i> package is also valuable for creating virtual disk images with <tt>qemu-img</tt>.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#221" class="lnkocn">221</a></label>
|
||
<p class="code" id="221">
|
||
# apt-get install qemu-kvm qemu-utils<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#222" class="lnkocn">222</a></label>
|
||
<p class="i0" id="222">
|
||
Booting an ISO image is simple:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#223" class="lnkocn">223</a></label>
|
||
<p class="code" id="223">
|
||
$ kvm -cdrom live-image-i386.hybrid.iso<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#224" class="lnkocn">224</a></label>
|
||
<p class="i0" id="224">
|
||
See the man pages for more details.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#225" class="lnkocn">225</a></label>
|
||
<h6 class="norm" id="225"><a name="225"></a>
|
||
<a name="h4.6.2" ></a><a name="testing-iso-with-virtualbox" ></a>4.6.2 Testing an ISO image with VirtualBox
|
||
</h6>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#226" class="lnkocn">226</a></label>
|
||
<p class="i0" id="226">
|
||
In order to test the ISO with <i>virtualbox</i>:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#227" class="lnkocn">227</a></label>
|
||
<p class="code" id="227">
|
||
# apt-get install virtualbox virtualbox-qt virtualbox-dkms<br>
|
||
$ virtualbox<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#228" class="lnkocn">228</a></label>
|
||
<p class="i0" id="228">
|
||
Create a new virtual machine, change the storage settings to use <tt>live-image-i386.hybrid.iso</tt> as the CD/DVD device, and start the machine.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#229" class="lnkocn">229</a></label>
|
||
<p class="i0" id="229">
|
||
<b>Note:</b> For live systems containing X.org that you want to test with <i>virtualbox</i>, you may wish to include the VirtualBox X.org driver package, <i>virtualbox-guest-dkms</i> and <i>virtualbox-guest-x11</i>, in your <i>live-build</i> configuration. Otherwise, the resolution is limited to 800x600.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#230" class="lnkocn">230</a></label>
|
||
<p class="code" id="230">
|
||
$ echo "virtualbox-guest-dkms virtualbox-guest-x11" >> config/package-lists/my.list.chroot<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#231" class="lnkocn">231</a></label>
|
||
<p class="i0" id="231">
|
||
In order to make the dkms package work, also the kernel headers for the kernel flavour used in your image need to be installed. Instead of manually listing the correct <i>linux-headers</i> package in above created package list, the selection of the right package can be done automatically by <i>live-build</i>.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#232" class="lnkocn">232</a></label>
|
||
<p class="code" id="232">
|
||
$ lb config --linux-packages "linux-image linux-headers"<br>
|
||
</p>
|
||
</div>
|
||
|
||
<br><hr width=90% /><br>
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#233" class="lnkocn">233</a></label>
|
||
<h5 class="norm" id="233"><a name="233"></a>
|
||
<a name="h4.7" ></a><a name="using-hdd-image" ></a>4.7 Building and using an HDD image
|
||
</h5>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#234" class="lnkocn">234</a></label>
|
||
<p class="i0" id="234">
|
||
Building an HDD image is similar to an ISO hybrid one in all respects except you specify <tt>-b hdd</tt> and the resulting filename is <tt>live-image-i386.img</tt> which cannot be burnt to optical media. It is suitable for booting from USB sticks, USB hard drives, and various other portable storage devices. Normally, an ISO hybrid image can be used for this purpose instead, but if you have a BIOS which does not handle hybrid images properly, you need an HDD image.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#235" class="lnkocn">235</a></label>
|
||
<p class="i0" id="235">
|
||
<b>Note:</b> if you created an ISO hybrid image with the previous example, you will need to clean up your working directory with the <tt>lb clean</tt> command (see <a href="#lb-clean">The lb clean command</a>):
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#236" class="lnkocn">236</a></label>
|
||
<p class="code" id="236">
|
||
# lb clean --binary<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#237" class="lnkocn">237</a></label>
|
||
<p class="i0" id="237">
|
||
Run the <tt>lb config</tt> command as before, except this time specifying the HDD image type:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#238" class="lnkocn">238</a></label>
|
||
<p class="code" id="238">
|
||
$ lb config -b hdd<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#239" class="lnkocn">239</a></label>
|
||
<p class="i0" id="239">
|
||
Now build the image with the <tt>lb build</tt> command:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#240" class="lnkocn">240</a></label>
|
||
<p class="code" id="240">
|
||
# lb build<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#241" class="lnkocn">241</a></label>
|
||
<p class="i0" id="241">
|
||
When the build finishes, a <tt>live-image-i386.img</tt> file should be present in the current directory.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#242" class="lnkocn">242</a></label>
|
||
<p class="i0" id="242">
|
||
The generated binary image contains a VFAT partition and the syslinux bootloader, ready to be directly written on a USB device. Once again, using an HDD image is just like using an ISO hybrid one on USB. Follow the instructions in <a href="#using-iso-hybrid">Using an ISO hybrid live image</a>, except use the filename <tt>live-image-i386.img</tt> instead of <tt>live-image-i386.hybrid.iso</tt>.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#243" class="lnkocn">243</a></label>
|
||
<p class="i0" id="243">
|
||
Likewise, to test an HDD image with Qemu, install <i>qemu</i> as described above in <a href="#testing-iso-with-qemu">Testing an ISO image with QEMU</a>. Then run <tt>kvm</tt> or <tt>qemu</tt>, depending on which version your host system needs, specifying <tt>live-image-i386.img</tt> as the first hard drive.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#244" class="lnkocn">244</a></label>
|
||
<p class="code" id="244">
|
||
$ kvm -hda live-image-i386.img<br>
|
||
</p>
|
||
</div>
|
||
|
||
<br><hr width=90% /><br>
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#245" class="lnkocn">245</a></label>
|
||
<h5 class="norm" id="245"><a name="245"></a>
|
||
<a name="h4.8" ></a><a name="building-netboot-image" ></a>4.8 Building a netboot image
|
||
</h5>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#246" class="lnkocn">246</a></label>
|
||
<p class="i0" id="246">
|
||
The following sequence of commands will create a basic netboot image containing a default live system without X.org. It is suitable for booting over the network.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#247" class="lnkocn">247</a></label>
|
||
<p class="i0" id="247">
|
||
<b>Note:</b> if you performed any previous examples, you will need to clean up your working directory with the <tt>lb clean</tt> command:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#248" class="lnkocn">248</a></label>
|
||
<p class="code" id="248">
|
||
# lb clean<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#249" class="lnkocn">249</a></label>
|
||
<p class="i0" id="249">
|
||
In this specific case, a <tt>lb clean --binary</tt> would not be enough to clean up the necessary stages. The cause for this is that in netboot setups, a different initramfs configuration needs to be used which <i>live-build</i> performs automatically when building netboot images. Since the initramfs creation belongs to the chroot stage, switching to netboot in an existing build directory means to rebuild the chroot stage too. Therefore, <tt>lb clean</tt> (which will remove the chroot stage, too) needs to be used.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#250" class="lnkocn">250</a></label>
|
||
<p class="i0" id="250">
|
||
Run the <tt>lb config</tt> command as follows to configure your image for netbooting:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#251" class="lnkocn">251</a></label>
|
||
<p class="code" id="251">
|
||
$ lb config -b netboot --net-root-path "/srv/debian-live" --net-root-server "192.168.0.2"<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#252" class="lnkocn">252</a></label>
|
||
<p class="i0" id="252">
|
||
In contrast with the ISO and HDD images, netbooting does not, itself, serve the filesystem image to the client, so the files must be served via NFS. Different network filesystems can be chosen through lb config. The <tt>--net-root-path</tt> and <tt>--net-root-server</tt> options specify the location and server, respectively, of the NFS server where the filesystem image will be located at boot time. Make sure these are set to suitable values for your network and server.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#253" class="lnkocn">253</a></label>
|
||
<p class="i0" id="253">
|
||
Now build the image with the <tt>lb build</tt> command:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#254" class="lnkocn">254</a></label>
|
||
<p class="code" id="254">
|
||
# lb build<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#255" class="lnkocn">255</a></label>
|
||
<p class="i0" id="255">
|
||
In a network boot, the client runs a small piece of software which usually resides on the EPROM of the Ethernet card. This program sends a DHCP request to get an IP address and information about what to do next. Typically, the next step is getting a higher level bootloader via the TFTP protocol. That could be pxelinux, GRUB, or even boot directly to an operating system like Linux.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#256" class="lnkocn">256</a></label>
|
||
<p class="i0" id="256">
|
||
For example, if you unpack the generated <tt>live-image-i386.netboot.tar</tt> archive in the <tt>/srv/debian-live</tt> directory, you'll find the filesystem image in <tt>live/filesystem.squashfs</tt> and the kernel, initrd and pxelinux bootloader in <tt>tftpboot/</tt>.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#257" class="lnkocn">257</a></label>
|
||
<p class="i0" id="257">
|
||
We must now configure three services on the server to enable netbooting: the DHCP server, the TFTP server and the NFS server.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#258" class="lnkocn">258</a></label>
|
||
<h6 class="norm" id="258"><a name="258"></a>
|
||
<a name="c4.8.1" ></a><a name="h4.8.1" ></a>4.8.1 DHCP server
|
||
</h6>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#259" class="lnkocn">259</a></label>
|
||
<p class="i0" id="259">
|
||
We must configure our network's DHCP server to be sure to give an IP address to the netbooting client system, and to advertise the location of the PXE bootloader.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#260" class="lnkocn">260</a></label>
|
||
<p class="i0" id="260">
|
||
Here is an example for inspiration, written for the ISC DHCP server <tt>isc-dhcp-server</tt> in the <tt>/etc/dhcp/dhcpd.conf</tt> configuration file:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#261" class="lnkocn">261</a></label>
|
||
<p class="code" id="261">
|
||
# /etc/dhcp/dhcpd.conf - configuration file for isc-dhcp-server<br><br>
|
||
ddns-update-style none;<br><br>
|
||
option domain-name "example.org";<br>
|
||
option domain-name-servers ns1.example.org, ns2.example.org;<br><br>
|
||
default-lease-time 600;<br>
|
||
max-lease-time 7200;<br><br>
|
||
log-facility local7;<br><br>
|
||
subnet 192.168.0.0 netmask 255.255.255.0 {<br>
|
||
range 192.168.0.1 192.168.0.254;<br>
|
||
filename "pxelinux.0";<br>
|
||
next-server 192.168.0.2;<br>
|
||
option subnet-mask 255.255.255.0;<br>
|
||
option broadcast-address 192.168.0.255;<br>
|
||
option routers 192.168.0.1;<br>
|
||
}<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#262" class="lnkocn">262</a></label>
|
||
<h6 class="norm" id="262"><a name="262"></a>
|
||
<a name="c4.8.2" ></a><a name="h4.8.2" ></a>4.8.2 TFTP server
|
||
</h6>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#263" class="lnkocn">263</a></label>
|
||
<p class="i0" id="263">
|
||
This serves the kernel and initial ramdisk to the system at run time.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#264" class="lnkocn">264</a></label>
|
||
<p class="i0" id="264">
|
||
You should install the <i>tftpd-hpa</i> package. It can serve all files contained inside a root directory, usually <tt>/srv/tftp</tt>. To let it serve files inside <tt>/srv/debian-live/tftpboot</tt>, run as root the following command:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#265" class="lnkocn">265</a></label>
|
||
<p class="code" id="265">
|
||
# dpkg-reconfigure -plow tftpd-hpa<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#266" class="lnkocn">266</a></label>
|
||
<p class="i0" id="266">
|
||
and fill in the new tftp server directory when being asked about it.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#267" class="lnkocn">267</a></label>
|
||
<h6 class="norm" id="267"><a name="267"></a>
|
||
<a name="c4.8.3" ></a><a name="h4.8.3" ></a>4.8.3 NFS server
|
||
</h6>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#268" class="lnkocn">268</a></label>
|
||
<p class="i0" id="268">
|
||
Once the guest computer has downloaded and booted a Linux kernel and loaded its initrd, it will try to mount the Live filesystem image through a NFS server.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#269" class="lnkocn">269</a></label>
|
||
<p class="i0" id="269">
|
||
You need to install the <i>nfs-kernel-server</i> package.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#270" class="lnkocn">270</a></label>
|
||
<p class="i0" id="270">
|
||
Then, make the filesystem image available through NFS by adding a line like the following to <tt>/etc/exports</tt>:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#271" class="lnkocn">271</a></label>
|
||
<p class="code" id="271">
|
||
/srv/debian-live *(ro,async,no_root_squash,no_subtree_check)<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#272" class="lnkocn">272</a></label>
|
||
<p class="i0" id="272">
|
||
and tell the NFS server about this new export with the following command:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#273" class="lnkocn">273</a></label>
|
||
<p class="code" id="273">
|
||
# exportfs -rv<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#274" class="lnkocn">274</a></label>
|
||
<p class="i0" id="274">
|
||
Setting up these three services can be a little tricky. You might need some patience to get all of them working together. For more information, see the syslinux wiki at ‹<a href="http://www.syslinux.org/wiki/index.php/PXELINUX" target="_top">http://www.syslinux.org/wiki/index.php/PXELINUX</a>› or the Debian Installer Manual's TFTP Net Booting section at ‹<a href="http://d-i.alioth.debian.org/manual/en.i386/ch04s05.html" target="_top">http://d-i.alioth.debian.org/manual/en.i386/ch04s05.html</a>›. They might help, as their processes are very similar.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#275" class="lnkocn">275</a></label>
|
||
<h6 class="norm" id="275"><a name="275"></a>
|
||
<a name="c4.8.4" ></a><a name="h4.8.4" ></a>4.8.4 Netboot testing HowTo
|
||
</h6>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#276" class="lnkocn">276</a></label>
|
||
<p class="i0" id="276">
|
||
Netboot image creation is made easy with <i>live-build</i>, but testing the images on physical machines can be really time consuming.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#277" class="lnkocn">277</a></label>
|
||
<p class="i0" id="277">
|
||
To make our life easier, we can use virtualization.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#278" class="lnkocn">278</a></label>
|
||
<h6 class="norm" id="278"><a name="278"></a>
|
||
<a name="c4.8.5" ></a><a name="h4.8.5" ></a>4.8.5 Qemu
|
||
</h6>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#279" class="lnkocn">279</a></label>
|
||
<ul>
|
||
<li class="bullet" id="279">
|
||
Install <i>qemu</i>, <i>bridge-utils</i>, <i>sudo</i>.
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#280" class="lnkocn">280</a></label>
|
||
<p class="i0" id="280">
|
||
Edit <tt>/etc/qemu-ifup</tt>:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#281" class="lnkocn">281</a></label>
|
||
<p class="code" id="281">
|
||
#!/bin/sh<br>
|
||
sudo -p "Password for $0:" /sbin/ifconfig $1 172.20.0.1<br>
|
||
echo "Executing /etc/qemu-ifup"<br>
|
||
echo "Bringing up $1 for bridged mode..."<br>
|
||
sudo /sbin/ifconfig $1 0.0.0.0 promisc up<br>
|
||
echo "Adding $1 to br0..."<br>
|
||
sudo /usr/sbin/brctl addif br0 $1<br>
|
||
sleep 2<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#282" class="lnkocn">282</a></label>
|
||
<p class="i0" id="282">
|
||
Get, or build a <tt>grub-floppy-netboot</tt>.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#283" class="lnkocn">283</a></label>
|
||
<p class="i0" id="283">
|
||
Launch <tt>qemu</tt> with "<tt>-net nic,vlan=0 -net tap,vlan=0,ifname=tun0</tt>"
|
||
</p>
|
||
</div>
|
||
|
||
<br><hr width=90% /><br>
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#284" class="lnkocn">284</a></label>
|
||
<h5 class="norm" id="284"><a name="284"></a>
|
||
<a name="h4.9" ></a><a name="webbooting" ></a>4.9 Webbooting
|
||
</h5>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#285" class="lnkocn">285</a></label>
|
||
<p class="i0" id="285">
|
||
Webbooting is a convenient way of retrieving and booting live systems using the internet as a means. The requirements for webbooting are very few. On the one hand, you need a medium with a bootloader, an initial ramdisk and a kernel. On the other hand, a web server to store the squashfs files which contain the filesystem.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#286" class="lnkocn">286</a></label>
|
||
<h6 class="norm" id="286"><a name="286"></a>
|
||
<a name="c4.9.1" ></a><a name="h4.9.1" ></a>4.9.1 Getting the webboot files
|
||
</h6>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#287" class="lnkocn">287</a></label>
|
||
<p class="i0" id="287">
|
||
As usual, you can build the images yourself or use the prebuilt files, which are available on the project's homepage at ‹<a href="http://debian-live.alioth.debian.org/" target="_top">http://debian-live.alioth.debian.org/</a>›. Using prebuilt images would be handy for doing initial testing until one can fine tune their own needs. If you have built a live image you will find the files needed for webbooting in the build directory under <tt>binary/live/</tt>. The files are called <tt>vmlinuz</tt>, <tt>initrd.img</tt> and <tt>filesystem.squashfs</tt>.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#288" class="lnkocn">288</a></label>
|
||
<p class="i0" id="288">
|
||
It is also possible to extract those files from an already existing iso image. In order to achieve that, loopback mount the image as follows:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#289" class="lnkocn">289</a></label>
|
||
<p class="code" id="289">
|
||
# mount -o loop image.iso /mnt<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#290" class="lnkocn">290</a></label>
|
||
<p class="i0" id="290">
|
||
The files are to be found under the <tt>live/</tt> directory. In this specific case, it would be <tt>/mnt/live/</tt>. This method has the disadvantage that you need to be root to be able to mount the image. However, it has the advantage that it is easily scriptable and thus, easily automatized.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#291" class="lnkocn">291</a></label>
|
||
<p class="i0" id="291">
|
||
But undoubtedly, the easiest way of extracting the files from an iso image and uploading it to the web server at the same time, is using the midnight commander or <i>mc</i>. If you have the <i>genisoimage</i> package installed, the two-pane file manager allows you to browse the contents of an iso file in one pane and upload the files via ftp in the other pane. Even though this method requires manual work, it does not require root privileges.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#292" class="lnkocn">292</a></label>
|
||
<h6 class="norm" id="292"><a name="292"></a>
|
||
<a name="c4.9.2" ></a><a name="h4.9.2" ></a>4.9.2 Booting webboot images
|
||
</h6>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#293" class="lnkocn">293</a></label>
|
||
<p class="i0" id="293">
|
||
While some users will prefer virtualization to test webbooting, we refer to real hardware here to match the following possible use case which should only be considered as an example.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#294" class="lnkocn">294</a></label>
|
||
<p class="i0" id="294">
|
||
In order to boot a webboot image it is enough to have the components mentioned above, i.e. <tt>vmlinuz</tt> and <tt>initrd.img</tt> in a usb stick inside a directory named <tt>live/</tt> and install syslinux as bootloader. Then boot from the usb stick and type <tt>fetch=URL/PATH/TO/FILE</tt> at the boot options. <i>live-boot</i> will retrieve the squashfs file and store it into ram. This way, it is possible to use the downloaded compressed filesystem as a regular live system. For example:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#295" class="lnkocn">295</a></label>
|
||
<p class="code" id="295">
|
||
append boot=live components fetch=http://192.168.2.50/images/webboot/filesystem.squashfs<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#296" class="lnkocn">296</a></label>
|
||
<p class="i0" id="296">
|
||
<b>Use case:</b> You have a web server in which you have stored two squashfs files, one which contains a full desktop, like for example gnome, and a standard one. If you need a graphical environment for one machine, you can plug your usb stick in and webboot the gnome image. If you need one of the tools included in the second type of image, perhaps for another machine, you can webboot the standard one.
|
||
</p>
|
||
</div>
|
||
|
||
<br><hr width=90% /><br>
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#297" class="lnkocn">297</a></label>
|
||
<h1 class="norm" id="297"><a name="297"></a>
|
||
Overview of tools
|
||
</h1>
|
||
</div>
|
||
|
||
<br><hr width=90% /><br>
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#298" class="lnkocn">298</a></label>
|
||
<h4 class="norm" id="298"><a name="298"></a>
|
||
<a name="h5" ></a><a name="overview_of_tools" ></a><a name="overview-of-tools" ></a>5. Overview of tools
|
||
</h4>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#299" class="lnkocn">299</a></label>
|
||
<p class="i0" id="299">
|
||
This chapter contains an overview of the three main tools used in building live systems: <i>live-build</i>, <i>live-boot</i> and <i>live-config</i>.
|
||
</p>
|
||
</div>
|
||
|
||
<br><hr width=90% /><br>
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#300" class="lnkocn">300</a></label>
|
||
<h5 class="norm" id="300"><a name="300"></a>
|
||
<a name="h5.1" ></a><a name="live-build" ></a>5.1 The live-build package
|
||
</h5>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#301" class="lnkocn">301</a></label>
|
||
<p class="i0" id="301">
|
||
<i>live-build</i> is a collection of scripts to build live systems. These scripts are also referred to as "commands".
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#302" class="lnkocn">302</a></label>
|
||
<p class="i0" id="302">
|
||
The idea behind <i>live-build</i> is to be a framework that uses a configuration directory to completely automate and customize all aspects of building a Live image.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#303" class="lnkocn">303</a></label>
|
||
<p class="i0" id="303">
|
||
Many concepts are similar to those used to build Debian packages with <i>debhelper</i>:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#304" class="lnkocn">304</a></label>
|
||
<ul>
|
||
<li class="bullet" id="304">
|
||
The scripts have a central location for configuring their operation. In <i>debhelper</i>, this is the <tt>debian/</tt> subdirectory of a package tree. For example, dh_install will look, among others, for a file called <tt>debian/install</tt> to determine which files should exist in a particular binary package. In much the same way, <i>live-build</i> stores its configuration entirely under a <tt>config/</tt> subdirectory.
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#305" class="lnkocn">305</a></label>
|
||
<ul>
|
||
<li class="bullet" id="305">
|
||
The scripts are independent - that is to say, it is always safe to run each command.
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#306" class="lnkocn">306</a></label>
|
||
<p class="i0" id="306">
|
||
Unlike <i>debhelper</i>, <i>live-build</i> provides the tools to generate a skeleton configuration directory. This could be considered to be similar to tools such as <i>dh-make</i>. For more information about these tools, read on, since the remainder of this section discuses the four most important commands. Note that the preceding <tt>lb</tt> is a generic wrapper for <i>live-build</i> commands.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#307" class="lnkocn">307</a></label>
|
||
<ul>
|
||
<li class="bullet" id="307">
|
||
<b>lb config</b>: Responsible for initializing a Live system configuration directory. See <a href="#lb-config">The lb config command</a> for more information.
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#308" class="lnkocn">308</a></label>
|
||
<ul>
|
||
<li class="bullet" id="308">
|
||
<b>lb build</b>: Responsible for starting a Live system build. See <a href="#lb-build">The lb build command</a> for more information.
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#309" class="lnkocn">309</a></label>
|
||
<ul>
|
||
<li class="bullet" id="309">
|
||
<b>lb clean</b>: Responsible for removing parts of a Live system build. See <a href="#lb-clean">The lb clean command</a> for more information.
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#310" class="lnkocn">310</a></label>
|
||
<h6 class="norm" id="310"><a name="310"></a>
|
||
<a name="h5.1.1" ></a><a name="lb-config" ></a>5.1.1 The <tt>lb config</tt> command
|
||
</h6>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#311" class="lnkocn">311</a></label>
|
||
<p class="i0" id="311">
|
||
As discussed in <a href="#live-build">live-build</a>, the scripts that make up <i>live-build</i> read their configuration with the <tt>source</tt> command from a single directory named <tt>config/</tt>. As constructing this directory by hand would be time-consuming and error-prone, the <tt>lb config</tt> command can be used to create the initial skeleton configuration tree.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#312" class="lnkocn">312</a></label>
|
||
<p class="i0" id="312">
|
||
Issuing <tt>lb config</tt> without any arguments creates the <tt>config/</tt> subdirectory which is populated with some default settings in configuration files, and two skeleton trees named <tt>auto/</tt> and <tt>local/</tt>.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#313" class="lnkocn">313</a></label>
|
||
<p class="code" id="313">
|
||
$ lb config<br>
|
||
[2015-01-06 19:25:58] lb config<br>
|
||
P: Creating config tree for a debian/stretch/i386 system<br>
|
||
P: Symlinking hooks...<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#314" class="lnkocn">314</a></label>
|
||
<p class="i0" id="314">
|
||
Using <tt>lb config</tt> without any arguments would be suitable for users who need a very basic image, or who intend to provide a more complete configuration via <tt>auto/config</tt> later (see <a href="#managing-a-configuration">Managing a configuration</a> for details).
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#315" class="lnkocn">315</a></label>
|
||
<p class="i0" id="315">
|
||
Normally, you will want to specify some options. For example, to specify which package manager to use while building the image:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#316" class="lnkocn">316</a></label>
|
||
<p class="code" id="316">
|
||
$ lb config --apt aptitude<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#317" class="lnkocn">317</a></label>
|
||
<p class="i0" id="317">
|
||
It is possible to specify many options, such as:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#318" class="lnkocn">318</a></label>
|
||
<p class="code" id="318">
|
||
$ lb config --binary-images netboot --bootappend-live "boot=live components hostname=live-host username=live-user" ...<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#319" class="lnkocn">319</a></label>
|
||
<p class="i0" id="319">
|
||
A full list of options is available in the <tt>lb_config</tt> man page.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#320" class="lnkocn">320</a></label>
|
||
<h6 class="norm" id="320"><a name="320"></a>
|
||
<a name="h5.1.2" ></a><a name="lb-build" ></a>5.1.2 The <tt>lb build</tt> command
|
||
</h6>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#321" class="lnkocn">321</a></label>
|
||
<p class="i0" id="321">
|
||
The <tt>lb build</tt> command reads in your configuration from the <tt>config/</tt> directory. It then runs the lower level commands needed to build your Live system.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#322" class="lnkocn">322</a></label>
|
||
<h6 class="norm" id="322"><a name="322"></a>
|
||
<a name="h5.1.3" ></a><a name="lb-clean" ></a>5.1.3 The <tt>lb clean</tt> command
|
||
</h6>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#323" class="lnkocn">323</a></label>
|
||
<p class="i0" id="323">
|
||
It is the job of the <tt>lb clean</tt> command to remove various parts of a build so subsequent builds can start from a clean state. By default, <tt>chroot</tt>, <tt>binary</tt> and <tt>source</tt> stages are cleaned, but the cache is left intact. Also, individual stages can be cleaned. For example, if you have made changes that only affect the binary stage, use <tt>lb clean --binary</tt> prior to building a new binary. If your changes invalidate the bootstrap and/or package caches, e.g. changes to <tt>--mode</tt>, <tt>--architecture</tt>, or <tt>--bootstrap</tt>, you must use <tt>lb clean --purge</tt>. See the <tt>lb_clean</tt> man page for a full list of options.
|
||
</p>
|
||
</div>
|
||
|
||
<br><hr width=90% /><br>
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#324" class="lnkocn">324</a></label>
|
||
<h5 class="norm" id="324"><a name="324"></a>
|
||
<a name="h5.2" ></a><a name="live-boot" ></a>5.2 The live-boot package
|
||
</h5>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#325" class="lnkocn">325</a></label>
|
||
<p class="i0" id="325">
|
||
<i>live-boot</i> is a collection of scripts providing hooks for the <i>initramfs-tools</i>, used to generate an initramfs capable of booting live systems, such as those created by <i>live-build</i>. This includes the live system ISOs, netboot tarballs, and USB stick images.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#326" class="lnkocn">326</a></label>
|
||
<p class="i0" id="326">
|
||
At boot time it will look for read-only media containing a <tt>/live/</tt> directory where a root filesystem (often a compressed filesystem image like squashfs) is stored. If found, it will create a writable environment, using aufs, for Debian like systems to boot from.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#327" class="lnkocn">327</a></label>
|
||
<p class="i0" id="327">
|
||
More information on initial ramfs in Debian can be found in the Debian Linux Kernel Handbook at ‹<a href="http://kernel-handbook.alioth.debian.org/" target="_top">http://kernel-handbook.alioth.debian.org/</a>› in the chapter on initramfs.
|
||
</p>
|
||
</div>
|
||
|
||
<br><hr width=90% /><br>
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#328" class="lnkocn">328</a></label>
|
||
<h5 class="norm" id="328"><a name="328"></a>
|
||
<a name="h5.3" ></a><a name="live-config" ></a>5.3 The live-config package
|
||
</h5>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#329" class="lnkocn">329</a></label>
|
||
<p class="i0" id="329">
|
||
<i>live-config</i> consists of the scripts that run at boot time after <i>live-boot</i> to configure the live system automatically. It handles such tasks as setting the hostname, locales and timezone, creating the live user, inhibiting cron jobs and performing autologin of the live user.
|
||
</p>
|
||
</div>
|
||
|
||
<br><hr width=90% /><br>
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#330" class="lnkocn">330</a></label>
|
||
<h1 class="norm" id="330"><a name="330"></a>
|
||
Managing a configuration
|
||
</h1>
|
||
</div>
|
||
|
||
<br><hr width=90% /><br>
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#331" class="lnkocn">331</a></label>
|
||
<h4 class="norm" id="331"><a name="331"></a>
|
||
<a name="h6" ></a><a name="managing_a_configuration" ></a><a name="managing-a-configuration" ></a>6. Managing a configuration
|
||
</h4>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#332" class="lnkocn">332</a></label>
|
||
<p class="i0" id="332">
|
||
This chapter explains how to manage a live configuration from initial creation, through successive revisions and successive releases of both the <i>live-build</i> software and the live image itself.
|
||
</p>
|
||
</div>
|
||
|
||
<br><hr width=90% /><br>
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#333" class="lnkocn">333</a></label>
|
||
<h5 class="norm" id="333"><a name="333"></a>
|
||
<a name="c6.1" ></a><a name="h6.1" ></a>6.1 Dealing with configuration changes
|
||
</h5>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#334" class="lnkocn">334</a></label>
|
||
<p class="i0" id="334">
|
||
Live configurations rarely are perfect on the first try. It may be fine to pass <tt>lb config</tt> options from the command-line to perform a single build, but it is more typical to revise those options and build again until you are satisfied. To support these changes, you will need auto scripts which ensure your configuration is kept in a consistent state.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#335" class="lnkocn">335</a></label>
|
||
<h6 class="norm" id="335"><a name="335"></a>
|
||
<a name="c6.1.1" ></a><a name="h6.1.1" ></a>6.1.1 Why use auto scripts? What do they do?
|
||
</h6>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#336" class="lnkocn">336</a></label>
|
||
<p class="i0" id="336">
|
||
The <tt>lb config</tt> command stores the options you pass to it in <tt>config/*</tt> files along with many other options set to default values. If you run <tt>lb config</tt> again, it will not reset any option that was defaulted based on your initial options. So, for example, if you run <tt>lb config</tt> again with a new value for <tt>--binary-images</tt>, any dependent options that were defaulted for the old image type may no longer work with the new ones. Nor are these files intended to be read or edited. They store values for over a hundred options, so nobody, let alone yourself, will be able to see in these which options you actually specified. And finally, if you run <tt>lb config</tt>, then upgrade <i>live-build</i> and it happens to rename an option, <tt>config/*</tt> would still contain variables named after the old option that are no longer valid.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#337" class="lnkocn">337</a></label>
|
||
<p class="i0" id="337">
|
||
For all these reasons, <tt>auto/*</tt> scripts will make your life easier. They are simple wrappers to the <tt>lb config</tt>, <tt>lb build</tt> and <tt>lb clean</tt> commands that are designed to help you manage your configuration. The <tt>auto/config</tt> script stores your <tt>lb config</tt> command with all desired options, the <tt>auto/clean</tt> script removes the files containing configuration variable values, and the <tt>auto/build</tt> script keeps a <tt>build.log</tt> of each build. Each of these scripts is run automatically every time you run the corresponding <tt>lb</tt> command. By using these scripts, your configuration is easier to read and is kept internally consistent from one revision to the next. Also, it will be much easier for you identify and fix options which need to change when you upgrade <i>live-build</i> after reading the updated documentation.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#338" class="lnkocn">338</a></label>
|
||
<h6 class="norm" id="338"><a name="338"></a>
|
||
<a name="c6.1.2" ></a><a name="h6.1.2" ></a>6.1.2 Use example auto scripts
|
||
</h6>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#339" class="lnkocn">339</a></label>
|
||
<p class="i0" id="339">
|
||
For your convenience, <i>live-build</i> comes with example auto shell scripts to copy and edit. Start a new, default configuration, then copy the examples into it:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#340" class="lnkocn">340</a></label>
|
||
<p class="code" id="340">
|
||
$ mkdir mylive && cd mylive && lb config<br>
|
||
$ mkdir auto<br>
|
||
$ cp /usr/share/doc/live-build/examples/auto/* auto/<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#341" class="lnkocn">341</a></label>
|
||
<p class="i0" id="341">
|
||
Edit <tt>auto/config</tt>, adding any options as you see fit. For instance:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#342" class="lnkocn">342</a></label>
|
||
<p class="code" id="342">
|
||
#!/bin/sh<br>
|
||
lb config noauto \<br>
|
||
--architectures i386 \<br>
|
||
--linux-flavours 686-pae \<br>
|
||
--binary-images hdd \<br>
|
||
--mirror-bootstrap http://ftp.ch.debian.org/debian/ \<br>
|
||
--mirror-binary http://ftp.ch.debian.org/debian/ \<br>
|
||
"${@}"<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#343" class="lnkocn">343</a></label>
|
||
<p class="i0" id="343">
|
||
Now, each time you use <tt>lb config</tt>, <tt>auto/config</tt> will reset the configuration based on these options. When you want to make changes to them, edit the options in this file instead of passing them to <tt>lb config</tt>. When you use <tt>lb clean</tt>, <tt>auto/clean</tt> will clean up the <tt>config/*</tt> files along with any other build products. And finally, when you use <tt>lb build</tt>, a log of the build will be written by <tt>auto/build</tt> in <tt>build.log</tt>.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#344" class="lnkocn">344</a></label>
|
||
<p class="i0" id="344">
|
||
<b>Note:</b> A special <tt>noauto</tt> parameter is used here to suppress another call to <tt>auto/config</tt>, thereby preventing infinite recursion. Make sure you don't accidentally remove it when making edits. Also, take care to ensure when you split the <tt>lb config</tt> command across multiple lines for readability, as shown in the example above, that you don't forget the backslash (\) at the end of each line that continues to the next.
|
||
</p>
|
||
</div>
|
||
|
||
<br><hr width=90% /><br>
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#345" class="lnkocn">345</a></label>
|
||
<h5 class="norm" id="345"><a name="345"></a>
|
||
<a name="h6.2" ></a><a name="clone-configuration-via-git" ></a>6.2 Clone a configuration published via Git
|
||
</h5>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#346" class="lnkocn">346</a></label>
|
||
<p class="i0" id="346">
|
||
Use the <tt>lb config --config</tt> option to clone a Git repository that contains a live system configuration. If you would like to base your configuration on one maintained by the Live Systems Project, look at ‹<a href="http://http://anonscm.debian.org/cgit/debian-live/" target="_top">http://http://anonscm.debian.org/cgit/debian-live/</a>› for the repository named <tt>live-images</tt> in the category <tt>Packages</tt>. This repository contains the configurations for the live systems <a href="#downloading-prebuilt-images">prebuilt images</a>.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#347" class="lnkocn">347</a></label>
|
||
<p class="i0" id="347">
|
||
For example, to build a standard image, use the <tt>live-images</tt> repository as follows:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#348" class="lnkocn">348</a></label>
|
||
<p class="code" id="348">
|
||
$ mkdir live-images && cd live-images<br>
|
||
$ lb config --config git://http://anonscm.debian.org/git/debian-live/live-images.git <br>
|
||
$ cd images/standard<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#349" class="lnkocn">349</a></label>
|
||
<p class="i0" id="349">
|
||
Edit <tt>auto/config</tt> and any other things you need in the <tt>config</tt> tree to suit your needs. For example, the unofficial non-free prebuilt images are made by simply adding <tt>--archive-areas "main contrib non-free"</tt>.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#350" class="lnkocn">350</a></label>
|
||
<p class="i0" id="350">
|
||
You may optionally define a shortcut in your Git configuration by adding the following to your <tt>${HOME}/.gitconfig</tt>:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#351" class="lnkocn">351</a></label>
|
||
<p class="code" id="351">
|
||
[url "git://http://anonscm.debian.org/git/debian-live/"] <br>
|
||
insteadOf = lso:<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#352" class="lnkocn">352</a></label>
|
||
<p class="i0" id="352">
|
||
This enables you to use <tt>lso:</tt> anywhere you need to specify the address of a <tt>debian-live.alioth.debian.org</tt> git repository. If you also drop the optional <tt>.git</tt> suffix, starting a new image using this configuration is as easy as:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#353" class="lnkocn">353</a></label>
|
||
<p class="code" id="353">
|
||
$ lb config --config lso:live-images<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#354" class="lnkocn">354</a></label>
|
||
<p class="i0" id="354">
|
||
Cloning the entire <tt>live-images</tt> repository pulls the configurations used for several images. If you feel like building a different image after you have finished with the first one, change to another directory and again and optionally, make any changes to suit your needs.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#355" class="lnkocn">355</a></label>
|
||
<p class="i0" id="355">
|
||
In any case, remember that every time you will have to build the image as superuser: <tt>lb build</tt>
|
||
</p>
|
||
</div>
|
||
|
||
<br><hr width=90% /><br>
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#356" class="lnkocn">356</a></label>
|
||
<h1 class="norm" id="356"><a name="356"></a>
|
||
Customizing contents
|
||
</h1>
|
||
</div>
|
||
|
||
<br><hr width=90% /><br>
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#357" class="lnkocn">357</a></label>
|
||
<h4 class="norm" id="357"><a name="357"></a>
|
||
<a name="h7" ></a><a name="customization_overview" ></a><a name="customization-overview" ></a>7. Customization overview
|
||
</h4>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#358" class="lnkocn">358</a></label>
|
||
<p class="i0" id="358">
|
||
This chapter gives an overview of the various ways in which you may customize a live system.
|
||
</p>
|
||
</div>
|
||
|
||
<br><hr width=90% /><br>
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#359" class="lnkocn">359</a></label>
|
||
<h5 class="norm" id="359"><a name="359"></a>
|
||
<a name="c7.1" ></a><a name="h7.1" ></a>7.1 Build time vs. boot time configuration
|
||
</h5>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#360" class="lnkocn">360</a></label>
|
||
<p class="i0" id="360">
|
||
Live system configuration options are divided into build-time options which are options that are applied at build time and boot-time options which are applied at boot time. Boot-time options are further divided into those occurring early in the boot, applied by the <i>live-boot</i> package, and those that happen later in the boot, applied by <i>live-config</i>. Any boot-time option may be modified by the user by specifying it at the boot prompt. The image may also be built with default boot parameters so users can normally just boot directly to the live system without specifying any options when all of the defaults are suitable. In particular, the argument to <tt>lb --bootappend-live</tt> consists of any default kernel command line options for the Live system, such as persistence, keyboard layouts, or timezone. See <a href="#customizing-locale-and-language">Customizing locale and language</a>, for example.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#361" class="lnkocn">361</a></label>
|
||
<p class="i0" id="361">
|
||
Build-time configuration options are described in the <tt>lb config</tt> man page. Boot-time options are described in the man pages for <i>live-boot</i> and <i>live-config</i>. Although the <i>live-boot</i> and <i>live-config</i> packages are installed within the live system you are building, it is recommended that you also install them on your build system for easy reference when you are working on your configuration. It is safe to do so, as none of the scripts contained within them are executed unless the system is configured as a live system.
|
||
</p>
|
||
</div>
|
||
|
||
<br><hr width=90% /><br>
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#362" class="lnkocn">362</a></label>
|
||
<h5 class="norm" id="362"><a name="362"></a>
|
||
<a name="h7.2" ></a><a name="stages-of-the-build" ></a>7.2 Stages of the build
|
||
</h5>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#363" class="lnkocn">363</a></label>
|
||
<p class="i0" id="363">
|
||
The build process is divided into stages, with various customizations applied in sequence in each. The first stage to run is the <b>bootstrap</b> stage. This is the initial phase of populating the chroot directory with packages to make a barebones Debian system. This is followed by the <b>chroot</b> stage, which completes the construction of chroot directory, populating it with all of the packages listed in the configuration, along with any other materials. Most customization of content occurs in this stage. The final stage of preparing the live image is the <b>binary</b> stage, which builds a bootable image, using the contents of the chroot directory to construct the root filesystem for the Live system, and including the installer and any other additional material on the target medium outside of the Live system's filesystem. After the live image is built, if enabled, the source tarball is built in the <b>source</b> stage.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#364" class="lnkocn">364</a></label>
|
||
<p class="i0" id="364">
|
||
Within each of these stages, there is a particular sequence in which commands are applied. These are arranged in such a way as to ensure customizations can be layered in a reasonable fashion. For example, within the <b>chroot</b> stage, preseeds are applied before any packages are installed, packages are installed before any locally included files are copied, and hooks are run later, after all of the materials are in place.
|
||
</p>
|
||
</div>
|
||
|
||
<br><hr width=90% /><br>
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#365" class="lnkocn">365</a></label>
|
||
<h5 class="norm" id="365"><a name="365"></a>
|
||
<a name="c7.3" ></a><a name="h7.3" ></a>7.3 Supplement lb config with files
|
||
</h5>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#366" class="lnkocn">366</a></label>
|
||
<p class="i0" id="366">
|
||
Although <tt>lb config</tt> creates a skeletal configuration in the <tt>config/</tt> directory, to accomplish your goals, you may need to provide additional files in subdirectories of <tt>config/</tt>. Depending on where the files are stored in the configuration, they may be copied into the live system's filesystem or into the binary image filesystem, or may provide build-time configurations of the system that would be cumbersome to pass as command-line options. You may include things such as custom lists of packages, custom artwork, or hook scripts to run either at build time or at boot time, boosting the already considerable flexibility of debian-live with code of your own.
|
||
</p>
|
||
</div>
|
||
|
||
<br><hr width=90% /><br>
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#367" class="lnkocn">367</a></label>
|
||
<h5 class="norm" id="367"><a name="367"></a>
|
||
<a name="c7.4" ></a><a name="h7.4" ></a>7.4 Customization tasks
|
||
</h5>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#368" class="lnkocn">368</a></label>
|
||
<p class="i0" id="368">
|
||
The following chapters are organized by the kinds of customization task users typically perform: <a href="#customizing-package-installation">Customizing package installation</a>, <a href="#customizing-contents">Customizing contents</a> and <a href="#customizing-locale-and-language">Customizing locale and language</a> cover just a few of the things you might want to do.
|
||
</p>
|
||
</div>
|
||
|
||
<br><hr width=90% /><br>
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#369" class="lnkocn">369</a></label>
|
||
<h1 class="norm" id="369"><a name="369"></a>
|
||
Customizing package installation
|
||
</h1>
|
||
</div>
|
||
|
||
<br><hr width=90% /><br>
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#370" class="lnkocn">370</a></label>
|
||
<h4 class="norm" id="370"><a name="370"></a>
|
||
<a name="h8" ></a><a name="customizing_package_installation" ></a><a name="customizing-package-installation" ></a>8. Customizing package installation
|
||
</h4>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#371" class="lnkocn">371</a></label>
|
||
<p class="i0" id="371">
|
||
Perhaps the most basic customization of a live system is the selection of packages to be included in the image. This chapter guides you through the various build-time options to customize <i>live-build</i>'s installation of packages. The broadest choices influencing which packages are available to install in the image are the distribution and archive areas. To ensure decent download speeds, you should choose a nearby distribution mirror. You can also add your own repositories for backports, experimental or custom packages, or include packages directly as files. You can define lists of packages, including metapackages which will install many related packages at once, such as packages for a particular desktop or language. Finally, a number of options give some control over <i>apt</i>, or if you prefer, <i>aptitude</i>, at build time when packages are installed. You may find these handy if you use a proxy, want to disable installation of recommended packages to save space, or need to control which versions of packages are installed via APT pinning, to name a few possibilities.
|
||
</p>
|
||
</div>
|
||
|
||
<br><hr width=90% /><br>
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#372" class="lnkocn">372</a></label>
|
||
<h5 class="norm" id="372"><a name="372"></a>
|
||
<a name="c8.1" ></a><a name="h8.1" ></a>8.1 Package sources
|
||
</h5>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#373" class="lnkocn">373</a></label>
|
||
<h6 class="norm" id="373"><a name="373"></a>
|
||
<a name="c8.1.1" ></a><a name="h8.1.1" ></a>8.1.1 Distribution, archive areas and mode
|
||
</h6>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#374" class="lnkocn">374</a></label>
|
||
<p class="i0" id="374">
|
||
The distribution you choose has the broadest impact on which packages are available to include in your live image. Specify the codename, which defaults to <b>buster</b> for the <b>buster</b> version of <i>live-build</i>. Any current distribution carried in the archive may be specified by its codename here. (See <a href="#terms">Terms</a> for more details.) The <tt>--distribution</tt> option not only influences the source of packages within the archive, but also instructs <i>live-build</i> to behave as needed to build each supported distribution. For example, to build against the <b>unstable</b> release, <b>sid</b>, specify:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#375" class="lnkocn">375</a></label>
|
||
<p class="code" id="375">
|
||
$ lb config --distribution sid<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#376" class="lnkocn">376</a></label>
|
||
<p class="i0" id="376">
|
||
Within the distribution archive, archive areas are major divisions of the archive. In Debian, these are <tt>main</tt>, <tt>contrib</tt> and <tt>non-free</tt>. Only <tt>main</tt> contains software that is part of the Debian distribution, hence that is the default. One or more values may be specified, e.g.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#377" class="lnkocn">377</a></label>
|
||
<p class="code" id="377">
|
||
$ lb config --archive-areas "main contrib non-free"<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#378" class="lnkocn">378</a></label>
|
||
<p class="i0" id="378">
|
||
Experimental support is available for some Debian derivatives through a <tt>--mode</tt> option. By default, this option is set to <tt>debian</tt> only if you are building on a Debian or on an unknown system. If <tt>lb config</tt> is invoked on any of the supported derivatives, it will default to create an image of that derivative. If <tt>lb config</tt> is run in e.g. <tt>ubuntu</tt> mode, the distribution names and archive areas for the specified derivative are supported instead of the ones for Debian. The mode also modifies <i>live-build</i> behaviour to suit the derivatives.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#379" class="lnkocn">379</a></label>
|
||
<p class="i0" id="379">
|
||
<b>Note:</b> The projects for whom these modes were added are primarily responsible for supporting users of these options. The Live Systems Project, in turn, provides development support on a best-effort basis only, based on feedback from the derivative projects as we do not develop or support these derivatives ourselves.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#380" class="lnkocn">380</a></label>
|
||
<h6 class="norm" id="380"><a name="380"></a>
|
||
<a name="c8.1.2" ></a><a name="h8.1.2" ></a>8.1.2 Distribution mirrors
|
||
</h6>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#381" class="lnkocn">381</a></label>
|
||
<p class="i0" id="381">
|
||
The Debian archive is replicated across a large network of mirrors around the world so that people in each region can choose a nearby mirror for best download speed. Each of the <tt>--mirror-*</tt> options governs which distribution mirror is used at various stages of the build. Recall from <a href="#stages-of-the-build">Stages of the build</a> that the <b>bootstrap</b> stage is when the chroot is initially populated by <i>debootstrap</i> with a minimal system, and the <b>chroot</b> stage is when the chroot used to construct the live system's filesystem is built. Thus, the corresponding mirror switches are used for those stages, and later, in the <b>binary</b> stage, the <tt>--mirror-binary</tt> and <tt>--mirror-binary-security</tt> values are used, superseding any mirrors used in an earlier stage.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#382" class="lnkocn">382</a></label>
|
||
<h6 class="norm" id="382"><a name="382"></a>
|
||
<a name="h8.1.3" ></a><a name="distribution-mirrors-build-time" ></a>8.1.3 Distribution mirrors used at build time
|
||
</h6>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#383" class="lnkocn">383</a></label>
|
||
<p class="i0" id="383">
|
||
To set the distribution mirrors used at build time to point at a local mirror, it is sufficient to set <tt>--mirror-bootstrap</tt> and <tt>--mirror-chroot-security</tt> as follows.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#384" class="lnkocn">384</a></label>
|
||
<p class="code" id="384">
|
||
$ lb config --mirror-bootstrap http://localhost/debian/ \<br>
|
||
--mirror-chroot-security http://localhost/debian-security/<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#385" class="lnkocn">385</a></label>
|
||
<p class="i0" id="385">
|
||
The chroot mirror, specified by <tt>--mirror-chroot</tt>, defaults to the <tt>--mirror-bootstrap</tt> value.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#386" class="lnkocn">386</a></label>
|
||
<h6 class="norm" id="386"><a name="386"></a>
|
||
<a name="c8.1.4" ></a><a name="h8.1.4" ></a>8.1.4 Distribution mirrors used at run time
|
||
</h6>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#387" class="lnkocn">387</a></label>
|
||
<p class="i0" id="387">
|
||
The <tt>--mirror-binary*</tt> options govern the distribution mirrors placed in the binary image. These may be used to install additional packages while running the live system. The defaults employ <tt>httpredir.debian.org</tt>, a service that chooses a geographically close mirror based, among other things, on the user's IP family and the availability of the mirrors. This is a suitable choice when you cannot predict which mirror will be best for all of your users. Or you may specify your own values as shown in the example below. An image built from this configuration would only be suitable for users on a network where "<tt>mirror</tt>" is reachable.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#388" class="lnkocn">388</a></label>
|
||
<p class="code" id="388">
|
||
$ lb config --mirror-binary http://mirror/debian/ \<br>
|
||
--mirror-binary-security http://mirror/debian-security/ \<br>
|
||
--mirror-binary-backports http://mirror/debian-backports/<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#389" class="lnkocn">389</a></label>
|
||
<h6 class="norm" id="389"><a name="389"></a>
|
||
<a name="h8.1.5" ></a><a name="additional-repositories" ></a>8.1.5 Additional repositories
|
||
</h6>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#390" class="lnkocn">390</a></label>
|
||
<p class="i0" id="390">
|
||
You may add more repositories, broadening your package choices beyond what is available in your target distribution. These may be, for example, for backports, experimental or custom packages. To configure additional repositories, create <tt>config/archives/your-repository.list.chroot</tt>, and/or <tt>config/archives/your-repository.list.binary</tt> files. As with the <tt>--mirror-*</tt> options, these govern the repositories used in the <b>chroot</b> stage when building the image, and in the <b>binary</b> stage, i.e. for use when running the live system.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#391" class="lnkocn">391</a></label>
|
||
<p class="i0" id="391">
|
||
For example, <tt>config/archives/live.list.chroot</tt> allows you to install packages from the debian-live snapshot repository at live system build time.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#392" class="lnkocn">392</a></label>
|
||
<p class="code" id="392">
|
||
deb http://debian-live.alioth.debian.org/ sid-snapshots main contrib non-free<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#393" class="lnkocn">393</a></label>
|
||
<p class="i0" id="393">
|
||
If you add the same line to <tt>config/archives/live.list.binary</tt>, the repository will be added to your live system's <tt>/etc/apt/sources.list.d/</tt> directory.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#394" class="lnkocn">394</a></label>
|
||
<p class="i0" id="394">
|
||
If such files exist, they will be picked up automatically.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#395" class="lnkocn">395</a></label>
|
||
<p class="i0" id="395">
|
||
You should also put the GPG key used to sign the repository into <tt>config/archives/your-repository.key.{binary,chroot}</tt> files.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#396" class="lnkocn">396</a></label>
|
||
<p class="i0" id="396">
|
||
Should you need custom APT pinning, such APT preferences snippets can be placed in <tt>config/archives/your-repository.pref.{binary,chroot}</tt> files and will be automatically added to your live system's <tt>/etc/apt/preferences.d/</tt> directory.
|
||
</p>
|
||
</div>
|
||
|
||
<br><hr width=90% /><br>
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#397" class="lnkocn">397</a></label>
|
||
<h5 class="norm" id="397"><a name="397"></a>
|
||
<a name="h8.2" ></a><a name="choosing-packages-to-install" ></a>8.2 Choosing packages to install
|
||
</h5>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#398" class="lnkocn">398</a></label>
|
||
<p class="i0" id="398">
|
||
There are a number of ways to choose which packages <i>live-build</i> will install in your image, covering a variety of different needs. You can simply name individual packages to install in a package list. You can also use metapackages in those lists, or select them using package control file fields. And finally, you may place package files in your <tt>config/</tt> tree, which is well suited to testing of new or experimental packages before they are available from a repository.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#399" class="lnkocn">399</a></label>
|
||
<h6 class="norm" id="399"><a name="399"></a>
|
||
<a name="h8.2.1" ></a><a name="package-lists" ></a>8.2.1 Package lists
|
||
</h6>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#400" class="lnkocn">400</a></label>
|
||
<p class="i0" id="400">
|
||
Package lists are a powerful way of expressing which packages should be installed. The list syntax supports conditional sections which makes it easy to build lists and adapt them for use in multiple configurations. Package names may also be injected into the list using shell helpers at build time.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#401" class="lnkocn">401</a></label>
|
||
<p class="i0" id="401">
|
||
<b>Note:</b> The behaviour of <i>live-build</i> when specifying a package that does not exist is determined by your choice of APT utility. See <a href="#choosing-apt-or-aptitude">Choosing apt or aptitude</a> for more details.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#402" class="lnkocn">402</a></label>
|
||
<h6 class="norm" id="402"><a name="402"></a>
|
||
<a name="h8.2.2" ></a><a name="using-metapackages" ></a>8.2.2 Using metapackages
|
||
</h6>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#403" class="lnkocn">403</a></label>
|
||
<p class="i0" id="403">
|
||
The simplest way to populate your package list is to use a task metapackage maintained by your distribution. For example:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#404" class="lnkocn">404</a></label>
|
||
<p class="code" id="404">
|
||
$ lb config<br>
|
||
$ echo task-gnome-desktop > config/package-lists/desktop.list.chroot<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#405" class="lnkocn">405</a></label>
|
||
<p class="i0" id="405">
|
||
This supercedes the older predefined list method supported in <tt>live-build</tt> 2.x. Unlike predefined lists, task metapackages are not specific to the Live System project. Instead, they are maintained by specialist working groups within the distribution and therefore reflect the consensus of each group about which packages best serve the needs of the intended users. They also cover a much broader range of use cases than the predefined lists they replace.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#406" class="lnkocn">406</a></label>
|
||
<p class="i0" id="406">
|
||
All task metapackages are prefixed <tt>task-</tt>, so a quick way to determine which are available (though it may contain a handful of false hits that match the name but aren't metapackages) is to match on the package name with:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#407" class="lnkocn">407</a></label>
|
||
<p class="code" id="407">
|
||
$ apt-cache search --names-only ^task-<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#408" class="lnkocn">408</a></label>
|
||
<p class="i0" id="408">
|
||
In addition to these, you will find other metapackages with various purposes. Some are subsets of broader task packages, like <tt>gnome-core</tt>, while others are individual specialized parts of a Debian Pure Blend, such as the <tt>education-*</tt> metapackages. To list all metapackages in the archive, install the <tt>debtags</tt> package and list all packages with the <tt>role::metapackage</tt> tag as follows:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#409" class="lnkocn">409</a></label>
|
||
<p class="code" id="409">
|
||
$ debtags search role::metapackage<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#410" class="lnkocn">410</a></label>
|
||
<h6 class="norm" id="410"><a name="410"></a>
|
||
<a name="c8.2.3" ></a><a name="h8.2.3" ></a>8.2.3 Local package lists
|
||
</h6>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#411" class="lnkocn">411</a></label>
|
||
<p class="i0" id="411">
|
||
Whether you list metapackages, individual packages, or a combination of both, all local package lists are stored in <tt>config/package-lists/</tt>. Since more than one list can be used, this lends itself well to modular designs. For example, you may decide to devote one list to a particular choice of desktop, another to a collection of related packages that might as easily be used on top of a different desktop. This allows you to experiment with different combinations of sets of packages with a minimum of fuss, sharing common lists between different live image projects.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#412" class="lnkocn">412</a></label>
|
||
<p class="i0" id="412">
|
||
Package lists that exist in this directory need to have a <tt>.list</tt> suffix in order to be processed, and then an additional stage suffix, <tt>.chroot</tt> or <tt>.binary</tt> to indicate which stage the list is for.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#413" class="lnkocn">413</a></label>
|
||
<p class="i0" id="413">
|
||
<b>Note:</b> If you don't specify the stage suffix, the list will be used for both stages. Normally, you want to specify <tt>.list.chroot</tt> so that the packages will only be installed in the live filesystem and not have an extra copy of the <tt>.deb</tt> placed on the medium.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#414" class="lnkocn">414</a></label>
|
||
<h6 class="norm" id="414"><a name="414"></a>
|
||
<a name="c8.2.4" ></a><a name="h8.2.4" ></a>8.2.4 Local binary package lists
|
||
</h6>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#415" class="lnkocn">415</a></label>
|
||
<p class="i0" id="415">
|
||
To make a binary stage list, place a file suffixed with <tt>.list.binary</tt> in <tt>config/package-lists/</tt>. These packages are not installed in the live filesystem, but are included on the live medium under <tt>pool/</tt>. You would typically use such a list with one of the non-live installer variants. As mentioned above, if you want this list to be the same as your chroot stage list, simply use the <tt>.list</tt> suffix by itself.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#416" class="lnkocn">416</a></label>
|
||
<h6 class="norm" id="416"><a name="416"></a>
|
||
<a name="h8.2.5" ></a><a name="generated-package-lists" ></a>8.2.5 Generated package lists
|
||
</h6>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#417" class="lnkocn">417</a></label>
|
||
<p class="i0" id="417">
|
||
It sometimes happens that the best way to compose a list is to generate it with a script. Any line starting with an exclamation point indicates a command to be executed within the chroot when the image is built. For example, one might include the line <tt>! grep-aptavail -n -sPackage -FPriority standard | sort</tt> in a package list to produce a sorted list of available packages with <tt>Priority: standard</tt>.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#418" class="lnkocn">418</a></label>
|
||
<p class="i0" id="418">
|
||
In fact, selecting packages with the <tt>grep-aptavail</tt> command (from the <tt>dctrl-tools</tt> package) is so useful that <tt>live-build</tt> provides a <tt>Packages</tt> helper script as a convenience. This script takes two arguments: <tt>field</tt> and <tt>pattern</tt>. Thus, you can create a list with the following contents:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#419" class="lnkocn">419</a></label>
|
||
<p class="code" id="419">
|
||
$ lb config<br>
|
||
$ echo '! Packages Priority standard' > config/package-lists/standard.list.chroot<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#420" class="lnkocn">420</a></label>
|
||
<h6 class="norm" id="420"><a name="420"></a>
|
||
<a name="c8.2.6" ></a><a name="h8.2.6" ></a>8.2.6 Using conditionals inside package lists
|
||
</h6>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#421" class="lnkocn">421</a></label>
|
||
<p class="i0" id="421">
|
||
Any of the <i>live-build</i> configuration variables stored in <tt>config/*</tt> (minus the <tt>LB_</tt> prefix) may be used in conditional statements in package lists. Generally, this means any <tt>lb config</tt> option uppercased and with dashes changed to underscores. But in practice, it is only the ones that influence package selection that make sense, such as <tt>DISTRIBUTION</tt>, <tt>ARCHITECTURES</tt> or <tt>ARCHIVE_AREAS</tt>.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#422" class="lnkocn">422</a></label>
|
||
<p class="i0" id="422">
|
||
For example, to install <tt>ia32-libs</tt> if the <tt>--architectures amd64</tt> is specified:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#423" class="lnkocn">423</a></label>
|
||
<p class="code" id="423">
|
||
#if ARCHITECTURES amd64<br>
|
||
ia32-libs<br>
|
||
#endif<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#424" class="lnkocn">424</a></label>
|
||
<p class="i0" id="424">
|
||
You may test for any one of a number of values, e.g. to install <i>memtest86+</i> if either <tt>--architectures i386</tt> or <tt>--architectures amd64</tt> is specified:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#425" class="lnkocn">425</a></label>
|
||
<p class="code" id="425">
|
||
#if ARCHITECTURES i386 amd64<br>
|
||
memtest86+<br>
|
||
#endif<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#426" class="lnkocn">426</a></label>
|
||
<p class="i0" id="426">
|
||
You may also test against variables that may contain more than one value, e.g. to install <i>vrms</i> if either <tt>contrib</tt> or <tt>non-free</tt> is specified via <tt>--archive-areas</tt>:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#427" class="lnkocn">427</a></label>
|
||
<p class="code" id="427">
|
||
#if ARCHIVE_AREAS contrib non-free<br>
|
||
vrms<br>
|
||
#endif<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#428" class="lnkocn">428</a></label>
|
||
<p class="i0" id="428">
|
||
The nesting of conditionals is not supported.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#429" class="lnkocn">429</a></label>
|
||
<h6 class="norm" id="429"><a name="429"></a>
|
||
<a name="c8.2.7" ></a><a name="h8.2.7" ></a>8.2.7 Removing packages at install time
|
||
</h6>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#430" class="lnkocn">430</a></label>
|
||
<p class="i0" id="430">
|
||
You can list packages in files with <tt>.list.chroot_live</tt> and <tt>.list.chroot_install</tt> suffixes inside the <tt>config/package-lists</tt> directory. If both a live and an install list exist, the packages in the <tt>.list.chroot_live</tt> list are removed with a hook after the installation (if the user uses the installer). The packages in the <tt>.list.chroot_install</tt> list are present both in the live system and in the installed system. This is a special tweak for the installer and may be useful if you have <tt>--debian-installer live</tt> set in your config, and wish to remove live system-specific packages at install time.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#431" class="lnkocn">431</a></label>
|
||
<h6 class="norm" id="431"><a name="431"></a>
|
||
<a name="h8.2.8" ></a><a name="desktop-and-language-tasks" ></a>8.2.8 Desktop and language tasks
|
||
</h6>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#432" class="lnkocn">432</a></label>
|
||
<p class="i0" id="432">
|
||
Desktop and language tasks are special cases that need some extra planning and configuration. Live images are different from Debian Installer images in this respect. In the Debian Installer, if the medium was prepared for a particular desktop environment flavour, the corresponding task will be automatically installed. Thus, there are internal <tt>gnome-desktop</tt>, <tt>kde-desktop</tt>, <tt>lxde-desktop</tt> and <tt>xfce-desktop</tt> tasks, none of which are offered in <tt>tasksel</tt>'s menu. Likewise, there are no menu entries for tasks for languages, but the user's language choice during the install influences the selection of corresponding language tasks.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#433" class="lnkocn">433</a></label>
|
||
<p class="i0" id="433">
|
||
When developing a desktop live image, the image typically boots directly to a working desktop, the choices of both desktop and default language having been made at build time, not at run time as in the case of the Debian Installer. That's not to say that a live image couldn't be built to support multiple desktops or multiple languages and offer the user a choice, but that is not <i>live-build</i>'s default behaviour.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#434" class="lnkocn">434</a></label>
|
||
<p class="i0" id="434">
|
||
Because there is no provision made automatically for language tasks, which include such things as language-specific fonts and input-method packages, if you want them, you need to specify them in your configuration. For example, a GNOME desktop image containing support for German might include these task metapackages:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#435" class="lnkocn">435</a></label>
|
||
<p class="code" id="435">
|
||
$ lb config<br>
|
||
$ echo "task-gnome-desktop task-laptop" >> config/package-lists/my.list.chroot<br>
|
||
$ echo "task-german task-german-desktop task-german-gnome-desktop" >> config/package-lists/my.list.chroot<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#436" class="lnkocn">436</a></label>
|
||
<h6 class="norm" id="436"><a name="436"></a>
|
||
<a name="h8.2.9" ></a><a name="kernel-flavour-and-version" ></a>8.2.9 Kernel flavour and version
|
||
</h6>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#437" class="lnkocn">437</a></label>
|
||
<p class="i0" id="437">
|
||
One or more kernel flavours will be included in your image by default, depending on the architecture. You can choose different flavours via the <tt>--linux-flavours</tt> option. Each flavour is suffixed to the default stub <tt>linux-image</tt> to form each metapackage name which in turn depends on an exact kernel package to be included in your image.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#438" class="lnkocn">438</a></label>
|
||
<p class="i0" id="438">
|
||
Thus by default, an <tt>amd64</tt> architecture image will include the <tt>linux-image-amd64</tt> flavour metapackage, and an <tt>i386</tt> architecture image will include the <tt>linux-image-586</tt> metapackage.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#439" class="lnkocn">439</a></label>
|
||
<p class="i0" id="439">
|
||
When more than one kernel package version is available in your configured archives, you can specify a different kernel package name stub with the <tt>--linux-packages</tt> option. For example, supposing you are building an <tt>amd64</tt> architecture image and add the experimental archive for testing purposes so you can install the <tt>linux-image-3.18.0-trunk-amd64</tt> kernel. You would configure that image as follows:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#440" class="lnkocn">440</a></label>
|
||
<p class="code" id="440">
|
||
$ lb config --linux-packages linux-image-3.18.0-trunk<br>
|
||
$ echo "deb http://ftp.debian.org/debian/ experimental main" > config/archives/experimental.list.chroot<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#441" class="lnkocn">441</a></label>
|
||
<h6 class="norm" id="441"><a name="441"></a>
|
||
<a name="h8.2.10" ></a><a name="custom-kernels" ></a>8.2.10 Custom kernels
|
||
</h6>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#442" class="lnkocn">442</a></label>
|
||
<p class="i0" id="442">
|
||
You can build and include your own custom kernels, so long as they are integrated within the Debian package management system. The <i>live-build</i> system does not support kernels not built as <tt>.deb</tt> packages.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#443" class="lnkocn">443</a></label>
|
||
<p class="i0" id="443">
|
||
The proper and recommended way to deploy your own kernel packages is to follow the instructions in the <tt>kernel-handbook</tt>. Remember to modify the ABI and flavour suffixes appropriately, then include a complete build of the <tt>linux</tt> and matching <tt>linux-latest</tt> packages in your repository.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#444" class="lnkocn">444</a></label>
|
||
<p class="i0" id="444">
|
||
If you opt to build the kernel packages without the matching metapackages, you need to specify an appropriate <tt>--linux-packages</tt> stub as discussed in <a href="#kernel-flavour-and-version">Kernel flavour and version</a>. As we explain in <a href="#installing-modified-or-third-party-packages">Installing modified or third-party packages</a>, it is best if you include your custom kernel packages in your own repository, though the alternatives discussed in that section work as well.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#445" class="lnkocn">445</a></label>
|
||
<p class="i0" id="445">
|
||
It is beyond the scope of this document to give advice on how to customize your kernel. However, you must at least ensure your configuration satisfies these minimum requirements:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#446" class="lnkocn">446</a></label>
|
||
<ul>
|
||
<li class="bullet" id="446">
|
||
Use an initial ramdisk.
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#447" class="lnkocn">447</a></label>
|
||
<ul>
|
||
<li class="bullet" id="447">
|
||
Include the union filesystem module (i.e. usually <tt>aufs</tt>).
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#448" class="lnkocn">448</a></label>
|
||
<ul>
|
||
<li class="bullet" id="448">
|
||
Include any other filesystem modules required by your configuration (i.e. usually <tt>squashfs</tt>).
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<br><hr width=90% /><br>
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#449" class="lnkocn">449</a></label>
|
||
<h5 class="norm" id="449"><a name="449"></a>
|
||
<a name="h8.3" ></a><a name="installing-modified-or-third-party-packages" ></a>8.3 Installing modified or third-party packages
|
||
</h5>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#450" class="lnkocn">450</a></label>
|
||
<p class="i0" id="450">
|
||
While it is against the philosophy of a live system, it may sometimes be necessary to build a live system with modified versions of packages that are in the Debian repository. This may be to modify or support additional features, languages and branding, or even to remove elements of existing packages that are undesirable. Similarly, "third-party" packages may be used to add bespoke and/or proprietary functionality.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#451" class="lnkocn">451</a></label>
|
||
<p class="i0" id="451">
|
||
This section does not cover advice regarding building or maintaining modified packages. Joachim Breitner's 'How to fork privately' method from ‹<a href="http://www.joachim-breitner.de/blog/archives/282-How-to-fork-privately.html" target="_top">http://www.joachim-breitner.de/blog/archives/282-How-to-fork-privately.html</a>› may be of interest, however. The creation of bespoke packages is covered in the Debian New Maintainers' Guide at ‹<a href="https://www.debian.org/doc/maint-guide/" target="_top">https://www.debian.org/doc/maint-guide/</a>› and elsewhere.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#452" class="lnkocn">452</a></label>
|
||
<p class="i0" id="452">
|
||
There are two ways of installing modified custom packages:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#453" class="lnkocn">453</a></label>
|
||
<ul>
|
||
<li class="bullet" id="453">
|
||
<tt>packages.chroot</tt>
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#454" class="lnkocn">454</a></label>
|
||
<ul>
|
||
<li class="bullet" id="454">
|
||
Using a custom APT repository
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#455" class="lnkocn">455</a></label>
|
||
<p class="i0" id="455">
|
||
Using <tt>packages.chroot</tt> is simpler to achieve and useful for "one-off" customizations but has a number of drawbacks, while using a custom APT repository is more time-consuming to set up.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#456" class="lnkocn">456</a></label>
|
||
<h6 class="norm" id="456"><a name="456"></a>
|
||
<a name="c8.3.1" ></a><a name="h8.3.1" ></a>8.3.1 Using <tt>packages.chroot</tt> to install custom packages
|
||
</h6>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#457" class="lnkocn">457</a></label>
|
||
<p class="i0" id="457">
|
||
To install a custom package, simply copy it to the <tt>config/packages.chroot/</tt> directory. Packages that are inside this directory will be automatically installed into the live system during build - you do not need to specify them elsewhere.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#458" class="lnkocn">458</a></label>
|
||
<p class="i0" id="458">
|
||
Packages <b>must</b> be named in the prescribed way. One simple way to do this is to use <tt>dpkg-name</tt>.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#459" class="lnkocn">459</a></label>
|
||
<p class="i0" id="459">
|
||
Using <tt>packages.chroot</tt> for installation of custom packages has disadvantages:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#460" class="lnkocn">460</a></label>
|
||
<ul>
|
||
<li class="bullet" id="460">
|
||
It is not possible to use secure APT.
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#461" class="lnkocn">461</a></label>
|
||
<ul>
|
||
<li class="bullet" id="461">
|
||
You must install all appropriate packages in the <tt>config/packages.chroot/</tt> directory.
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#462" class="lnkocn">462</a></label>
|
||
<ul>
|
||
<li class="bullet" id="462">
|
||
It does not lend itself to storing live system configurations in revision control.
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#463" class="lnkocn">463</a></label>
|
||
<h6 class="norm" id="463"><a name="463"></a>
|
||
<a name="c8.3.2" ></a><a name="h8.3.2" ></a>8.3.2 Using an APT repository to install custom packages
|
||
</h6>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#464" class="lnkocn">464</a></label>
|
||
<p class="i0" id="464">
|
||
Unlike using <tt>packages.chroot</tt>, when using a custom APT repository you must ensure that you specify the packages elsewhere. See <a href="#choosing-packages-to-install">Choosing packages to install</a> for details.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#465" class="lnkocn">465</a></label>
|
||
<p class="i0" id="465">
|
||
While it may seem unnecessary effort to create an APT repository to install custom packages, the infrastructure can be easily re-used at a later date to offer updates of the modified packages.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#466" class="lnkocn">466</a></label>
|
||
<h6 class="norm" id="466"><a name="466"></a>
|
||
<a name="c8.3.3" ></a><a name="h8.3.3" ></a>8.3.3 Custom packages and APT
|
||
</h6>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#467" class="lnkocn">467</a></label>
|
||
<p class="i0" id="467">
|
||
<i>live-build</i> uses APT to install all packages into the live system so will therefore inherit behaviours from this program. One relevant example is that (assuming a default configuration) given a package available in two different repositories with different version numbers, APT will elect to install the package with the higher version number.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#468" class="lnkocn">468</a></label>
|
||
<p class="i0" id="468">
|
||
Because of this, you may wish to increment the version number in your custom packages' <tt>debian/changelog</tt> files to ensure that your modified version is installed over one in the official Debian repositories. This may also be achieved by altering the live system's APT pinning preferences - see <a href="#apt-pinning">APT pinning</a> for more information.
|
||
</p>
|
||
</div>
|
||
|
||
<br><hr width=90% /><br>
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#469" class="lnkocn">469</a></label>
|
||
<h5 class="norm" id="469"><a name="469"></a>
|
||
<a name="c8.4" ></a><a name="h8.4" ></a>8.4 Configuring APT at build time
|
||
</h5>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#470" class="lnkocn">470</a></label>
|
||
<p class="i0" id="470">
|
||
You can configure APT through a number of options applied only at build time. (APT configuration used in the running live system may be configured in the normal way for live system contents, that is, by including the appropriate configurations through <tt>config/includes.chroot/</tt>.) For a complete list, look for options starting with <tt>apt</tt> in the <tt>lb_config</tt> man page.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#471" class="lnkocn">471</a></label>
|
||
<h6 class="norm" id="471"><a name="471"></a>
|
||
<a name="h8.4.1" ></a><a name="choosing-apt-or-aptitude" ></a>8.4.1 Choosing apt or aptitude
|
||
</h6>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#472" class="lnkocn">472</a></label>
|
||
<p class="i0" id="472">
|
||
You can elect to use either <i>apt</i> or <i>aptitude</i> when installing packages at build time. Which utility is used is governed by the <tt>--apt</tt> argument to <tt>lb config</tt>. Choose the method implementing the preferred behaviour for package installation, the notable difference being how missing packages are handled.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#473" class="lnkocn">473</a></label>
|
||
<ul>
|
||
<li class="bullet" id="473">
|
||
<tt>apt</tt>: With this method, if a missing package is specified, the package installation will fail. This is the default setting.
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#474" class="lnkocn">474</a></label>
|
||
<ul>
|
||
<li class="bullet" id="474">
|
||
<tt>aptitude</tt>: With this method, if a missing package is specified, the package installation will succeed.
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#475" class="lnkocn">475</a></label>
|
||
<h6 class="norm" id="475"><a name="475"></a>
|
||
<a name="c8.4.2" ></a><a name="h8.4.2" ></a>8.4.2 Using a proxy with APT
|
||
</h6>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#476" class="lnkocn">476</a></label>
|
||
<p class="i0" id="476">
|
||
One commonly required APT configuration is to deal with building an image behind a proxy. You may specify your APT proxy with the <tt>--apt-ftp-proxy</tt> or <tt>--apt-http-proxy</tt> options as needed, e.g.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#477" class="lnkocn">477</a></label>
|
||
<p class="code" id="477">
|
||
$ lb config --apt-http-proxy http://proxy/<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#478" class="lnkocn">478</a></label>
|
||
<h6 class="norm" id="478"><a name="478"></a>
|
||
<a name="h8.4.3" ></a><a name="tweaking-apt-to-save-space" ></a>8.4.3 Tweaking APT to save space
|
||
</h6>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#479" class="lnkocn">479</a></label>
|
||
<p class="i0" id="479">
|
||
You may find yourself needing to save some space on the image medium, in which case one or the other or both of the following options may be of interest.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#480" class="lnkocn">480</a></label>
|
||
<p class="i0" id="480">
|
||
If you don't want to include APT indices in the image, you can omit those with:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#481" class="lnkocn">481</a></label>
|
||
<p class="code" id="481">
|
||
$ lb config --apt-indices false<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#482" class="lnkocn">482</a></label>
|
||
<p class="i0" id="482">
|
||
This will not influence the entries in <tt>/etc/apt/sources.list</tt>, but merely whether <tt>/var/lib/apt</tt> contains the indices files or not. The tradeoff is that APT needs those indices in order to operate in the live system, so before performing <tt>apt-cache search</tt> or <tt>apt-get install</tt>, for instance, the user must <tt>apt-get update</tt> first to create those indices.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#483" class="lnkocn">483</a></label>
|
||
<p class="i0" id="483">
|
||
If you find the installation of recommended packages bloats your image too much, provided you are prepared to deal with the consequences discussed below, you may disable that default option of APT with:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#484" class="lnkocn">484</a></label>
|
||
<p class="code" id="484">
|
||
$ lb config --apt-recommends false<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#485" class="lnkocn">485</a></label>
|
||
<p class="i0" id="485">
|
||
The most important consequence of turning off recommends is that <tt>live-boot</tt> and <tt>live-config</tt> themselves recommend some packages that provide important functionality used by most Live configurations, such as <tt>user-setup</tt> which <tt>live-config</tt> recommends and is used to create the live user. In all but the most exceptional circumstances you need to add back at least some of these recommends to your package lists or else your image will not work as expected, if at all. Look at the recommended packages for each of the <tt>live-*</tt> packages included in your build and if you are not certain you can omit them, add them back into your package lists.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#486" class="lnkocn">486</a></label>
|
||
<p class="i0" id="486">
|
||
The more general consequence is that if you don't install recommended packages for any given package, that is, "packages that would be found together with this one in all but unusual installations" (Debian Policy Manual, section 7.2), some packages that users of your Live system actually need may be omitted. Therefore, we suggest you review the difference turning off recommends makes to your packages list (see the <tt>binary.packages</tt> file generated by <tt>lb build</tt>) and re-include in your list any missing packages that you still want installed. Alternatively, if you find you only want a small number of recommended packages left out, leave recommends enabled and set a negative APT pin priority on selected packages to prevent them from being installed, as explained in <a href="#apt-pinning">APT pinning</a>.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#487" class="lnkocn">487</a></label>
|
||
<h6 class="norm" id="487"><a name="487"></a>
|
||
<a name="c8.4.4" ></a><a name="h8.4.4" ></a>8.4.4 Passing options to apt or aptitude
|
||
</h6>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#488" class="lnkocn">488</a></label>
|
||
<p class="i0" id="488">
|
||
If there is not a <tt>lb config</tt> option to alter APT's behaviour in the way you need, use <tt>--apt-options</tt> or <tt>--aptitude-options</tt> to pass any options through to your configured APT tool. See the man pages for <tt>apt</tt> and <tt>aptitude</tt> for details. Note that both options have default values that you will need to retain in addition to any overrides you may provide. So, for example, suppose you have included something from <tt>snapshot.debian.org</tt> for testing purposes and want to specify <tt>Acquire::Check-Valid-Until=false</tt> to make APT happy with the stale <tt>Release</tt> file, you would do so as per the following example, appending the new option after the default value <tt>--yes</tt>:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#489" class="lnkocn">489</a></label>
|
||
<p class="code" id="489">
|
||
$ lb config --apt-options "--yes -oAcquire::Check-Valid-Until=false"<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#490" class="lnkocn">490</a></label>
|
||
<p class="i0" id="490">
|
||
Please check the man pages to fully understand these options and when to use them. This is an example only and should not be construed as advice to configure your image this way. This option would not be appropriate for, say, a final release of a live image.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#491" class="lnkocn">491</a></label>
|
||
<p class="i0" id="491">
|
||
For more complicated APT configurations involving <tt>apt.conf</tt> options you might want to create a <tt>config/apt/apt.conf</tt> file instead. See also the other <tt>apt-*</tt> options for a few convenient shortcuts for frequently needed options.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#492" class="lnkocn">492</a></label>
|
||
<h6 class="norm" id="492"><a name="492"></a>
|
||
<a name="h8.4.5" ></a><a name="apt-pinning" ></a>8.4.5 APT pinning
|
||
</h6>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#493" class="lnkocn">493</a></label>
|
||
<p class="i0" id="493">
|
||
For background, please first read the <tt>apt_preferences(5)</tt> man page. APT pinning can be configured either for build time, or else for run time. For the former, create <tt>config/archives/*.pref</tt>, <tt>config/archives/*.pref.chroot</tt>, and <tt>config/apt/preferences</tt>. For the latter, create <tt>config/includes.chroot/etc/apt/preferences</tt>.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#494" class="lnkocn">494</a></label>
|
||
<p class="i0" id="494">
|
||
Let's say you are building a <b>buster</b> live system but need all the live packages that end up in the binary image to be installed from <b>sid</b> at build time. You need to add <b>sid</b> to your APT sources and pin the live packages from it higher, but all other packages from it lower, than the default priority. Thus, only the packages you want are installed from <b>sid</b> at build time and all others are taken from the target system distribution, <b>buster</b>. The following will accomplish this:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#495" class="lnkocn">495</a></label>
|
||
<p class="code" id="495">
|
||
$ echo "deb http://mirror/debian/ sid main" > config/archives/sid.list.chroot<br>
|
||
$ cat >> config/archives/sid.pref.chroot << EOF<br>
|
||
Package: live-*<br>
|
||
Pin: release n=sid<br>
|
||
Pin-Priority: 600<br><br>
|
||
Package: *<br>
|
||
Pin: release n=sid<br>
|
||
Pin-Priority: 1<br>
|
||
EOF<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#496" class="lnkocn">496</a></label>
|
||
<p class="i0" id="496">
|
||
Negative pin priorities will prevent a package from being installed, as in the case where you do not want a package that is recommended by another package. Suppose you are building an LXDE image using <tt>task-lxde-desktop</tt> in <tt>config/package-lists/desktop.list.chroot</tt>, but don't want the user prompted to store wifi passwords in the keyring. This metapackage depends on <i>lxde-core</i>, which recommends <i>gksu</i>, which in turn recommends <i>gnome-keyring</i>. So you want to omit the recommended <i>gnome-keyring</i> package. This can be done by adding the following stanza to <tt>config/apt/preferences</tt>:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#497" class="lnkocn">497</a></label>
|
||
<p class="code" id="497">
|
||
Package: gnome-keyring<br>
|
||
Pin: version *<br>
|
||
Pin-Priority: -1<br>
|
||
</p>
|
||
</div>
|
||
|
||
<br><hr width=90% /><br>
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#498" class="lnkocn">498</a></label>
|
||
<h1 class="norm" id="498"><a name="498"></a>
|
||
Customizing contents
|
||
</h1>
|
||
</div>
|
||
|
||
<br><hr width=90% /><br>
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#499" class="lnkocn">499</a></label>
|
||
<h4 class="norm" id="499"><a name="499"></a>
|
||
<a name="h9" ></a><a name="customizing_contents" ></a><a name="customizing-contents" ></a>9. Customizing contents
|
||
</h4>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#500" class="lnkocn">500</a></label>
|
||
<p class="i0" id="500">
|
||
This chapter discusses fine-tuning customization of the live system contents beyond merely choosing which packages to include. Includes allow you to add or replace arbitrary files in your live system image, hooks allow you to execute arbitrary commands at different stages of the build and at boot time, and preseeding allows you to configure packages when they are installed by supplying answers to debconf questions.
|
||
</p>
|
||
</div>
|
||
|
||
<br><hr width=90% /><br>
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#501" class="lnkocn">501</a></label>
|
||
<h5 class="norm" id="501"><a name="501"></a>
|
||
<a name="h9.1" ></a><a name="includes" ></a>9.1 Includes
|
||
</h5>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#502" class="lnkocn">502</a></label>
|
||
<p class="i0" id="502">
|
||
While ideally a live system would include files entirely provided by unmodified packages, it is sometimes convenient to provide or modify some content by means of files. Using includes, it is possible to add (or replace) arbitrary files in your live system image. <i>live-build</i> provides two mechanisms for using them:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#503" class="lnkocn">503</a></label>
|
||
<ul>
|
||
<li class="bullet" id="503">
|
||
Chroot local includes: These allow you to add or replace files to the chroot/Live filesystem. Please see <a href="#live-chroot-local-includes">Live/chroot local includes</a> for more information.
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#504" class="lnkocn">504</a></label>
|
||
<ul>
|
||
<li class="bullet" id="504">
|
||
Binary local includes: These allow you to add or replace files in the binary image. Please see <a href="#binary-local-includes">Binary local includes</a> for more information.
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#505" class="lnkocn">505</a></label>
|
||
<p class="i0" id="505">
|
||
Please see <a href="#terms">Terms</a> for more information about the distinction between the "Live" and "binary" images.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#506" class="lnkocn">506</a></label>
|
||
<h6 class="norm" id="506"><a name="506"></a>
|
||
<a name="h9.1.1" ></a><a name="live-chroot-local-includes" ></a>9.1.1 Live/chroot local includes
|
||
</h6>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#507" class="lnkocn">507</a></label>
|
||
<p class="i0" id="507">
|
||
Chroot local includes can be used to add or replace files in the chroot/Live filesystem so that they may be used in the Live system. A typical use is to populate the skeleton user directory (<tt>/etc/skel</tt>) used by the Live system to create the live user's home directory. Another is to supply configuration files that can be simply added or replaced in the image without processing; see <a href="#chroot-local-hooks">Chroot local hooks</a> if processing is needed.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#508" class="lnkocn">508</a></label>
|
||
<p class="i0" id="508">
|
||
To include files, simply add them to your <tt>config/includes.chroot</tt> directory. This directory corresponds to the root directory <tt>/</tt> of the live system. For example, to add a file <tt>/var/www/index.html</tt> in the live system, use:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#509" class="lnkocn">509</a></label>
|
||
<p class="code" id="509">
|
||
$ mkdir -p config/includes.chroot/var/www<br>
|
||
$ cp /path/to/my/index.html config/includes.chroot/var/www<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#510" class="lnkocn">510</a></label>
|
||
<p class="i0" id="510">
|
||
Your configuration will then have the following layout:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#511" class="lnkocn">511</a></label>
|
||
<p class="code" id="511">
|
||
-- config<br>
|
||
[...]<br>
|
||
|-- includes.chroot<br>
|
||
| `-- var<br>
|
||
| `-- www<br>
|
||
| `-- index.html<br>
|
||
[...]<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#512" class="lnkocn">512</a></label>
|
||
<p class="i0" id="512">
|
||
Chroot local includes are installed after package installation so that files installed by packages are overwritten.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#513" class="lnkocn">513</a></label>
|
||
<h6 class="norm" id="513"><a name="513"></a>
|
||
<a name="h9.1.2" ></a><a name="binary-local-includes" ></a>9.1.2 Binary local includes
|
||
</h6>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#514" class="lnkocn">514</a></label>
|
||
<p class="i0" id="514">
|
||
To include material such as documentation or videos on the medium filesystem so that it is accessible immediately upon insertion of the medium without booting the Live system, you can use binary local includes. This works in a similar fashion to chroot local includes. For example, suppose the files <tt>~/video_demo.*</tt> are demo videos of the live system described by and linked to by an HTML index page. Simply copy the material to <tt>config/includes.binary/</tt> as follows:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#515" class="lnkocn">515</a></label>
|
||
<p class="code" id="515">
|
||
$ cp ~/video_demo.* config/includes.binary/<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#516" class="lnkocn">516</a></label>
|
||
<p class="i0" id="516">
|
||
These files will now appear in the root directory of the live medium.
|
||
</p>
|
||
</div>
|
||
|
||
<br><hr width=90% /><br>
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#517" class="lnkocn">517</a></label>
|
||
<h5 class="norm" id="517"><a name="517"></a>
|
||
<a name="h9.2" ></a><a name="hooks" ></a>9.2 Hooks
|
||
</h5>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#518" class="lnkocn">518</a></label>
|
||
<p class="i0" id="518">
|
||
Hooks allow commands to be run in the chroot and binary stages of the build in order to customize the image. Depending on whether you are building a live image or a regular system image you have to place your hooks in <tt>config/hooks/live</tt> or <tt>config/hooks/normal</tt> respectively. These are frequently referred to as local hooks because they are executed inside the build environment.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#519" class="lnkocn">519</a></label>
|
||
<p class="i0" id="519">
|
||
There are also boot-time hooks that allow you to run commands once the image has already been built, during the boot process.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#520" class="lnkocn">520</a></label>
|
||
<h6 class="norm" id="520"><a name="520"></a>
|
||
<a name="h9.2.1" ></a><a name="chroot-local-hooks" ></a>9.2.1 Chroot local hooks
|
||
</h6>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#521" class="lnkocn">521</a></label>
|
||
<p class="i0" id="521">
|
||
To run commands in the chroot stage, create a hook script with a <tt>.hook.chroot</tt> suffix containing the commands either in the <tt>config/hooks/live</tt> or <tt>config/hooks/normal</tt> directories. The hook will run in the chroot after the rest of your chroot configuration has been applied, so remember to ensure your configuration includes all packages and files your hook needs in order to run. See the example chroot hook scripts for various common chroot customization tasks provided in <tt>/usr/share/doc/live-build/examples/hooks</tt> which you can copy or symlink to use them in your own configuration.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#522" class="lnkocn">522</a></label>
|
||
<h6 class="norm" id="522"><a name="522"></a>
|
||
<a name="c9.2.2" ></a><a name="h9.2.2" ></a>9.2.2 Binary local hooks
|
||
</h6>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#523" class="lnkocn">523</a></label>
|
||
<p class="i0" id="523">
|
||
To run commands in the binary stage, create a hook script with a <tt>.hook.binary</tt> suffix containing the commands either in the <tt>config/hooks/live</tt> or <tt>config/hooks/normal</tt> directories. The hook will run after all other binary commands are run, but before binary_checksums, the very last binary command. The commands in your hook do not run in the chroot, so take care not to modify any files outside of the build tree, or you may damage your build system! See the example binary hook scripts for various common binary customization tasks provided in <tt>/usr/share/doc/live-build/examples/hooks</tt> which you can copy or symlink to use them in your own configuration.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#524" class="lnkocn">524</a></label>
|
||
<h6 class="norm" id="524"><a name="524"></a>
|
||
<a name="h9.2.3" ></a><a name="boot-time-hooks" ></a>9.2.3 Boot-time hooks
|
||
</h6>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#525" class="lnkocn">525</a></label>
|
||
<p class="i0" id="525">
|
||
To execute commands at boot time, you can supply <i>live-config</i> hooks as explained in the "Customization" section of its man page. Examine <i>live-config</i>'s own hooks provided in <tt>/lib/live/config/</tt>, noting the sequence numbers. Then provide your own hook prefixed with an appropriate sequence number, either as a chroot local include in <tt>config/includes.chroot/lib/live/config/</tt>, or as a custom package as discussed in <a href="#installing-modified-or-third-party-packages">Installing modified or third-party packages</a>.
|
||
</p>
|
||
</div>
|
||
|
||
<br><hr width=90% /><br>
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#526" class="lnkocn">526</a></label>
|
||
<h5 class="norm" id="526"><a name="526"></a>
|
||
<a name="c9.3" ></a><a name="h9.3" ></a>9.3 Preseeding Debconf questions
|
||
</h5>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#527" class="lnkocn">527</a></label>
|
||
<p class="i0" id="527">
|
||
Files in the <tt>config/preseed/</tt> directory suffixed with <tt>.cfg</tt> followed by the stage (<tt>.chroot</tt> or <tt>.binary</tt>) are considered to be debconf preseed files and are installed by <i>live-build</i> using <tt>debconf-set-selections</tt> during the corresponding stage.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#528" class="lnkocn">528</a></label>
|
||
<p class="i0" id="528">
|
||
For more information about debconf, please see <tt>debconf(7)</tt> in the <i>debconf</i> package.
|
||
</p>
|
||
</div>
|
||
|
||
<br><hr width=90% /><br>
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#529" class="lnkocn">529</a></label>
|
||
<h1 class="norm" id="529"><a name="529"></a>
|
||
Customizing run time behaviours
|
||
</h1>
|
||
</div>
|
||
|
||
<br><hr width=90% /><br>
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#530" class="lnkocn">530</a></label>
|
||
<h4 class="norm" id="530"><a name="530"></a>
|
||
<a name="h10" ></a><a name="customizing_run_time_behaviours" ></a><a name="customizing-run-time-behaviours" ></a>10. Customizing run time behaviours
|
||
</h4>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#531" class="lnkocn">531</a></label>
|
||
<p class="i0" id="531">
|
||
All configuration that is done during run time is done by <i>live-config</i>. Here are some of the most common options of <i>live-config</i> that users are interested in. A full list of all possibilities can be found in the man page of <i>live-config</i>.
|
||
</p>
|
||
</div>
|
||
|
||
<br><hr width=90% /><br>
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#532" class="lnkocn">532</a></label>
|
||
<h5 class="norm" id="532"><a name="532"></a>
|
||
<a name="c10.1" ></a><a name="h10.1" ></a>10.1 Customizing the live user
|
||
</h5>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#533" class="lnkocn">533</a></label>
|
||
<p class="i0" id="533">
|
||
One important consideration is that the live user is created by <i>live-boot</i> at boot time, not by <i>live-build</i> at build time. This not only influences where materials relating to the live user are introduced in your build, as discussed in <a href="#live-chroot-local-includes">Live/chroot local includes</a>, but also any groups and permissions associated with the live user.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#534" class="lnkocn">534</a></label>
|
||
<p class="i0" id="534">
|
||
You can specify additional groups that the live user will belong to by using any of the possibilities to configure <i>live-config</i>. For example, to add the live user to the <tt>fuse</tt> group, you can either add the following file in <tt>config/includes.chroot/etc/live/config/user-setup.conf</tt>:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#535" class="lnkocn">535</a></label>
|
||
<p class="code" id="535">
|
||
LIVE_USER_DEFAULT_GROUPS="audio cdrom dip floppy video plugdev netdev powerdev scanner bluetooth fuse"<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#536" class="lnkocn">536</a></label>
|
||
<p class="i0" id="536">
|
||
or use <tt>live-config.user-default-groups=audio,cdrom,dip,floppy,video,plugdev,netdev,powerdev,scanner,bluetooth,fuse</tt> as a boot parameter.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#537" class="lnkocn">537</a></label>
|
||
<p class="i0" id="537">
|
||
It is also possible to change the default username "user" and the default password "live". If you want to do that for any reason, you can easily achieve it as follows:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#538" class="lnkocn">538</a></label>
|
||
<p class="i0" id="538">
|
||
To change the default username you can simply specify it in your config:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#539" class="lnkocn">539</a></label>
|
||
<p class="code" id="539">
|
||
$ lb config --bootappend-live "boot=live components username=live-user"<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#540" class="lnkocn">540</a></label>
|
||
<p class="i0" id="540">
|
||
One possible way of changing the default password is by means of a hook as described in <a href="#boot-time-hooks">Boot-time hooks</a>. In order to do that you can use the "passwd" hook from <tt>/usr/share/doc/live-config/examples/hooks</tt>, prefix it accordingly (e.g. 2000-passwd) and add it to <tt>config/includes.chroot/lib/live/config/</tt>
|
||
</p>
|
||
</div>
|
||
|
||
<br><hr width=90% /><br>
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#541" class="lnkocn">541</a></label>
|
||
<h5 class="norm" id="541"><a name="541"></a>
|
||
<a name="h10.2" ></a><a name="customizing-locale-and-language" ></a>10.2 Customizing locale and language
|
||
</h5>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#542" class="lnkocn">542</a></label>
|
||
<p class="i0" id="542">
|
||
When the live system boots, language is involved in two steps:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#543" class="lnkocn">543</a></label>
|
||
<ul>
|
||
<li class="bullet" id="543">
|
||
the locale generation
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#544" class="lnkocn">544</a></label>
|
||
<ul>
|
||
<li class="bullet" id="544">
|
||
setting the keyboard configuration
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#545" class="lnkocn">545</a></label>
|
||
<p class="i0" id="545">
|
||
The default locale when building a Live system is <tt>locales=en_US.UTF-8</tt>. To define the locale that should be generated, use the <tt>locales</tt> parameter in the <tt>--bootappend-live</tt> option of <tt>lb config</tt>, e.g.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#546" class="lnkocn">546</a></label>
|
||
<p class="code" id="546">
|
||
$ lb config --bootappend-live "boot=live components locales=de_CH.UTF-8"<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#547" class="lnkocn">547</a></label>
|
||
<p class="i0" id="547">
|
||
Multiple locales may be specified as a comma-delimited list.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#548" class="lnkocn">548</a></label>
|
||
<p class="i0" id="548">
|
||
This parameter, as well as the keyboard configuration parameters indicated below, can also be used at the kernel command line. You can specify a locale by <tt>language_country</tt> (in which case the default encoding is used) or the full <tt>language_country.encoding</tt> word. A list of supported locales and the encoding for each can be found in <tt>/usr/share/i18n/SUPPORTED</tt>.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#549" class="lnkocn">549</a></label>
|
||
<p class="i0" id="549">
|
||
Both the console and X keyboard configuration are performed by <tt>live-config</tt> using the <tt>console-setup</tt> package. To configure them, use the <tt>keyboard-layouts</tt>, <tt>keyboard-variants</tt>, <tt>keyboard-options</tt> and <tt>keyboard-model</tt> boot parameters via the <tt>--bootappend-live</tt> option. Valid options for these can be found in <tt>/usr/share/X11/xkb/rules/base.lst</tt>. To find layouts and variants for a given language, try searching for the English name of the language and/or the country where the language is spoken, e.g:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#550" class="lnkocn">550</a></label>
|
||
<p class="code" id="550">
|
||
$ egrep -i '(^!|german.*switzerland)' /usr/share/X11/xkb/rules/base.lst<br>
|
||
! model<br>
|
||
! layout<br>
|
||
ch German (Switzerland)<br>
|
||
! variant<br>
|
||
legacy ch: German (Switzerland, legacy)<br>
|
||
de_nodeadkeys ch: German (Switzerland, eliminate dead keys)<br>
|
||
de_sundeadkeys ch: German (Switzerland, Sun dead keys)<br>
|
||
de_mac ch: German (Switzerland, Macintosh)<br>
|
||
! option<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#551" class="lnkocn">551</a></label>
|
||
<p class="i0" id="551">
|
||
Note that each variant lists the layout to which it applies in the description.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#552" class="lnkocn">552</a></label>
|
||
<p class="i0" id="552">
|
||
Often, only the layout needs to be configured. For example, to get the locale files for German and Swiss German keyboard layout in X use:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#553" class="lnkocn">553</a></label>
|
||
<p class="code" id="553">
|
||
$ lb config --bootappend-live "boot=live components locales=de_CH.UTF-8 keyboard-layouts=ch"<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#554" class="lnkocn">554</a></label>
|
||
<p class="i0" id="554">
|
||
However, for very specific use cases, you may wish to include other parameters. For example, to set up a French system with a French-Dvorak layout (called Bepo) on a TypeMatrix EZ-Reach 2030 USB keyboard, use:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#555" class="lnkocn">555</a></label>
|
||
<p class="code" id="555">
|
||
$ lb config --bootappend-live \<br>
|
||
"boot=live components locales=fr_FR.UTF-8 keyboard-layouts=fr keyboard-variants=bepo keyboard-model=tm2030usb"<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#556" class="lnkocn">556</a></label>
|
||
<p class="i0" id="556">
|
||
Multiple values may be specified as comma-delimited lists for each of the <tt>keyboard-*</tt> options, with the exception of <tt>keyboard-model</tt>, which accepts only one value. Please see the <tt>keyboard(5)</tt> man page for details and examples of <tt>XKBMODEL</tt>, <tt>XKBLAYOUT</tt>, <tt>XKBVARIANT</tt> and <tt>XKBOPTIONS</tt> variables. If multiple <tt>keyboard-variants</tt> values are given, they will be matched one-to-one with <tt>keyboard-layouts</tt> values (see <tt>setxkbmap(1)</tt> <tt>-variant</tt> option). Empty values are allowed; e.g. to define two layouts, the default being US QWERTY and the other being US Dvorak, use:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#557" class="lnkocn">557</a></label>
|
||
<p class="code" id="557">
|
||
$ lb config --bootappend-live \<br>
|
||
"boot=live components keyboard-layouts=us,us keyboard-variants=,dvorak"<br>
|
||
</p>
|
||
</div>
|
||
|
||
<br><hr width=90% /><br>
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#558" class="lnkocn">558</a></label>
|
||
<h5 class="norm" id="558"><a name="558"></a>
|
||
<a name="h10.3" ></a><a name="persistence" ></a>10.3 Persistence
|
||
</h5>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#559" class="lnkocn">559</a></label>
|
||
<p class="i0" id="559">
|
||
A live cd paradigm is a pre-installed system which runs from read-only media, like a cdrom, where writes and modifications do not survive reboots of the host hardware which runs it.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#560" class="lnkocn">560</a></label>
|
||
<p class="i0" id="560">
|
||
A live system is a generalization of this paradigm and thus supports other media in addition to CDs; but still, in its default behaviour, it should be considered read-only and all the run-time evolutions of the system are lost at shutdown.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#561" class="lnkocn">561</a></label>
|
||
<p class="i0" id="561">
|
||
'Persistence' is a common name for different kinds of solutions for saving across reboots some, or all, of this run-time evolution of the system. To understand how it works it would be handy to know that even if the system is booted and run from read-only media, modifications to the files and directories are written on writable media, typically a ram disk (tmpfs) and ram disks' data do not survive reboots.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#562" class="lnkocn">562</a></label>
|
||
<p class="i0" id="562">
|
||
The data stored on this ramdisk should be saved on a writable persistent medium like local storage media, a network share or even a session of a multisession (re)writable CD/DVD. All these media are supported in live systems in different ways, and all but the last one require a special boot parameter to be specified at boot time: <tt>persistence</tt>.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#563" class="lnkocn">563</a></label>
|
||
<p class="i0" id="563">
|
||
If the boot parameter <tt>persistence</tt> is set (and <tt>nopersistence</tt> is not set), local storage media (e.g. hard disks, USB drives) will be probed for persistence volumes during boot. It is possible to restrict which types of persistence volumes to use by specifying certain boot parameters described in the <i>live-boot</i>(7) man page. A persistence volume is any of the following:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#564" class="lnkocn">564</a></label>
|
||
<ul>
|
||
<li class="bullet" id="564">
|
||
a partition, identified by its GPT name.
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#565" class="lnkocn">565</a></label>
|
||
<ul>
|
||
<li class="bullet" id="565">
|
||
a filesystem, identified by its filesystem label.
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#566" class="lnkocn">566</a></label>
|
||
<ul>
|
||
<li class="bullet" id="566">
|
||
an image file located on the root of any readable filesystem (even an NTFS partition of a foreign OS), identified by its filename.
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#567" class="lnkocn">567</a></label>
|
||
<p class="i0" id="567">
|
||
The volume label for overlays must be <tt>persistence</tt> but it will be ignored unless it contains in its root a file named <tt>persistence.conf</tt> which is used to fully customize the volume's persistence, this is to say, specifying the directories that you want to save in your persistence volume after a reboot. See <a href="#persistence-conf">The persistence.conf file</a> for more details.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#568" class="lnkocn">568</a></label>
|
||
<p class="i0" id="568">
|
||
Here are some examples of how to prepare a volume to be used for persistence. It can be, for instance, an ext4 partition on a hard disk or on a usb key created with, e.g.:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#569" class="lnkocn">569</a></label>
|
||
<p class="code" id="569">
|
||
# mkfs.ext4 -L persistence /dev/sdb1<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#570" class="lnkocn">570</a></label>
|
||
<p class="i0" id="570">
|
||
See also <a href="#using-usb-extra-space">Using the space left on a USB stick</a>.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#571" class="lnkocn">571</a></label>
|
||
<p class="i0" id="571">
|
||
If you already have a partition on your device, you could just change the label with one of the following:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#572" class="lnkocn">572</a></label>
|
||
<p class="code" id="572">
|
||
# tune2fs -L persistence /dev/sdb1 # for ext2,3,4 filesystems<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#573" class="lnkocn">573</a></label>
|
||
<p class="i0" id="573">
|
||
Here's an example of how to create an ext4-based image file to be used for persistence:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#574" class="lnkocn">574</a></label>
|
||
<p class="code" id="574">
|
||
$ dd if=/dev/null of=persistence bs=1 count=0 seek=1G # for a 1GB sized image file<br>
|
||
$ /sbin/mkfs.ext4 -F persistence<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#575" class="lnkocn">575</a></label>
|
||
<p class="i0" id="575">
|
||
Once the image file is created, as an example, to make <tt>/usr</tt> persistent but only saving the changes you make to that directory and not all the contents of <tt>/usr</tt>, you can use the "union" option. If the image file is located in your home directory, copy it to the root of your hard drive's filesystem and mount it in <tt>/mnt</tt> as follows:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#576" class="lnkocn">576</a></label>
|
||
<p class="code" id="576">
|
||
# cp persistence /<br>
|
||
# mount -t ext4 /persistence /mnt<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#577" class="lnkocn">577</a></label>
|
||
<p class="i0" id="577">
|
||
Then, create the <tt>persistence.conf</tt> file adding content and unmount the image file.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#578" class="lnkocn">578</a></label>
|
||
<p class="code" id="578">
|
||
# echo "/usr union" >> /mnt/persistence.conf<br>
|
||
# umount /mnt<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#579" class="lnkocn">579</a></label>
|
||
<p class="i0" id="579">
|
||
Now, reboot into your live medium with the boot parameter "persistence".
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#580" class="lnkocn">580</a></label>
|
||
<h6 class="norm" id="580"><a name="580"></a>
|
||
<a name="h10.3.1" ></a><a name="persistence-conf" ></a>10.3.1 The persistence.conf file
|
||
</h6>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#581" class="lnkocn">581</a></label>
|
||
<p class="i0" id="581">
|
||
A volume with the label <tt>persistence</tt> must be configured by means of the <tt>persistence.conf</tt> file to make arbitrary directories persistent. That file, located on the volume's filesystem root, controls which directories it makes persistent, and in which way.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#582" class="lnkocn">582</a></label>
|
||
<p class="i0" id="582">
|
||
How custom overlay mounts are configured is described in full detail in the persistence.conf(5) man page, but a simple example should be sufficient for most uses. Let's say we want to make our home directory and APT cache persistent in an ext4 filesystem on the /dev/sdb1 partition:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#583" class="lnkocn">583</a></label>
|
||
<p class="code" id="583">
|
||
# mkfs.ext4 -L persistence /dev/sdb1<br>
|
||
# mount -t ext4 /dev/sdb1 /mnt<br>
|
||
# echo "/home" >> /mnt/persistence.conf<br>
|
||
# echo "/var/cache/apt" >> /mnt/persistence.conf<br>
|
||
# umount /mnt<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#584" class="lnkocn">584</a></label>
|
||
<p class="i0" id="584">
|
||
Then we reboot. During the first boot the contents of <tt>/home</tt> and <tt>/var/cache/apt</tt> will be copied into the persistence volume, and from then on all changes to these directories will live in the persistence volume. Please note that any paths listed in the <tt>persistence.conf</tt> file cannot contain white spaces or the special <tt>.</tt> and <tt>..</tt> path components. Also, neither <tt>/lib</tt>, <tt>/lib/live</tt> (or any of their sub-directories) nor <tt>/</tt> can be made persistent using custom mounts. As a workaround for this limitation you can add <tt>/ union</tt> to your <tt>persistence.conf</tt> file to achieve full persistence.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#585" class="lnkocn">585</a></label>
|
||
<h6 class="norm" id="585"><a name="585"></a>
|
||
<a name="c10.3.2" ></a><a name="h10.3.2" ></a>10.3.2 Using more than one persistence store
|
||
</h6>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#586" class="lnkocn">586</a></label>
|
||
<p class="i0" id="586">
|
||
There are different methods of using multiple persistence store for different use cases. For instance, using several volumes at the same time or selecting only one, among various, for very specific purposes.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#587" class="lnkocn">587</a></label>
|
||
<p class="i0" id="587">
|
||
Several different custom overlay volumes (with their own <tt>persistence.conf</tt> files) can be used at the same time, but if several volumes make the same directory persistent, only one of them will be used. If any two mounts are "nested" (i.e. one is a sub-directory of the other) the parent will be mounted before the child so no mount will be hidden by the other. Nested custom mounts are problematic if they are listed in the same <tt>persistence.conf</tt> file. See the persistence.conf(5) man page for how to handle that case if you really need it (hint: you usually don't).
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#588" class="lnkocn">588</a></label>
|
||
<p class="i0" id="588">
|
||
One possible use case: If you wish to store the user data i.e. <tt>/home</tt> and the superuser data i.e. <tt>/root</tt> in different partitions, create two partitions with the <tt>persistence</tt> label and add a <tt>persistence.conf</tt> file in each one like this, <tt># echo "/home" > persistence.conf</tt> for the first partition that will save the user's files and <tt># echo "/root" > persistence.conf</tt> for the second partition which will store the superuser's files. Finally, use the <tt>persistence</tt> boot parameter.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#589" class="lnkocn">589</a></label>
|
||
<p class="i0" id="589">
|
||
If a user would need multiple persistence store of the same type for different locations or testing, such as <tt>private</tt> and <tt>work</tt>, the boot parameter <tt>persistence-label</tt> used in conjunction with the boot parameter <tt>persistence</tt> will allow for multiple but unique persistence media. An example would be if a user wanted to use a persistence partition labeled <tt>private</tt> for personal data like browser bookmarks or other types, they would use the boot parameters: <tt>persistence</tt> <tt>persistence-label=private</tt>. And to store work related data, like documents, research projects or other types, they would use the boot parameters: <tt>persistence</tt> <tt>persistence-label=work</tt>.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#590" class="lnkocn">590</a></label>
|
||
<p class="i0" id="590">
|
||
It is important to remember that each of these volumes, <tt>private</tt> and <tt>work</tt>, also needs a <tt>persistence.conf</tt> file in its root. The <i>live-boot</i> man page contains more information about how to use these labels with legacy names.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#591" class="lnkocn">591</a></label>
|
||
<h6 class="norm" id="591"><a name="591"></a>
|
||
<a name="c10.3.3" ></a><a name="h10.3.3" ></a>10.3.3 Using persistence with encryption
|
||
</h6>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#592" class="lnkocn">592</a></label>
|
||
<p class="i0" id="592">
|
||
Using the persistence feature means that some sensible data might get exposed to risk. Especially if the persistent data is stored on a portable device such as a usb stick or an external hard drive. That is when encryption comes in handy. Even if the entire procedure might seem complicated because of the number of steps to be taken, it is really easy to handle encrypted partitions with <i>live-boot</i>. In order to use <b>luks</b>, which is the supported encryption type, you need to install <i>cryptsetup</i> both on the machine you are creating the encrypted partition with and also in the live system you are going to use the encrypted persistent partition with.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#593" class="lnkocn">593</a></label>
|
||
<p class="i0" id="593">
|
||
To install <i>cryptsetup</i> on your machine:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#594" class="lnkocn">594</a></label>
|
||
<p class="code" id="594">
|
||
# apt-get install cryptsetup<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#595" class="lnkocn">595</a></label>
|
||
<p class="i0" id="595">
|
||
To install <i>cryptsetup</i> in your live system, add it to your package-lists:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#596" class="lnkocn">596</a></label>
|
||
<p class="code" id="596">
|
||
$ lb config<br>
|
||
$ echo "cryptsetup" > config/package-lists/encryption.list.chroot<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#597" class="lnkocn">597</a></label>
|
||
<p class="i0" id="597">
|
||
Once you have your live system with <i>cryptsetup</i>, you basically only need to create a new partition, encrypt it and boot with the <tt>persistence</tt> and <tt>persistence-encryption=luks</tt> parameters. We could have already anticipated this step and added the boot parameters following the usual procedure:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#598" class="lnkocn">598</a></label>
|
||
<p class="code" id="598">
|
||
$ lb config --bootappend-live "boot=live components persistence persistence-encryption=luks"<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#599" class="lnkocn">599</a></label>
|
||
<p class="i0" id="599">
|
||
Let's go into the details for all of those who are not familiar with encryption. In the following example we are going to use a partition on a usb stick which corresponds to <tt>/dev/sdc2</tt>. Please be warned that you need to determine which partition is the one you are going to use in your specific case.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#600" class="lnkocn">600</a></label>
|
||
<p class="i0" id="600">
|
||
The first step is plugging in your usb stick and determine which device it is. The recommended method of listing devices in <i>live-manual</i> is using <tt>ls -l /dev/disk/by-id</tt>. After that, create a new partition and then, encrypt it with a passphrase as follows:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#601" class="lnkocn">601</a></label>
|
||
<p class="code" id="601">
|
||
# cryptsetup --verify-passphrase luksFormat /dev/sdc2<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#602" class="lnkocn">602</a></label>
|
||
<p class="i0" id="602">
|
||
Then open the luks partition in the virtual device mapper. Use any name you like. We use <b>live</b> here as an example:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#603" class="lnkocn">603</a></label>
|
||
<p class="code" id="603">
|
||
# cryptsetup luksOpen /dev/sdc2 live<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#604" class="lnkocn">604</a></label>
|
||
<p class="i0" id="604">
|
||
The next step is filling the device with zeros before creating the filesystem:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#605" class="lnkocn">605</a></label>
|
||
<p class="code" id="605">
|
||
# dd if=/dev/zero of=/dev/mapper/live<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#606" class="lnkocn">606</a></label>
|
||
<p class="i0" id="606">
|
||
Now, we are ready to create the filesystem. Notice that we are adding the label <tt>persistence</tt> so that the device is mounted as persistence store at boot time.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#607" class="lnkocn">607</a></label>
|
||
<p class="code" id="607">
|
||
# mkfs.ext4 -L persistence /dev/mapper/live<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#608" class="lnkocn">608</a></label>
|
||
<p class="i0" id="608">
|
||
To continue with our setup, we need to mount the device, for example in <tt>/mnt</tt>.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#609" class="lnkocn">609</a></label>
|
||
<p class="code" id="609">
|
||
# mount /dev/mapper/live /mnt<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#610" class="lnkocn">610</a></label>
|
||
<p class="i0" id="610">
|
||
And create the <tt>persistence.conf</tt> file in the root of the partition. This is, as explained before, strictly necessary. See <a href="#persistence-conf">The persistence.conf file</a>.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#611" class="lnkocn">611</a></label>
|
||
<p class="code" id="611">
|
||
# echo "/ union" > /mnt/persistence.conf<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#612" class="lnkocn">612</a></label>
|
||
<p class="i0" id="612">
|
||
Then unmount the mount point:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#613" class="lnkocn">613</a></label>
|
||
<p class="code" id="613">
|
||
# umount /mnt<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#614" class="lnkocn">614</a></label>
|
||
<p class="i0" id="614">
|
||
And optionally, although it might be a good way of securing the data we have just added to the partition, we can close the device:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#615" class="lnkocn">615</a></label>
|
||
<p class="code" id="615">
|
||
# cryptsetup luksClose live<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#616" class="lnkocn">616</a></label>
|
||
<p class="i0" id="616">
|
||
Let's summarize the process. So far, we have created an encryption capable live system, which can be copied to a usb stick as explained in <a href="#copying-iso-hybrid-to-usb">Copying an ISO hybrid image to a USB stick</a>. We have also created an encrypted partition, which can be located in the same usb stick to carry it around and we have configured the encrypted partition to be used as persistence store. So now, we only need to boot the live system. At boot time, <i>live-boot</i> will prompt us for the passphrase and will mount the encrypted partition to be used for persistence.
|
||
</p>
|
||
</div>
|
||
|
||
<br><hr width=90% /><br>
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#617" class="lnkocn">617</a></label>
|
||
<h1 class="norm" id="617"><a name="617"></a>
|
||
Customizing the binary image
|
||
</h1>
|
||
</div>
|
||
|
||
<br><hr width=90% /><br>
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#618" class="lnkocn">618</a></label>
|
||
<h4 class="norm" id="618"><a name="618"></a>
|
||
<a name="h11" ></a><a name="customizing_the_binary_image" ></a><a name="customizing-binary" ></a>11. Customizing the binary image
|
||
</h4>
|
||
</div>
|
||
|
||
<br><hr width=90% /><br>
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#619" class="lnkocn">619</a></label>
|
||
<h5 class="norm" id="619"><a name="619"></a>
|
||
<a name="c11.1" ></a><a name="h11.1" ></a>11.1 Bootloaders
|
||
</h5>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#620" class="lnkocn">620</a></label>
|
||
<p class="i0" id="620">
|
||
<i>live-build</i> uses <i>syslinux</i> and some of its derivatives (depending on the image type) as bootloaders by default. They can be easily customized to suit your needs.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#621" class="lnkocn">621</a></label>
|
||
<p class="i0" id="621">
|
||
In order to use a full theme, copy <tt>/usr/share/live/build/bootloaders</tt> into <tt>config/bootloaders</tt> and edit the files in there. If you do not want to bother modifying all supported bootloader configurations, only providing a local customized copy of one of the bootloaders, e.g. <b>isolinux</b> in <tt>config/bootloaders/isolinux</tt> is enough too, depending on your use case.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#622" class="lnkocn">622</a></label>
|
||
<p class="i0" id="622">
|
||
When modifying one of the default themes, if you want to use a personalized background image that will be displayed together with the boot menu, add a splash.png picture of 640x480 pixels. Then, remove the splash.svg file.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#623" class="lnkocn">623</a></label>
|
||
<p class="i0" id="623">
|
||
There are many possibilities when it comes to making changes. For instance, syslinux derivatives are configured by default with a timeout of 0 (zero) which means that they will pause indefinitely at their splash screen until you press a key.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#624" class="lnkocn">624</a></label>
|
||
<p class="i0" id="624">
|
||
To modify the boot timeout of a default <tt>iso-hybrid</tt> image just edit a default <b>isolinux.cfg</b> file specifying the timeout in units of 1/10 seconds. A modified <b>isolinux.cfg</b> to boot after five seconds would be similar to this:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#625" class="lnkocn">625</a></label>
|
||
<p class="code" id="625">
|
||
include menu.cfg<br>
|
||
default vesamenu.c32<br>
|
||
prompt 0<br>
|
||
timeout 50<br>
|
||
</p>
|
||
</div>
|
||
|
||
<br><hr width=90% /><br>
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#626" class="lnkocn">626</a></label>
|
||
<h5 class="norm" id="626"><a name="626"></a>
|
||
<a name="c11.2" ></a><a name="h11.2" ></a>11.2 ISO metadata
|
||
</h5>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#627" class="lnkocn">627</a></label>
|
||
<p class="i0" id="627">
|
||
When creating an ISO9660 binary image, you can use the following options to add various textual metadata for your image. This can help you easily identify the version or configuration of an image without booting it.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#628" class="lnkocn">628</a></label>
|
||
<ul>
|
||
<li class="bullet" id="628">
|
||
<tt>LB_ISO_APPLICATION/--iso-application NAME</tt>: This should describe the application that will be on the image. The maximum length for this field is 128 characters.
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#629" class="lnkocn">629</a></label>
|
||
<ul>
|
||
<li class="bullet" id="629">
|
||
<tt>LB_ISO_PREPARER/--iso-preparer NAME</tt>: This should describe the preparer of the image, usually with some contact details. The default for this option is the <i>live-build</i> version you are using, which may help with debugging later. The maximum length for this field is 128 characters.
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#630" class="lnkocn">630</a></label>
|
||
<ul>
|
||
<li class="bullet" id="630">
|
||
<tt>LB_ISO_PUBLISHER/--iso-publisher NAME</tt>: This should describe the publisher of the image, usually with some contact details. The maximum length for this field is 128 characters.
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#631" class="lnkocn">631</a></label>
|
||
<ul>
|
||
<li class="bullet" id="631">
|
||
<tt>LB_ISO_VOLUME/--iso-volume NAME</tt>: This should specify the volume ID of the image. This is used as a user-visible label on some platforms such as Windows and Apple Mac OS. The maximum length for this field is 32 characters.
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<br><hr width=90% /><br>
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#632" class="lnkocn">632</a></label>
|
||
<h1 class="norm" id="632"><a name="632"></a>
|
||
Customizing Debian Installer
|
||
</h1>
|
||
</div>
|
||
|
||
<br><hr width=90% /><br>
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#633" class="lnkocn">633</a></label>
|
||
<h4 class="norm" id="633"><a name="633"></a>
|
||
<a name="h12" ></a><a name="customizing_debian_installer" ></a><a name="customizing-installer" ></a>12. Customizing Debian Installer
|
||
</h4>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#634" class="lnkocn">634</a></label>
|
||
<p class="i0" id="634">
|
||
Live system images can be integrated with Debian Installer. There are a number of different types of installation, varying in what is included and how the installer operates.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#635" class="lnkocn">635</a></label>
|
||
<p class="i0" id="635">
|
||
Please note the careful use of capital letters when referring to the "Debian Installer" in this section - when used like this we refer explicitly to the official installer for the Debian system, not anything else. It is often seen abbreviated to "d-i".
|
||
</p>
|
||
</div>
|
||
|
||
<br><hr width=90% /><br>
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#636" class="lnkocn">636</a></label>
|
||
<h5 class="norm" id="636"><a name="636"></a>
|
||
<a name="c12.1" ></a><a name="h12.1" ></a>12.1 Types of Debian Installer
|
||
</h5>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#637" class="lnkocn">637</a></label>
|
||
<p class="i0" id="637">
|
||
The three main types of installer are:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#638" class="lnkocn">638</a></label>
|
||
<p class="i0" id="638">
|
||
<b>"Normal" Debian Installer</b>: This is a normal live system image with a separate kernel and initrd which (when selected from the appropriate bootloader) launches into a standard Debian Installer instance, just as if you had downloaded a CD image of Debian and booted it. Images containing a live system and such an otherwise independent installer are often referred to as "combined images".
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#639" class="lnkocn">639</a></label>
|
||
<p class="i0" id="639">
|
||
On such images, Debian is installed by fetching and installing .deb packages using <i>debootstrap</i>, from local media or some network-based network, resulting in a default Debian system being installed to the hard disk.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#640" class="lnkocn">640</a></label>
|
||
<p class="i0" id="640">
|
||
This whole process can be preseeded and customized in a number of ways; see the relevant pages in the Debian Installer manual for more information. Once you have a working preseeding file, <i>live-build</i> can automatically put it in the image and enable it for you.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#641" class="lnkocn">641</a></label>
|
||
<p class="i0" id="641">
|
||
<b>"Live" Debian Installer</b>: This is a live system image with a separate kernel and initrd which (when selected from the appropriate bootloader) launches into an instance of the Debian Installer.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#642" class="lnkocn">642</a></label>
|
||
<p class="i0" id="642">
|
||
Installation will proceed in an identical fashion to the "normal" installation described above, but at the actual package installation stage, instead of using <i>debootstrap</i> to fetch and install packages, the live filesystem image is copied to the target. This is achieved with a special udeb called <i>live-installer</i>.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#643" class="lnkocn">643</a></label>
|
||
<p class="i0" id="643">
|
||
After this stage, the Debian Installer continues as normal, installing and configuring items such as bootloaders and local users, etc.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#644" class="lnkocn">644</a></label>
|
||
<p class="i0" id="644">
|
||
<b>Note:</b> to support both normal and live installer entries in the bootloader of the same live medium, you must disable <i>live-installer</i> by preseeding <tt>live-installer/enable=false</tt>.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#645" class="lnkocn">645</a></label>
|
||
<p class="i0" id="645">
|
||
<b>"Desktop" Debian Installer</b>: Regardless of the type of Debian Installer included, <tt>d-i</tt> can be launched from the Desktop by clicking on an icon. This is user friendlier in some situations. In order to make use of this, the <i>debian-installer-launcher</i> package needs to be included.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#646" class="lnkocn">646</a></label>
|
||
<p class="i0" id="646">
|
||
Note that by default, <i>live-build</i> does not include Debian Installer images in the images, it needs to be specifically enabled with <tt>lb config</tt>. Also, please note that for the "Desktop" installer to work, the kernel of the live system must match the kernel <tt>d-i</tt> uses for the specified architecture. For example:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#647" class="lnkocn">647</a></label>
|
||
<p class="code" id="647">
|
||
$ lb config --architectures i386 --linux-flavours 586 \<br>
|
||
--debian-installer live<br>
|
||
$ echo debian-installer-launcher >> config/package-lists/my.list.chroot<br>
|
||
</p>
|
||
</div>
|
||
|
||
<br><hr width=90% /><br>
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#648" class="lnkocn">648</a></label>
|
||
<h5 class="norm" id="648"><a name="648"></a>
|
||
<a name="c12.2" ></a><a name="h12.2" ></a>12.2 Customizing Debian Installer by preseeding
|
||
</h5>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#649" class="lnkocn">649</a></label>
|
||
<p class="i0" id="649">
|
||
As described in the Debian Installer Manual, Appendix B at ‹<a href="https://www.debian.org/releases/stable/i386/apb.html" target="_top">https://www.debian.org/releases/stable/i386/apb.html</a>›, "Preseeding provides a way to set answers to questions asked during the installation process, without having to manually enter the answers while the installation is running. This makes it possible to fully automate most types of installation and even offers some features not available during normal installations." This kind of customization is best accomplished with <i>live-build</i> by placing the configuration in a <tt>preseed.cfg</tt> file included in <tt>config/includes.installer/</tt>. For example, to preseed setting the locale to <tt>en_US</tt>:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#650" class="lnkocn">650</a></label>
|
||
<p class="code" id="650">
|
||
$ echo "d-i debian-installer/locale string en_US" \<br>
|
||
>> config/includes.installer/preseed.cfg<br>
|
||
</p>
|
||
</div>
|
||
|
||
<br><hr width=90% /><br>
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#651" class="lnkocn">651</a></label>
|
||
<h5 class="norm" id="651"><a name="651"></a>
|
||
<a name="c12.3" ></a><a name="h12.3" ></a>12.3 Customizing Debian Installer content
|
||
</h5>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#652" class="lnkocn">652</a></label>
|
||
<p class="i0" id="652">
|
||
For experimental or debugging purposes, you might want to include locally built <tt>d-i</tt> component udeb packages. Place these in <tt>config/packages.binary/</tt> to include them in the image. Additional or replacement files and directories may be included in the installer initrd as well, in a similar fashion to <a href="#live-chroot-local-includes">Live/chroot local includes</a>, by placing the material in <tt>config/includes.installer/</tt>.
|
||
</p>
|
||
</div>
|
||
|
||
<br><hr width=90% /><br>
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#653" class="lnkocn">653</a></label>
|
||
<h1 class="norm" id="653"><a name="653"></a>
|
||
Project
|
||
</h1>
|
||
</div>
|
||
|
||
<br><hr width=90% /><br>
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#654" class="lnkocn">654</a></label>
|
||
<h1 class="norm" id="654"><a name="654"></a>
|
||
Contributing to the project
|
||
</h1>
|
||
</div>
|
||
|
||
<br><hr width=90% /><br>
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#655" class="lnkocn">655</a></label>
|
||
<h4 class="norm" id="655"><a name="655"></a>
|
||
<a name="h13" ></a><a name="contributing_to_the_project" ></a><a name="contributing-to-project" ></a>13. Contributing to the project
|
||
</h4>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#656" class="lnkocn">656</a></label>
|
||
<p class="i0" id="656">
|
||
When submitting a contribution, please clearly identify its copyright holder and include any applicable licensing statement. Note that to be accepted, the contribution must be licensed under the same license as the rest of the documents, namely, GPL version 3 or later.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#657" class="lnkocn">657</a></label>
|
||
<p class="i0" id="657">
|
||
Contributions to the project, such as translations and patches, are greatly welcome. Anyone can directly commit to the repositories, however, we ask you to send bigger changes to the mailing list to discuss them first. See the section <a href="#contact">Contact</a> for more information.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#658" class="lnkocn">658</a></label>
|
||
<p class="i0" id="658">
|
||
The Live Systems Project uses Git as version control system and source code management. As explained in <a href="#git-repositories">Git repositories</a> there are two main development branches: <b>debian</b> and <b>debian-next</b>. Everybody can commit to the debian-next branches of the <i>live-boot</i>, <i>live-build</i>, <i>live-config</i>, <i>live-images</i>, <i>live-manual</i> and <i>live-tools</i> repositories.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#659" class="lnkocn">659</a></label>
|
||
<p class="i0" id="659">
|
||
However, there are certain restrictions. The server will reject:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#660" class="lnkocn">660</a></label>
|
||
<ul>
|
||
<li class="bullet" id="660">
|
||
Non fast-forward pushes.
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#661" class="lnkocn">661</a></label>
|
||
<ul>
|
||
<li class="bullet" id="661">
|
||
Merge commits.
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#662" class="lnkocn">662</a></label>
|
||
<ul>
|
||
<li class="bullet" id="662">
|
||
Adding or removing tags or branches.
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#663" class="lnkocn">663</a></label>
|
||
<p class="i0" id="663">
|
||
Even though all commits might be revised, we ask you to use your common sense and make good commits with good commit messages.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#664" class="lnkocn">664</a></label>
|
||
<ul>
|
||
<li class="bullet" id="664">
|
||
Write commit messages that consist of complete, meaningful sentences in English, starting with a capital letter and ending with a full stop. Usually, these will start with the form "Fixing/Adding/Removing/Correcting/Translating/...".
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#665" class="lnkocn">665</a></label>
|
||
<ul>
|
||
<li class="bullet" id="665">
|
||
Write good commit messages. The first line must be an accurate summary of the contents of the commit which will be included in the changelog. If you need to make some further explanations, write them below leaving a blank line after the first one and then another blank line after each paragraph. Lines of paragraphs should not exceed 80 characters in length.
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#666" class="lnkocn">666</a></label>
|
||
<ul>
|
||
<li class="bullet" id="666">
|
||
Commit atomically, this is to say, do not mix unrelated things in the same commit. Make one different commit for each change you make.
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<br><hr width=90% /><br>
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#667" class="lnkocn">667</a></label>
|
||
<h5 class="norm" id="667"><a name="667"></a>
|
||
<a name="c13.1" ></a><a name="h13.1" ></a>13.1 Making changes
|
||
</h5>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#668" class="lnkocn">668</a></label>
|
||
<p class="i0" id="668">
|
||
In order to push to the repositories, you must follow the following procedure. Here we use <i>live-manual</i> as an example so replace it with the name of the repository you want to work with. For detailed information on how to edit <i>live-manual</i> see <a href="#how-to-contribute">Contributing to this document</a>.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#669" class="lnkocn">669</a></label>
|
||
<ul>
|
||
<li class="bullet" id="669">
|
||
Fetch the public commit key:
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#670" class="lnkocn">670</a></label>
|
||
<p class="code" id="670">
|
||
$ mkdir -p ~/.ssh/keys<br>
|
||
$ wget http://debian-live.alioth.debian.org/other/keys/git@debian-live.alioth.debian.org -O ~/.ssh/keys/git@debian-live.alioth.debian.org<br>
|
||
$ wget http://debian-live.alioth.debian.org/other/keys/git@debian-live.alioth.debian.org.pub -O ~/.ssh/keys/git@debian-live.alioth.debian.org.pub<br>
|
||
$ chmod 0600 ~/.ssh/keys/git@debian-live.alioth.debian.org*<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#671" class="lnkocn">671</a></label>
|
||
<ul>
|
||
<li class="bullet" id="671">
|
||
Add the following section to your openssh-client config:
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#672" class="lnkocn">672</a></label>
|
||
<p class="code" id="672">
|
||
$ cat >> ~/.ssh/config << EOF<br>
|
||
Host debian-live.alioth.debian.org<br>
|
||
Hostname debian-live.alioth.debian.org<br>
|
||
User git<br>
|
||
IdentitiesOnly yes<br>
|
||
IdentityFile ~/.ssh/keys/git@debian-live.alioth.debian.org<br>
|
||
EOF<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#673" class="lnkocn">673</a></label>
|
||
<ul>
|
||
<li class="bullet" id="673">
|
||
Check out a clone of <i>live-manual</i> through ssh:
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#674" class="lnkocn">674</a></label>
|
||
<p class="code" id="674">
|
||
$ git clone ssh://git.debian.org/git/debian-live/live-manual.git<br>
|
||
$ cd live-manual && git checkout debian-next<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#675" class="lnkocn">675</a></label>
|
||
<ul>
|
||
<li class="bullet" id="675">
|
||
Make sure you have Git author and email set:
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#676" class="lnkocn">676</a></label>
|
||
<p class="code" id="676">
|
||
$ git config user.name "John Doe"<br>
|
||
$ git config user.email john@example.org<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#677" class="lnkocn">677</a></label>
|
||
<p class="i0" id="677">
|
||
<b>Important:</b> Remember that you should commit any changes on the <b>debian-next</b> branch.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#678" class="lnkocn">678</a></label>
|
||
<ul>
|
||
<li class="bullet" id="678">
|
||
Make your changes. In this example you would first write a new section dealing with applying patches and then prepare to commit adding the files and writing your commit message like this:
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#679" class="lnkocn">679</a></label>
|
||
<p class="code" id="679">
|
||
$ git commit -a -m "Adding a section on applying patches."<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#680" class="lnkocn">680</a></label>
|
||
<ul>
|
||
<li class="bullet" id="680">
|
||
Push the commit to the server:
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#681" class="lnkocn">681</a></label>
|
||
<p class="code" id="681">
|
||
$ git push<br>
|
||
</p>
|
||
</div>
|
||
|
||
<br><hr width=90% /><br>
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#682" class="lnkocn">682</a></label>
|
||
<h5 class="norm" id="682"><a name="682"></a>
|
||
<a name="h13.2" ></a><a name="translation-of-manpages" ></a>13.2 Translation of man pages
|
||
</h5>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#683" class="lnkocn">683</a></label>
|
||
<p class="i0" id="683">
|
||
You can also contribute to the project working on the translation of the man pages for the different live-* packages that the project maintains. The procedure is different depending on whether you are starting a translation from scratch or continue working on an already existing one:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#684" class="lnkocn">684</a></label>
|
||
<ul>
|
||
<li class="bullet" id="684">
|
||
Working on an already existing translation
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#685" class="lnkocn">685</a></label>
|
||
<p class="i0" id="685">
|
||
If you want to maintain the translation of an already existing language you have to make your changes to your <tt>manpages/po/${LANGUAGE}/*.po</tt> file or files and then run <tt>make rebuild</tt> from inside the <tt>manpages/</tt> directory. This will update the actual man pages in <tt>manpages/${LANGUAGE}/*</tt>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#686" class="lnkocn">686</a></label>
|
||
<ul>
|
||
<li class="bullet" id="686">
|
||
Starting a new translation from scratch
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#687" class="lnkocn">687</a></label>
|
||
<p class="i0" id="687">
|
||
In order to add a new translation of any of the project's man pages you have to follow a similar procedure. It could be summarized as follows:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#688" class="lnkocn">688</a></label>
|
||
<ul>
|
||
<li class="i2" id="688">
|
||
Open the <tt>manpages/pot/</tt> file or files in your favourite editor, such as <i>poedit</i>, and save it as a .po file in <tt>manpages/po/${LANGUAGE}/</tt>. (You will have to create your <tt>${LANGUAGE}/</tt> directory).
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#689" class="lnkocn">689</a></label>
|
||
<ul>
|
||
<li class="i2" id="689">
|
||
Run <tt>make rebuild</tt> from inside the <tt>manpages/</tt> directory to create the <tt>manpages/${LANGUAGE}/</tt> files which will contain the actual man pages.
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#690" class="lnkocn">690</a></label>
|
||
<p class="i0" id="690">
|
||
Remember that you will have to add all the directories and files, then make the commit and finally push to the git server.
|
||
</p>
|
||
</div>
|
||
|
||
<br><hr width=90% /><br>
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#691" class="lnkocn">691</a></label>
|
||
<h1 class="norm" id="691"><a name="691"></a>
|
||
Reporting bugs
|
||
</h1>
|
||
</div>
|
||
|
||
<br><hr width=90% /><br>
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#692" class="lnkocn">692</a></label>
|
||
<h4 class="norm" id="692"><a name="692"></a>
|
||
<a name="h14" ></a><a name="reporting_bugs" ></a><a name="bugs" ></a>14. Reporting bugs
|
||
</h4>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#693" class="lnkocn">693</a></label>
|
||
<p class="i0" id="693">
|
||
Live systems are far from being perfect, but we want to make it as close as possible to perfect - with your help. Do not hesitate to report a bug. It is better to fill a report twice than never. However, this chapter includes recommendations on how to file good bug reports.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#694" class="lnkocn">694</a></label>
|
||
<p class="i0" id="694">
|
||
For the impatient:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#695" class="lnkocn">695</a></label>
|
||
<ul>
|
||
<li class="bullet" id="695">
|
||
Always check first the image status updates on our homepage at ‹<a href="http://debian-live.alioth.debian.org/" target="_top">http://debian-live.alioth.debian.org/</a>› for known issues.
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#696" class="lnkocn">696</a></label>
|
||
<ul>
|
||
<li class="bullet" id="696">
|
||
Before submitting a bug report always try to reproduce the bug with the <b>most recent versions</b> of the branch of <i>live-build</i>, <i>live-boot</i>, <i>live-config</i> and <i>live-tools</i> that you're using (like the newest 4.x version of <i>live-build</i> if you're using <i>live-build</i> 4).
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#697" class="lnkocn">697</a></label>
|
||
<ul>
|
||
<li class="bullet" id="697">
|
||
Try to give <b>as specific information as possible</b> about the bug. This includes (at least) the version of <i>live-build</i>, <i>live-boot</i>, <i>live-config</i>, and <i>live-tools</i> used and the distribution of the live system you are building.
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<br><hr width=90% /><br>
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#698" class="lnkocn">698</a></label>
|
||
<h5 class="norm" id="698"><a name="698"></a>
|
||
<a name="c14.1" ></a><a name="h14.1" ></a>14.1 Known issues
|
||
</h5>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#699" class="lnkocn">699</a></label>
|
||
<p class="i0" id="699">
|
||
Since Debian <b>testing</b> and Debian <b>unstable</b> distributions are moving targets, when you specify either of them as the target system distribution, a successful build may not always be possible.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#700" class="lnkocn">700</a></label>
|
||
<p class="i0" id="700">
|
||
If this causes too much difficulty for you, do not build a system based on <b>testing</b> or <b>unstable</b>, but rather, use <b>stable</b>. <i>live-build</i> always defaults to the <b>stable</b> release.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#701" class="lnkocn">701</a></label>
|
||
<p class="i0" id="701">
|
||
Currently known issues are listed under the section 'status' on our homepage at ‹<a href="http://debian-live.alioth.debian.org/" target="_top">http://debian-live.alioth.debian.org/</a>›.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#702" class="lnkocn">702</a></label>
|
||
<p class="i0" id="702">
|
||
It is out of the scope of this manual to train you to correctly identify and fix problems in packages of the development distributions, however, there are two things you can always try: If a build fails when the target distribution is <b>testing</b>, try <b>unstable</b>. If <b>unstable</b> does not work either, revert to <b>testing</b> and pin the newer version of the failing package from <b>unstable</b> (see <a href="#apt-pinning">APT pinning</a> for details).
|
||
</p>
|
||
</div>
|
||
|
||
<br><hr width=90% /><br>
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#703" class="lnkocn">703</a></label>
|
||
<h5 class="norm" id="703"><a name="703"></a>
|
||
<a name="c14.2" ></a><a name="h14.2" ></a>14.2 Rebuild from scratch
|
||
</h5>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#704" class="lnkocn">704</a></label>
|
||
<p class="i0" id="704">
|
||
To ensure that a particular bug is not caused by an uncleanly built system, please always rebuild the whole live system from scratch to see if the bug is reproducible.
|
||
</p>
|
||
</div>
|
||
|
||
<br><hr width=90% /><br>
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#705" class="lnkocn">705</a></label>
|
||
<h5 class="norm" id="705"><a name="705"></a>
|
||
<a name="c14.3" ></a><a name="h14.3" ></a>14.3 Use up-to-date packages
|
||
</h5>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#706" class="lnkocn">706</a></label>
|
||
<p class="i0" id="706">
|
||
Using outdated packages can cause significant problems when trying to reproduce (and ultimately fix) your problem. Make sure your build system is up-to-date and any packages included in your image are up-to-date as well.
|
||
</p>
|
||
</div>
|
||
|
||
<br><hr width=90% /><br>
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#707" class="lnkocn">707</a></label>
|
||
<h5 class="norm" id="707"><a name="707"></a>
|
||
<a name="h14.4" ></a><a name="collect-information" ></a>14.4 Collect information
|
||
</h5>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#708" class="lnkocn">708</a></label>
|
||
<p class="i0" id="708">
|
||
Please provide enough information with your report. Include, at least, the exact version of <i>live-build</i> where the bug is encountered and the steps to reproduce it. Please use your common sense and provide any other relevant information if you think that it might help in solving the problem.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#709" class="lnkocn">709</a></label>
|
||
<p class="i0" id="709">
|
||
To make the most out of your bug report, we require at least the following information:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#710" class="lnkocn">710</a></label>
|
||
<ul>
|
||
<li class="bullet" id="710">
|
||
Architecture of the host system
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#711" class="lnkocn">711</a></label>
|
||
<ul>
|
||
<li class="bullet" id="711">
|
||
Distribution of the host system
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#712" class="lnkocn">712</a></label>
|
||
<ul>
|
||
<li class="bullet" id="712">
|
||
Version of <i>live-build</i> on the host system
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#713" class="lnkocn">713</a></label>
|
||
<ul>
|
||
<li class="bullet" id="713">
|
||
Version of <i>debootstrap</i> on the host system
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#714" class="lnkocn">714</a></label>
|
||
<ul>
|
||
<li class="bullet" id="714">
|
||
Architecture of the live system
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#715" class="lnkocn">715</a></label>
|
||
<ul>
|
||
<li class="bullet" id="715">
|
||
Distribution of the live system
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#716" class="lnkocn">716</a></label>
|
||
<ul>
|
||
<li class="bullet" id="716">
|
||
Version of <i>live-boot</i> on the live system
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#717" class="lnkocn">717</a></label>
|
||
<ul>
|
||
<li class="bullet" id="717">
|
||
Version of <i>live-config</i> on the live system
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#718" class="lnkocn">718</a></label>
|
||
<ul>
|
||
<li class="bullet" id="718">
|
||
Version of <i>live-tools</i> on the live system
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#719" class="lnkocn">719</a></label>
|
||
<p class="i0" id="719">
|
||
You can generate a log of the build process by using the <tt>tee</tt> command. We recommend doing this automatically with an <tt>auto/build</tt> script (see <a href="#managing-a-configuration">Managing a configuration</a> for details).
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#720" class="lnkocn">720</a></label>
|
||
<p class="code" id="720">
|
||
# lb build 2>&1 | tee build.log<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#721" class="lnkocn">721</a></label>
|
||
<p class="i0" id="721">
|
||
At boot time, <i>live-boot</i> and <i>live-config</i> store their logfiles in <tt>/var/log/live/</tt>. Check them for error messages.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#722" class="lnkocn">722</a></label>
|
||
<p class="i0" id="722">
|
||
Additionally, to rule out other errors, it is always a good idea to tar up your <tt>config/</tt> directory and upload it somewhere (do <b>not</b> send it as an attachment to the mailing list), so that we can try to reproduce the errors you encountered. If this is difficult (e.g. due to size) you can use the output of <tt>lb config --dump</tt> which produces a summary of your config tree (i.e. lists files in subdirectories of <tt>config/</tt> but does not include them).
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#723" class="lnkocn">723</a></label>
|
||
<p class="i0" id="723">
|
||
Remember to send in any logs that were produced with English locale settings, e.g. run your <i>live-build</i> commands with a leading <tt>LC_ALL=C</tt> or <tt>LC_ALL=en_US</tt>.
|
||
</p>
|
||
</div>
|
||
|
||
<br><hr width=90% /><br>
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#724" class="lnkocn">724</a></label>
|
||
<h5 class="norm" id="724"><a name="724"></a>
|
||
<a name="c14.5" ></a><a name="h14.5" ></a>14.5 Isolate the failing case if possible
|
||
</h5>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#725" class="lnkocn">725</a></label>
|
||
<p class="i0" id="725">
|
||
If possible, isolate the failing case to the smallest possible change that breaks. It is not always easy to do this so if you cannot manage it for your report, do not worry. However, if you plan your development cycle well, using small enough change sets per iteration, you may be able to isolate the problem by constructing a simpler 'base' configuration that closely matches your actual configuration plus just the broken change set added to it. If you have a hard time sorting out which of your changes broke, it may be that you are including too much in each change set and should develop in smaller increments.
|
||
</p>
|
||
</div>
|
||
|
||
<br><hr width=90% /><br>
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#726" class="lnkocn">726</a></label>
|
||
<h5 class="norm" id="726"><a name="726"></a>
|
||
<a name="c14.6" ></a><a name="h14.6" ></a>14.6 Use the correct package to report the bug against
|
||
</h5>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#727" class="lnkocn">727</a></label>
|
||
<p class="i0" id="727">
|
||
If you do not know what component is responsible for the bug or if the bug is a general bug concerning live systems, you can fill a bug against the debian-live pseudo-package.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#728" class="lnkocn">728</a></label>
|
||
<p class="i0" id="728">
|
||
However, we would appreciate it if you try to narrow it down according to where the bug appears.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#729" class="lnkocn">729</a></label>
|
||
<h6 class="norm" id="729"><a name="729"></a>
|
||
<a name="c14.6.1" ></a><a name="h14.6.1" ></a>14.6.1 At build time while bootstrapping
|
||
</h6>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#730" class="lnkocn">730</a></label>
|
||
<p class="i0" id="730">
|
||
<i>live-build</i> first bootstraps a basic Debian system with <i>debootstrap</i>. If a bug appears here, check if the error is related to a specific Debian package (most likely), or if it is related to the bootstrapping tool itself.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#731" class="lnkocn">731</a></label>
|
||
<p class="i0" id="731">
|
||
In both cases, this is not a bug in the live system, but rather in Debian itself and probably we cannot fix it directly. Please report such a bug against the bootstrapping tool or the failing package.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#732" class="lnkocn">732</a></label>
|
||
<h6 class="norm" id="732"><a name="732"></a>
|
||
<a name="c14.6.2" ></a><a name="h14.6.2" ></a>14.6.2 At build time while installing packages
|
||
</h6>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#733" class="lnkocn">733</a></label>
|
||
<p class="i0" id="733">
|
||
<i>live-build</i> installs additional packages from the Debian archive and depending on the Debian distribution used and the daily archive state, it can fail. If a bug appears here, check if the error is also reproducible on a normal system.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#734" class="lnkocn">734</a></label>
|
||
<p class="i0" id="734">
|
||
If this is the case, this is not a bug in the live system, but rather in Debian - please report it against the failing package. Running <i>debootstrap</i> separately from the Live system build or running <tt>lb bootstrap --debug</tt> will give you more information.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#735" class="lnkocn">735</a></label>
|
||
<p class="i0" id="735">
|
||
Also, if you are using a local mirror and/or any sort of proxy and you are experiencing a problem, please always reproduce it first by bootstrapping from an official mirror.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#736" class="lnkocn">736</a></label>
|
||
<h6 class="norm" id="736"><a name="736"></a>
|
||
<a name="c14.6.3" ></a><a name="h14.6.3" ></a>14.6.3 At boot time
|
||
</h6>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#737" class="lnkocn">737</a></label>
|
||
<p class="i0" id="737">
|
||
If your image does not boot, please report it to the mailing list together with the information requested in <a href="#collect-information">Collect information</a>. Do not forget to mention, how/when the image failed exactly, whether using virtualization or real hardware. If you are using a virtualization technology of any kind, please always run it on real hardware before reporting a bug. Providing a screenshot of the failure is also very helpful.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#738" class="lnkocn">738</a></label>
|
||
<h6 class="norm" id="738"><a name="738"></a>
|
||
<a name="c14.6.4" ></a><a name="h14.6.4" ></a>14.6.4 At run time
|
||
</h6>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#739" class="lnkocn">739</a></label>
|
||
<p class="i0" id="739">
|
||
If a package was successfully installed, but fails while actually running the Live system, this is probably a bug in the live system. However:
|
||
</p>
|
||
</div>
|
||
|
||
<br><hr width=90% /><br>
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#740" class="lnkocn">740</a></label>
|
||
<h5 class="norm" id="740"><a name="740"></a>
|
||
<a name="c14.7" ></a><a name="h14.7" ></a>14.7 Do the research
|
||
</h5>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#741" class="lnkocn">741</a></label>
|
||
<p class="i0" id="741">
|
||
Before filing the bug, please search the web for the particular error message or symptom you are getting. As it is highly unlikely that you are the only person experiencing a particular problem. There is always a chance that it has been discussed elsewhere and a possible solution, patch, or workaround has been proposed.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#742" class="lnkocn">742</a></label>
|
||
<p class="i0" id="742">
|
||
You should pay particular attention to the live systems mailing list, as well as the homepage, as these are likely to contain the most up-to-date information. If such information exists, always include the references to it in your bug report.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#743" class="lnkocn">743</a></label>
|
||
<p class="i0" id="743">
|
||
In addition, you should check the current bug lists for <i>live-build</i>, <i>live-boot</i>, <i>live-config</i> and <i>live-tools</i> to see whether something similar has already been reported.
|
||
</p>
|
||
</div>
|
||
|
||
<br><hr width=90% /><br>
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#744" class="lnkocn">744</a></label>
|
||
<h5 class="norm" id="744"><a name="744"></a>
|
||
<a name="c14.8" ></a><a name="h14.8" ></a>14.8 Where to report bugs
|
||
</h5>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#745" class="lnkocn">745</a></label>
|
||
<p class="i0" id="745">
|
||
The Live Systems Project keeps track of all bugs in the Bug Tracking System (BTS). For information on how to use the system, please see ‹<a href="https://bugs.debian.org/" target="_top">https://bugs.debian.org/</a>›. You can also submit the bugs by using the <tt>reportbug</tt> command from the package with the same name.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#746" class="lnkocn">746</a></label>
|
||
<p class="i0" id="746">
|
||
In general, you should report build time errors against the <i>live-build</i> package, boot time errors against <i>live-boot</i>, and run time errors against <i>live-config</i>. If you are unsure of which package is appropriate or need more help before submitting a bug report, please report it against the debian-live pseudo-package. We will then take care about it and reassign it where appropriate.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#747" class="lnkocn">747</a></label>
|
||
<p class="i0" id="747">
|
||
Please note that bugs found in distributions derived from Debian (such as Ubuntu and others) should <b>not</b> be reported to the Debian BTS unless they can be also reproduced on a Debian system using official Debian packages.
|
||
</p>
|
||
</div>
|
||
|
||
<br><hr width=90% /><br>
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#748" class="lnkocn">748</a></label>
|
||
<h1 class="norm" id="748"><a name="748"></a>
|
||
Coding Style
|
||
</h1>
|
||
</div>
|
||
|
||
<br><hr width=90% /><br>
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#749" class="lnkocn">749</a></label>
|
||
<h4 class="norm" id="749"><a name="749"></a>
|
||
<a name="h15" ></a><a name="coding_style" ></a><a name="coding-style" ></a>15. Coding Style
|
||
</h4>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#750" class="lnkocn">750</a></label>
|
||
<p class="i0" id="750">
|
||
This chapter documents the coding style used in live systems.
|
||
</p>
|
||
</div>
|
||
|
||
<br><hr width=90% /><br>
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#751" class="lnkocn">751</a></label>
|
||
<h5 class="norm" id="751"><a name="751"></a>
|
||
<a name="c15.1" ></a><a name="h15.1" ></a>15.1 Compatibility
|
||
</h5>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#752" class="lnkocn">752</a></label>
|
||
<ul>
|
||
<li class="bullet" id="752">
|
||
Don't use syntax or semantics that are unique to the Bash shell. For example, the use of array constructs.
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#753" class="lnkocn">753</a></label>
|
||
<ul>
|
||
<li class="bullet" id="753">
|
||
Only use the POSIX subset - for example, use $(foo) over `foo`.
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#754" class="lnkocn">754</a></label>
|
||
<ul>
|
||
<li class="bullet" id="754">
|
||
You can check your scripts with 'sh -n' and 'checkbashisms'.
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#755" class="lnkocn">755</a></label>
|
||
<ul>
|
||
<li class="bullet" id="755">
|
||
Make sure all shell code runs with 'set -e'.
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<br><hr width=90% /><br>
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#756" class="lnkocn">756</a></label>
|
||
<h5 class="norm" id="756"><a name="756"></a>
|
||
<a name="c15.2" ></a><a name="h15.2" ></a>15.2 Indenting
|
||
</h5>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#757" class="lnkocn">757</a></label>
|
||
<ul>
|
||
<li class="bullet" id="757">
|
||
Always use tabs over spaces.
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<br><hr width=90% /><br>
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#758" class="lnkocn">758</a></label>
|
||
<h5 class="norm" id="758"><a name="758"></a>
|
||
<a name="c15.3" ></a><a name="h15.3" ></a>15.3 Wrapping
|
||
</h5>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#759" class="lnkocn">759</a></label>
|
||
<ul>
|
||
<li class="bullet" id="759">
|
||
Generally, lines are 80 chars at maximum.
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#760" class="lnkocn">760</a></label>
|
||
<ul>
|
||
<li class="bullet" id="760">
|
||
Use the "Linux style" of line breaks:
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#761" class="lnkocn">761</a></label>
|
||
<p class="i0" id="761">
|
||
Bad:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#762" class="lnkocn">762</a></label>
|
||
<p class="code" id="762">
|
||
if foo; then<br>
|
||
bar<br>
|
||
fi<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#763" class="lnkocn">763</a></label>
|
||
<p class="i0" id="763">
|
||
Good:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#764" class="lnkocn">764</a></label>
|
||
<p class="code" id="764">
|
||
if foo<br>
|
||
then<br>
|
||
bar<br>
|
||
fi<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#765" class="lnkocn">765</a></label>
|
||
<ul>
|
||
<li class="bullet" id="765">
|
||
The same holds for functions:
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#766" class="lnkocn">766</a></label>
|
||
<p class="i0" id="766">
|
||
Bad:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#767" class="lnkocn">767</a></label>
|
||
<p class="code" id="767">
|
||
Foo () {<br>
|
||
bar<br>
|
||
}<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#768" class="lnkocn">768</a></label>
|
||
<p class="i0" id="768">
|
||
Good:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#769" class="lnkocn">769</a></label>
|
||
<p class="code" id="769">
|
||
Foo ()<br>
|
||
{<br>
|
||
bar<br>
|
||
}<br>
|
||
</p>
|
||
</div>
|
||
|
||
<br><hr width=90% /><br>
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#770" class="lnkocn">770</a></label>
|
||
<h5 class="norm" id="770"><a name="770"></a>
|
||
<a name="c15.4" ></a><a name="h15.4" ></a>15.4 Variables
|
||
</h5>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#771" class="lnkocn">771</a></label>
|
||
<ul>
|
||
<li class="bullet" id="771">
|
||
Variables are always in capital letters.
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#772" class="lnkocn">772</a></label>
|
||
<ul>
|
||
<li class="bullet" id="772">
|
||
Variables used in <i>live-build</i> always start with <tt>LB_</tt> prefix.
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#773" class="lnkocn">773</a></label>
|
||
<ul>
|
||
<li class="bullet" id="773">
|
||
Internal temporary variables in <i>live-build</i> should start with the <tt>_LB_</tt> prefix.
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#774" class="lnkocn">774</a></label>
|
||
<ul>
|
||
<li class="bullet" id="774">
|
||
Local variables start with <i>live-build</i> <tt>__LB_</tt> prefix.
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#775" class="lnkocn">775</a></label>
|
||
<ul>
|
||
<li class="bullet" id="775">
|
||
Variables in connection to a boot parameter in <i>live-config</i> start with <tt>LIVE_</tt>.
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#776" class="lnkocn">776</a></label>
|
||
<ul>
|
||
<li class="bullet" id="776">
|
||
All other variables in <i>live-config</i> start with <tt>_</tt> prefix.
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#777" class="lnkocn">777</a></label>
|
||
<ul>
|
||
<li class="bullet" id="777">
|
||
Use braces around variables; e.g. write <tt>${FOO}</tt> instead of <tt>$FOO</tt>.
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#778" class="lnkocn">778</a></label>
|
||
<ul>
|
||
<li class="bullet" id="778">
|
||
Always protect variables with quotes to respect potential whitespaces: write <tt>"${FOO}"</tt> not <tt>${FOO}</tt>.
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#779" class="lnkocn">779</a></label>
|
||
<ul>
|
||
<li class="bullet" id="779">
|
||
For consistency reasons, always use quotes when assigning values to variables:
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#780" class="lnkocn">780</a></label>
|
||
<p class="i0" id="780">
|
||
Bad:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#781" class="lnkocn">781</a></label>
|
||
<p class="code" id="781">
|
||
FOO=bar<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#782" class="lnkocn">782</a></label>
|
||
<p class="i0" id="782">
|
||
Good:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#783" class="lnkocn">783</a></label>
|
||
<p class="code" id="783">
|
||
FOO="bar"<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#784" class="lnkocn">784</a></label>
|
||
<ul>
|
||
<li class="bullet" id="784">
|
||
If multiple variables are used, quote the full expression:
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#785" class="lnkocn">785</a></label>
|
||
<p class="i0" id="785">
|
||
Bad:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#786" class="lnkocn">786</a></label>
|
||
<p class="code" id="786">
|
||
if [ -f "${FOO}"/foo/"${BAR}"/bar ]<br>
|
||
then<br>
|
||
foobar<br>
|
||
fi<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#787" class="lnkocn">787</a></label>
|
||
<p class="i0" id="787">
|
||
Good:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#788" class="lnkocn">788</a></label>
|
||
<p class="code" id="788">
|
||
if [ -f "${FOO}/foo/${BAR}/bar" ]<br>
|
||
then<br>
|
||
foobar<br>
|
||
fi<br>
|
||
</p>
|
||
</div>
|
||
|
||
<br><hr width=90% /><br>
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#789" class="lnkocn">789</a></label>
|
||
<h5 class="norm" id="789"><a name="789"></a>
|
||
<a name="c15.5" ></a><a name="h15.5" ></a>15.5 Miscellaneous
|
||
</h5>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#790" class="lnkocn">790</a></label>
|
||
<ul>
|
||
<li class="bullet" id="790">
|
||
Use "<tt>|</tt>" (without the surround quotes) as a separator in calls to sed, e.g. "<tt>sed -e 's|foo|bar|'</tt>" (without "").
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#791" class="lnkocn">791</a></label>
|
||
<ul>
|
||
<li class="bullet" id="791">
|
||
Don't use the <tt>test</tt> command for comparisons or tests, use "<tt>[</tt>" "<tt>]</tt>" (without ""); e.g. "<tt>if [ -x /bin/foo ]; ...</tt>" and not "<tt>if test -x /bin/foo; ...</tt>".
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#792" class="lnkocn">792</a></label>
|
||
<ul>
|
||
<li class="bullet" id="792">
|
||
Use <tt>case</tt> wherever possible over <tt>test</tt>, as it's easier to read and faster in execution.
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#793" class="lnkocn">793</a></label>
|
||
<ul>
|
||
<li class="bullet" id="793">
|
||
Use capitalized names for functions to limit messing with the users environment.
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<br><hr width=90% /><br>
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#794" class="lnkocn">794</a></label>
|
||
<h1 class="norm" id="794"><a name="794"></a>
|
||
Procedures
|
||
</h1>
|
||
</div>
|
||
|
||
<br><hr width=90% /><br>
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#795" class="lnkocn">795</a></label>
|
||
<h4 class="norm" id="795"><a name="795"></a>
|
||
<a name="h16" ></a><a name="procedures" ></a>16. Procedures
|
||
</h4>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#796" class="lnkocn">796</a></label>
|
||
<p class="i0" id="796">
|
||
This chapter documents the procedures within the Live Systems Project for various tasks that need cooperation with other teams in Debian.
|
||
</p>
|
||
</div>
|
||
|
||
<br><hr width=90% /><br>
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#797" class="lnkocn">797</a></label>
|
||
<h5 class="norm" id="797"><a name="797"></a>
|
||
<a name="c16.1" ></a><a name="h16.1" ></a>16.1 Major Releases
|
||
</h5>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#798" class="lnkocn">798</a></label>
|
||
<p class="i0" id="798">
|
||
Releasing a new stable major version of Debian includes a lot of different teams working together to make it happen. At some point, the Live team comes in and builds live system images. The requirements to do this are:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#799" class="lnkocn">799</a></label>
|
||
<ul>
|
||
<li class="bullet" id="799">
|
||
A mirror containing the released versions for the debian and debian-security archives which the debian-live buildd can access.
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#800" class="lnkocn">800</a></label>
|
||
<ul>
|
||
<li class="bullet" id="800">
|
||
The names of the image need to be known (e.g. debian-live-VERSION-ARCH-FLAVOUR.iso).
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#801" class="lnkocn">801</a></label>
|
||
<ul>
|
||
<li class="bullet" id="801">
|
||
The data from debian-cd needs to be synced (udeb exclude lists).
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#802" class="lnkocn">802</a></label>
|
||
<ul>
|
||
<li class="bullet" id="802">
|
||
Images are built and mirrored on cdimage.debian.org.
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<br><hr width=90% /><br>
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#803" class="lnkocn">803</a></label>
|
||
<h5 class="norm" id="803"><a name="803"></a>
|
||
<a name="c16.2" ></a><a name="h16.2" ></a>16.2 Point Releases
|
||
</h5>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#804" class="lnkocn">804</a></label>
|
||
<ul>
|
||
<li class="bullet" id="804">
|
||
Again, we need updated mirrors of debian and debian-security.
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#805" class="lnkocn">805</a></label>
|
||
<ul>
|
||
<li class="bullet" id="805">
|
||
Images are built and mirrored on cdimage.debian.org.
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#806" class="lnkocn">806</a></label>
|
||
<ul>
|
||
<li class="bullet" id="806">
|
||
Send announcement mail.
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#807" class="lnkocn">807</a></label>
|
||
<h6 class="norm" id="807"><a name="807"></a>
|
||
<a name="c16.2.1" ></a><a name="h16.2.1" ></a>16.2.1 Last Point Release of a Debian Release
|
||
</h6>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#808" class="lnkocn">808</a></label>
|
||
<p class="i0" id="808">
|
||
Remember to adjust both chroot and binary mirrors when building the last set of images for a Debian release after it has been moved away from ftp.debian.org to archive.debian.org. That way, old prebuilt live images are still useful without user modifications.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#809" class="lnkocn">809</a></label>
|
||
<h6 class="norm" id="809"><a name="809"></a>
|
||
<a name="c16.2.2" ></a><a name="h16.2.2" ></a>16.2.2 Point release announcement template
|
||
</h6>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#810" class="lnkocn">810</a></label>
|
||
<p class="i0" id="810">
|
||
An announcement mail for point releases can be generated using the template below and the following command:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#811" class="lnkocn">811</a></label>
|
||
<p class="code" id="811">
|
||
$ sed \<br>
|
||
-e 's|@MAJOR@|9.0|g' \<br>
|
||
-e 's|@MINOR@|9.0.1|g' \<br>
|
||
-e 's|@CODENAME@|stretch|g' \<br>
|
||
-e 's|@ANNOUNCE@|2017/msgXXXXX.html|g'<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#812" class="lnkocn">812</a></label>
|
||
<p class="i0" id="812">
|
||
Please check the mail carefully before sending and pass it to others for proof-reading.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#813" class="lnkocn">813</a></label>
|
||
<p class="code" id="813">
|
||
Updated Live @MAJOR@: @MINOR@ released<br><br>
|
||
The Live Systems Project is pleased to announce the @MINOR@ update of the<br>
|
||
Live images for the stable distribution Debian @MAJOR@ (codename "@CODENAME@").<br><br>
|
||
The images are available for download at:<br><br>
|
||
<http://debian-live.alioth.debian.org/cdimage/release/current/><br> <br>
|
||
and later at:<br><br>
|
||
<http://cdimage.debian.org/cdimage/release/current-live/><br> <br>
|
||
This update includes the changes of the Debian @MINOR@ release:<br><br>
|
||
<https://lists.debian.org/debian-announce/@ANNOUNCE@><br> <br>
|
||
Additionally it includes the following Live-specific changes:<br><br>
|
||
* [INSERT LIVE-SPECIFIC CHANGE HERE]<br>
|
||
* [INSERT LIVE-SPECIFIC CHANGE HERE]<br>
|
||
* [LARGER ISSUES MAY DESERVE THEIR OWN SECTION]<br><br>
|
||
About Live Systems<br>
|
||
------------------<br>
|
||
The Live Systems Project produces the tools used to build official<br>
|
||
live systems and the official live images themselves for Debian.<br><br>
|
||
About Debian<br>
|
||
------------<br>
|
||
The Debian Project is an association of Free Software developers who<br>
|
||
volunteer their time and effort in order to produce the completely free<br>
|
||
operating system Debian.<br><br>
|
||
Contact Information<br>
|
||
-------------------<br>
|
||
For further information, please visit the Live Systems web pages at<br>
|
||
<http://debian-live.alioth.debian.org/>, or contact the Live Systems team at<br>
|
||
<debian-live@lists.debian.org>.<br>
|
||
</p>
|
||
</div>
|
||
|
||
<br><hr width=90% /><br>
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#814" class="lnkocn">814</a></label>
|
||
<h1 class="norm" id="814"><a name="814"></a>
|
||
Git repositories
|
||
</h1>
|
||
</div>
|
||
|
||
<br><hr width=90% /><br>
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#815" class="lnkocn">815</a></label>
|
||
<h4 class="norm" id="815"><a name="815"></a>
|
||
<a name="h17" ></a><a name="git_repositories" ></a><a name="git-repositories" ></a>17. Git repositories
|
||
</h4>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#816" class="lnkocn">816</a></label>
|
||
<p class="i0" id="816">
|
||
The list of all the available repositories of the Live Systems Project can be found at ‹<a href="http://http://anonscm.debian.org/cgit/debian-live/" target="_top">http://http://anonscm.debian.org/cgit/debian-live/</a>›. The project's git URLs have the form: <tt>protocol://http://anonscm.debian.org/git/debian-live/repository</tt>. Thus, in order to clone <i>live-manual</i> read-only, launch:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#817" class="lnkocn">817</a></label>
|
||
<p class="code" id="817">
|
||
$ git clone git://http://anonscm.debian.org/git/debian-live/live-manual.git<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#818" class="lnkocn">818</a></label>
|
||
<p class="i0" id="818">
|
||
Or,
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#819" class="lnkocn">819</a></label>
|
||
<p class="code" id="819">
|
||
$ git clone https://http://anonscm.debian.org/git/debian-live/live-manual.git<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#820" class="lnkocn">820</a></label>
|
||
<p class="i0" id="820">
|
||
Or,
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#821" class="lnkocn">821</a></label>
|
||
<p class="code" id="821">
|
||
$ git clone http://http://anonscm.debian.org/git/debian-live/live-manual.git<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#822" class="lnkocn">822</a></label>
|
||
<p class="i0" id="822">
|
||
The cloning addresses with write permission have the form: <tt>ssh://git.debian.org/git/debian-live/repository</tt>.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#823" class="lnkocn">823</a></label>
|
||
<p class="i0" id="823">
|
||
So, again, to clone <i>live-manual</i> over ssh you must type:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#824" class="lnkocn">824</a></label>
|
||
<p class="code" id="824">
|
||
$ git clone ssh://git.debian.org/git/debian-live/live-manual.git<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#825" class="lnkocn">825</a></label>
|
||
<p class="i0" id="825">
|
||
The git tree is made up of several different branches. The <b>debian</b> and the <b>debian-next</b> branches are particularly noteworthy because they contain the actual work that will eventually be included in each new release.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#826" class="lnkocn">826</a></label>
|
||
<p class="i0" id="826">
|
||
After cloning any of the existing repositories, you will be on the <b>debian</b> branch. This is appropriate to take a look at the state of the project's latest release but before starting work it is crucial to switch to the <b>debian-next</b> branch. To do so:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#827" class="lnkocn">827</a></label>
|
||
<p class="code" id="827">
|
||
$ git checkout debian-next<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#828" class="lnkocn">828</a></label>
|
||
<p class="i0" id="828">
|
||
The <b>debian-next</b> branch, which is not always fast-forward, is where all the changes are committed first before being merged into the <b>debian</b> branch. To make an analogy, it is like a testing ground. If you are working on this branch and need to pull, you will have to do a <tt>git pull --rebase</tt> so that your local modifications are staged while pulling from the server and then your changes will be put on top of it all.
|
||
</p>
|
||
</div>
|
||
|
||
<br><hr width=90% /><br>
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#829" class="lnkocn">829</a></label>
|
||
<h5 class="norm" id="829"><a name="829"></a>
|
||
<a name="c17.1" ></a><a name="h17.1" ></a>17.1 Handling multiple repositories
|
||
</h5>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#830" class="lnkocn">830</a></label>
|
||
<p class="i0" id="830">
|
||
If you intend to clone several of the live systems repositories and want to switch to the <b>debian-next</b> branch right away to check the latest code, write a patch or contribute with a translation you ought to know that the git server provides a <tt>mrconfig</tt> file to ease the handling of multiple repositories. In order to use it you need to install the <i>mr</i> package and after that, launch:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#831" class="lnkocn">831</a></label>
|
||
<p class="code" id="831">
|
||
$ mr bootstrap http://debian-live.alioth.debian.org/other/mr/mrconfig<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#832" class="lnkocn">832</a></label>
|
||
<p class="i0" id="832">
|
||
This command will automatically clone and checkout to the <b>debian-next</b> branch the development repositories of the Debian packages produced by the project. These include, among others, the <i>live-images</i> repository, which contains the configurations used for the prebuilt images that the project publishes for general use. For more information on how to use this repository, see <a href="#clone-configuration-via-git">Clone a configuration published via Git</a>
|
||
</p>
|
||
</div>
|
||
|
||
<br><hr width=90% /><br>
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#833" class="lnkocn">833</a></label>
|
||
<h1 class="norm" id="833"><a name="833"></a>
|
||
Examples
|
||
</h1>
|
||
</div>
|
||
|
||
<br><hr width=90% /><br>
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#834" class="lnkocn">834</a></label>
|
||
<h1 class="norm" id="834"><a name="834"></a>
|
||
Examples
|
||
</h1>
|
||
</div>
|
||
|
||
<br><hr width=90% /><br>
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#835" class="lnkocn">835</a></label>
|
||
<h4 class="norm" id="835"><a name="835"></a>
|
||
<a name="h18" ></a><a name="examples" ></a>18. Examples
|
||
</h4>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#836" class="lnkocn">836</a></label>
|
||
<p class="i0" id="836">
|
||
This chapter covers example builds for specific use cases with live systems. If you are new to building your own live system images, we recommend you first look at the three tutorials in sequence, as each one teaches new techniques that will help you use and understand the remaining examples.
|
||
</p>
|
||
</div>
|
||
|
||
<br><hr width=90% /><br>
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#837" class="lnkocn">837</a></label>
|
||
<h5 class="norm" id="837"><a name="837"></a>
|
||
<a name="h18.1" ></a><a name="using-the-examples" ></a>18.1 Using the examples
|
||
</h5>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#838" class="lnkocn">838</a></label>
|
||
<p class="i0" id="838">
|
||
To use these examples you need a system to build them on that meets the requirements listed in <a href="#requirements">Requirements</a> and has <i>live-build</i> installed as described in <a href="#installing-live-build">Installing live-build</a>.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#839" class="lnkocn">839</a></label>
|
||
<p class="i0" id="839">
|
||
Note that, for the sake of brevity, in these examples we do not specify a local mirror to use for the build. You can speed up downloads considerably if you use a local mirror. You may specify the options when you use <tt>lb config</tt>, as described in <a href="#distribution-mirrors-build-time">Distribution mirrors used at build time</a>, or for more convenience, set the default for your build system in <tt>/etc/live/build.conf</tt>. Simply create this file and in it, set the corresponding <tt>LB_MIRROR_*</tt> variables to your preferred mirror. All other mirrors used in the build will be defaulted from these values. For example:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#840" class="lnkocn">840</a></label>
|
||
<p class="code" id="840">
|
||
LB_MIRROR_BOOTSTRAP="http://mirror/debian/" <br>
|
||
LB_MIRROR_CHROOT_SECURITY="http://mirror/debian-security/" <br>
|
||
LB_MIRROR_CHROOT_BACKPORTS="http://mirror/debian-backports/"<br>
|
||
</p>
|
||
</div>
|
||
|
||
<br><hr width=90% /><br>
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#841" class="lnkocn">841</a></label>
|
||
<h5 class="norm" id="841"><a name="841"></a>
|
||
<a name="h18.2" ></a><a name="tutorial-1" ></a>18.2 Tutorial 1: A default image
|
||
</h5>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#842" class="lnkocn">842</a></label>
|
||
<p class="i0" id="842">
|
||
<b>Use case:</b> Create a simple first image, learning the basics of <i>live-build</i>.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#843" class="lnkocn">843</a></label>
|
||
<p class="i0" id="843">
|
||
In this tutorial, we will build a default ISO hybrid live system image containing only base packages (no Xorg) and some live system support packages, as a first exercise in using <i>live-build</i>.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#844" class="lnkocn">844</a></label>
|
||
<p class="i0" id="844">
|
||
You can't get much simpler than this:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#845" class="lnkocn">845</a></label>
|
||
<p class="code" id="845">
|
||
$ mkdir tutorial1 ; cd tutorial1 ; lb config<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#846" class="lnkocn">846</a></label>
|
||
<p class="i0" id="846">
|
||
Examine the contents of the <tt>config/</tt> directory if you wish. You will see stored here a skeletal configuration, ready to customize or, in this case, use immediately to build a default image.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#847" class="lnkocn">847</a></label>
|
||
<p class="i0" id="847">
|
||
Now, as superuser, build the image, saving a log as you build with <tt>tee</tt>.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#848" class="lnkocn">848</a></label>
|
||
<p class="code" id="848">
|
||
# lb build 2>&1 | tee build.log<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#849" class="lnkocn">849</a></label>
|
||
<p class="i0" id="849">
|
||
Assuming all goes well, after a while, the current directory will contain <tt>live-image-i386.hybrid.iso</tt>. This ISO hybrid image can be booted directly in a virtual machine as described in <a href="#testing-iso-with-qemu">Testing an ISO image with Qemu</a> and <a href="#testing-iso-with-virtualbox">Testing an ISO image with VirtualBox</a>, or else imaged onto optical media or a USB flash device as described in <a href="#burning-iso-image">Burning an ISO image to a physical medium</a> and <a href="#copying-iso-hybrid-to-usb">Copying an ISO hybrid image to a USB stick</a>, respectively.
|
||
</p>
|
||
</div>
|
||
|
||
<br><hr width=90% /><br>
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#850" class="lnkocn">850</a></label>
|
||
<h5 class="norm" id="850"><a name="850"></a>
|
||
<a name="h18.3" ></a><a name="tutorial-2" ></a>18.3 Tutorial 2: A web browser utility
|
||
</h5>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#851" class="lnkocn">851</a></label>
|
||
<p class="i0" id="851">
|
||
<b>Use case:</b> Create a web browser utility image, learning how to apply customizations.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#852" class="lnkocn">852</a></label>
|
||
<p class="i0" id="852">
|
||
In this tutorial, we will create an image suitable for use as a web browser utility, serving as an introduction to customizing live system images.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#853" class="lnkocn">853</a></label>
|
||
<p class="code" id="853">
|
||
$ mkdir tutorial2<br>
|
||
$ cd tutorial2<br>
|
||
$ lb config<br>
|
||
$ echo "task-lxde-desktop iceweasel" >> config/package-lists/my.list.chroot<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#854" class="lnkocn">854</a></label>
|
||
<p class="i0" id="854">
|
||
Our choice of LXDE for this example reflects our desire to provide a minimal desktop environment, since the focus of the image is the single use we have in mind, the web browser. We could go even further and provide a default configuration for the web browser in <tt>config/includes.chroot/etc/iceweasel/profile/</tt>, or additional support packages for viewing various kinds of web content, but we leave this as an exercise for the reader.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#855" class="lnkocn">855</a></label>
|
||
<p class="i0" id="855">
|
||
Build the image, again as superuser, keeping a log as in <a href="#tutorial-1">Tutorial 1</a>:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#856" class="lnkocn">856</a></label>
|
||
<p class="code" id="856">
|
||
# lb build 2>&1 | tee build.log<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#857" class="lnkocn">857</a></label>
|
||
<p class="i0" id="857">
|
||
Again, verify the image is OK and test, as in <a href="#tutorial-1">Tutorial 1</a>.
|
||
</p>
|
||
</div>
|
||
|
||
<br><hr width=90% /><br>
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#858" class="lnkocn">858</a></label>
|
||
<h5 class="norm" id="858"><a name="858"></a>
|
||
<a name="h18.4" ></a><a name="tutorial-3" ></a>18.4 Tutorial 3: A personalized image
|
||
</h5>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#859" class="lnkocn">859</a></label>
|
||
<p class="i0" id="859">
|
||
<b>Use case:</b> Create a project to build a personalized image, containing your favourite software to take with you on a USB stick wherever you go, and evolving in successive revisions as your needs and preferences change.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#860" class="lnkocn">860</a></label>
|
||
<p class="i0" id="860">
|
||
Since we will be changing our personalized image over a number of revisions, and we want to track those changes, trying things experimentally and possibly reverting them if things don't work out, we will keep our configuration in the popular <tt>git</tt> version control system. We will also use the best practice of autoconfiguration via <tt>auto</tt> scripts as described in <a href="#managing-a-configuration">Managing a configuration</a>.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#861" class="lnkocn">861</a></label>
|
||
<h6 class="norm" id="861"><a name="861"></a>
|
||
<a name="c18.4.1" ></a><a name="h18.4.1" ></a>18.4.1 First revision
|
||
</h6>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#862" class="lnkocn">862</a></label>
|
||
<p class="code" id="862">
|
||
$ mkdir -p tutorial3/auto<br>
|
||
$ cp /usr/share/doc/live-build/examples/auto/* tutorial3/auto/<br>
|
||
$ cd tutorial3<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#863" class="lnkocn">863</a></label>
|
||
<p class="i0" id="863">
|
||
Edit <tt>auto/config</tt> to read as follows:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#864" class="lnkocn">864</a></label>
|
||
<p class="code" id="864">
|
||
#!/bin/sh<br><br>
|
||
lb config noauto \<br>
|
||
--architectures i386 \<br>
|
||
--linux-flavours 686-pae \<br>
|
||
"${@}"<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#865" class="lnkocn">865</a></label>
|
||
<p class="i0" id="865">
|
||
Perform <tt>lb config</tt> to generate the config tree, using the <tt>auto/config</tt> script you just created:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#866" class="lnkocn">866</a></label>
|
||
<p class="code" id="866">
|
||
$ lb config<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#867" class="lnkocn">867</a></label>
|
||
<p class="i0" id="867">
|
||
Now populate your local package list:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#868" class="lnkocn">868</a></label>
|
||
<p class="code" id="868">
|
||
$ echo "task-lxde-desktop iceweasel xchat" >> config/package-lists/my.list.chroot<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#869" class="lnkocn">869</a></label>
|
||
<p class="i0" id="869">
|
||
First, <tt>--architectures i386</tt> ensures that on our <tt>amd64</tt> build system, we build a 32-bit version suitable for use on most machines. Second, we use <tt>--linux-flavours 686-pae</tt> because we don't anticipate using this image on much older systems. Third, we have chosen the <i>lxde</i> task metapackage to give us a minimal desktop. And finally, we have added two initial favourite packages: <i>iceweasel</i> and <i>xchat</i>.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#870" class="lnkocn">870</a></label>
|
||
<p class="i0" id="870">
|
||
Now, build the image:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#871" class="lnkocn">871</a></label>
|
||
<p class="code" id="871">
|
||
# lb build<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#872" class="lnkocn">872</a></label>
|
||
<p class="i0" id="872">
|
||
Note that unlike in the first two tutorials, we no longer have to type <tt>2>&1 | tee build.log</tt> as that is now included in <tt>auto/build</tt>.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#873" class="lnkocn">873</a></label>
|
||
<p class="i0" id="873">
|
||
Once you've tested the image (as in <a href="#tutorial-1">Tutorial 1</a>) and are satisfied it works, it's time to initialize our <tt>git</tt> repository, adding only the auto scripts we just created, and then make the first commit:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#874" class="lnkocn">874</a></label>
|
||
<p class="code" id="874">
|
||
$ git init<br>
|
||
$ cp /usr/share/doc/live-build/examples/gitignore .gitignore<br>
|
||
$ git add .<br>
|
||
$ git commit -m "Initial import."<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#875" class="lnkocn">875</a></label>
|
||
<h6 class="norm" id="875"><a name="875"></a>
|
||
<a name="c18.4.2" ></a><a name="h18.4.2" ></a>18.4.2 Second revision
|
||
</h6>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#876" class="lnkocn">876</a></label>
|
||
<p class="i0" id="876">
|
||
In this revision, we're going to clean up from the first build, add the <i>vlc</i> package to our configuration, rebuild, test and commit.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#877" class="lnkocn">877</a></label>
|
||
<p class="i0" id="877">
|
||
The <tt>lb clean</tt> command will clean up all generated files from the previous build except for the cache, which saves having to re-download packages. This ensures that the subsequent <tt>lb build</tt> will re-run all stages to regenerate the files from our new configuration.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#878" class="lnkocn">878</a></label>
|
||
<p class="code" id="878">
|
||
# lb clean<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#879" class="lnkocn">879</a></label>
|
||
<p class="i0" id="879">
|
||
Now append the <i>vlc</i> package to our local package list in <tt>config/package-lists/my.list.chroot</tt>:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#880" class="lnkocn">880</a></label>
|
||
<p class="code" id="880">
|
||
$ echo vlc >> config/package-lists/my.list.chroot<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#881" class="lnkocn">881</a></label>
|
||
<p class="i0" id="881">
|
||
Build again:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#882" class="lnkocn">882</a></label>
|
||
<p class="code" id="882">
|
||
# lb build<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#883" class="lnkocn">883</a></label>
|
||
<p class="i0" id="883">
|
||
Test, and when you're satisfied, commit the next revision:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#884" class="lnkocn">884</a></label>
|
||
<p class="code" id="884">
|
||
$ git commit -a -m "Adding vlc media player."<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#885" class="lnkocn">885</a></label>
|
||
<p class="i0" id="885">
|
||
Of course, more complicated changes to the configuration are possible, perhaps adding files in subdirectories of <tt>config/</tt>. When you commit new revisions, just take care not to hand edit or commit the top-level files in <tt>config</tt> containing <tt>LB_*</tt> variables, as these are build products, too, and are always cleaned up by <tt>lb clean</tt> and re-created with <tt>lb config</tt> via their respective <tt>auto</tt> scripts.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#886" class="lnkocn">886</a></label>
|
||
<p class="i0" id="886">
|
||
We've come to the end of our tutorial series. While many more kinds of customization are possible, even just using the few features explored in these simple examples, an almost infinite variety of different images can be created. The remaining examples in this section cover several other use cases drawn from the collected experiences of users of live systems.
|
||
</p>
|
||
</div>
|
||
|
||
<br><hr width=90% /><br>
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#887" class="lnkocn">887</a></label>
|
||
<h5 class="norm" id="887"><a name="887"></a>
|
||
<a name="c18.5" ></a><a name="h18.5" ></a>18.5 A VNC Kiosk Client
|
||
</h5>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#888" class="lnkocn">888</a></label>
|
||
<p class="i0" id="888">
|
||
<b>Use case:</b> Create an image with <i>live-build</i> to boot directly to a VNC server.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#889" class="lnkocn">889</a></label>
|
||
<p class="i0" id="889">
|
||
Make a build directory and create an skeletal configuration inside it, disabling recommends to make a minimal system. And then create two initial package lists: the first one generated with a script provided by <i>live-build</i> named <tt>Packages</tt> (see <a href="#generated-package-lists">Generated package lists</a>), and the second one including <i>xorg</i>, <i>gdm3</i>, <i>metacity</i> and <i>xvnc4viewer</i>.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#890" class="lnkocn">890</a></label>
|
||
<p class="code" id="890">
|
||
$ mkdir vnc-kiosk-client<br>
|
||
$ cd vnc-kiosk-client<br>
|
||
$ lb config -a i386 -k 686-pae --apt-recommends false<br>
|
||
$ echo '! Packages Priority standard' > config/package-lists/standard.list.chroot<br>
|
||
$ echo "xorg gdm3 metacity xvnc4viewer" > config/package-lists/my.list.chroot<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#891" class="lnkocn">891</a></label>
|
||
<p class="i0" id="891">
|
||
As explained in <a href="#tweaking-apt-to-save-space">Tweaking APT to save space</a> you may need to re-add some recommended packages to make your image work properly.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#892" class="lnkocn">892</a></label>
|
||
<p class="i0" id="892">
|
||
An easy way to list recommends is using <i>apt-cache</i>. For example:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#893" class="lnkocn">893</a></label>
|
||
<p class="code" id="893">
|
||
$ apt-cache depends live-config live-boot<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#894" class="lnkocn">894</a></label>
|
||
<p class="i0" id="894">
|
||
In this example we found out that we had to re-include several packages recommended by <i>live-config</i> and <i>live-boot</i>: <tt>user-setup</tt> to make autologin work and <tt>sudo</tt> as an essential program to shutdown the system. Besides, it could be handy to add <tt>live-tools</tt> to be able to copy the image to RAM and <tt>eject</tt> to eventually eject the live medium. So:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#895" class="lnkocn">895</a></label>
|
||
<p class="code" id="895">
|
||
$ echo "live-tools user-setup sudo eject" > config/package-lists/recommends.list.chroot<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#896" class="lnkocn">896</a></label>
|
||
<p class="i0" id="896">
|
||
After that, create the directory <tt>/etc/skel</tt> in <tt>config/includes.chroot</tt> and put a custom <tt>.xsession</tt> in it for the default user that will launch <i>metacity</i> and start <i>xvncviewer</i>, connecting to port <tt>5901</tt> on a server at <tt>192.168.1.2</tt>:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#897" class="lnkocn">897</a></label>
|
||
<p class="code" id="897">
|
||
$ mkdir -p config/includes.chroot/etc/skel<br>
|
||
$ cat > config/includes.chroot/etc/skel/.xsession << EOF<br>
|
||
#!/bin/sh<br><br>
|
||
/usr/bin/metacity &<br>
|
||
/usr/bin/xvncviewer 192.168.1.2:1<br><br>
|
||
exit<br>
|
||
EOF<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#898" class="lnkocn">898</a></label>
|
||
<p class="i0" id="898">
|
||
Build the image:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#899" class="lnkocn">899</a></label>
|
||
<p class="code" id="899">
|
||
# lb build<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#900" class="lnkocn">900</a></label>
|
||
<p class="i0" id="900">
|
||
Enjoy.
|
||
</p>
|
||
</div>
|
||
|
||
<br><hr width=90% /><br>
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#901" class="lnkocn">901</a></label>
|
||
<h5 class="norm" id="901"><a name="901"></a>
|
||
<a name="c18.6" ></a><a name="h18.6" ></a>18.6 A base image for a 128MB USB key
|
||
</h5>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#902" class="lnkocn">902</a></label>
|
||
<p class="i0" id="902">
|
||
<b>Use case:</b> Create a default image with some components removed in order to fit on a 128MB USB key with a little space left over to use as you see fit.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#903" class="lnkocn">903</a></label>
|
||
<p class="i0" id="903">
|
||
When optimizing an image to fit a certain media size, you need to understand the tradeoffs you are making between size and functionality. In this example, we trim only so much as to make room for additional material within a 128MB media size, but without doing anything to destroy the integrity of the packages contained within, such as the purging of locale data via the <i>localepurge</i> package, or other such "intrusive" optimizations. Of particular note, we use <tt>--debootstrap-options</tt> to create a minimal system from scratch.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#904" class="lnkocn">904</a></label>
|
||
<p class="code" id="904">
|
||
$ lb config --apt-indices false --apt-recommends false --debootstrap-options "--variant=minbase" --firmware-chroot false --memtest none<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#905" class="lnkocn">905</a></label>
|
||
<p class="i0" id="905">
|
||
To make the image work properly, we must re-add, at least, two recommended packages which are left out by the <tt>--apt-recommends false</tt> option. See <a href="#tweaking-apt-to-save-space">Tweaking APT to save space</a>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#906" class="lnkocn">906</a></label>
|
||
<p class="code" id="906">
|
||
$ echo "user-setup sudo" > config/package-lists/recommends.list.chroot<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#907" class="lnkocn">907</a></label>
|
||
<p class="i0" id="907">
|
||
Now, build the image in the usual way:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#908" class="lnkocn">908</a></label>
|
||
<p class="code" id="908">
|
||
# lb build 2>&1 | tee build.log<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#909" class="lnkocn">909</a></label>
|
||
<p class="i0" id="909">
|
||
On the author's system at the time of writing this, the above configuration produced a 110MB image. This compares favourably with the 192MB image produced by the default configuration in <a href="#tutorial-1">Tutorial 1</a>.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#910" class="lnkocn">910</a></label>
|
||
<p class="i0" id="910">
|
||
Leaving off APT's indices with <tt>--apt-indices false</tt> saves a fair amount of space, the tradeoff being that you need to do an <tt>apt-get update</tt> before using <i>apt</i> in the live system. Dropping recommended packages with <tt>--apt-recommends false</tt> saves some additional space, at the expense of omitting some packages you might otherwise expect to be there. <tt>--debootstrap-options "--variant=minbase"</tt> bootstraps a minimal system from the start. Not automatically including firmware packages with <tt>--firmware-chroot false</tt> saves some space too. And finally, <tt>--memtest none</tt> prevents the installation of a memory tester.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#911" class="lnkocn">911</a></label>
|
||
<p class="i0" id="911">
|
||
<b>Note:</b> A minimal system can also be achieved using hooks, like for example the <tt>stripped.hook.chroot</tt> hook found in <tt>/usr/share/doc/live-build/examples/hooks</tt>. It may shave off additional small amounts of space and produce an image of 91MB. However, it does so by removal of documentation and other files from packages installed on the system. This violates the integrity of those packages and that, as the comment header warns, may have unforeseen consequences. That is why using a minimal <i>debootstrap</i> is the recommended way of achieving this goal.
|
||
</p>
|
||
</div>
|
||
|
||
<br><hr width=90% /><br>
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#912" class="lnkocn">912</a></label>
|
||
<h5 class="norm" id="912"><a name="912"></a>
|
||
<a name="c18.7" ></a><a name="h18.7" ></a>18.7 A localized GNOME desktop and installer
|
||
</h5>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#913" class="lnkocn">913</a></label>
|
||
<p class="i0" id="913">
|
||
<b>Use case:</b> Create a GNOME desktop image, localized for Switzerland and including an installer.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#914" class="lnkocn">914</a></label>
|
||
<p class="i0" id="914">
|
||
We want to make an iso-hybrid image for i386 architecture using our preferred desktop, in this case GNOME, containing all of the same packages that would be installed by the standard Debian installer for GNOME.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#915" class="lnkocn">915</a></label>
|
||
<p class="i0" id="915">
|
||
Our initial problem is the discovery of the names of the appropriate language tasks. Currently, <i>live-build</i> cannot help with this. While we might get lucky and find this by trial-and-error, there is a tool, <tt>grep-dctrl</tt>, which can be used to dig it out of the task descriptions in tasksel-data, so to prepare, make sure you have both of those things:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#916" class="lnkocn">916</a></label>
|
||
<p class="code" id="916">
|
||
# apt-get install dctrl-tools tasksel-data<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#917" class="lnkocn">917</a></label>
|
||
<p class="i0" id="917">
|
||
Now we can search for the appropriate tasks, first with:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#918" class="lnkocn">918</a></label>
|
||
<p class="code" id="918">
|
||
$ grep-dctrl -FTest-lang de /usr/share/tasksel/descs/debian-tasks.desc -sTask<br>
|
||
Task: german<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#919" class="lnkocn">919</a></label>
|
||
<p class="i0" id="919">
|
||
By this command, we discover the task is called, plainly enough, german. Now to find the related tasks:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#920" class="lnkocn">920</a></label>
|
||
<p class="code" id="920">
|
||
$ grep-dctrl -FEnhances german /usr/share/tasksel/descs/debian-tasks.desc -sTask<br>
|
||
Task: german-desktop<br>
|
||
Task: german-kde-desktop<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#921" class="lnkocn">921</a></label>
|
||
<p class="i0" id="921">
|
||
At boot time we will generate the <b>de_CH.UTF-8</b> locale and select the <b>ch</b> keyboard layout. Now let's put the pieces together. Recalling from <a href="#using-metapackages">Using metapackages</a> that task metapackages are prefixed <tt>task-</tt>, we just specify these language boot parameters, then add standard priority packages and all our discovered task metapackages to our package list as follows:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#922" class="lnkocn">922</a></label>
|
||
<p class="code" id="922">
|
||
$ mkdir live-gnome-ch<br>
|
||
$ cd live-gnome-ch<br>
|
||
$ lb config \<br>
|
||
-a i386 \<br>
|
||
--bootappend-live "boot=live components locales=de_CH.UTF-8 keyboard-layouts=ch" \<br>
|
||
--debian-installer live<br>
|
||
$ echo '! Packages Priority standard' > config/package-lists/standard.list.chroot<br>
|
||
$ echo task-gnome-desktop task-german task-german-desktop >> config/package-lists/desktop.list.chroot<br>
|
||
$ echo debian-installer-launcher >> config/package-lists/installer.list.chroot<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#923" class="lnkocn">923</a></label>
|
||
<p class="i0" id="923">
|
||
Note that we have included the <i>debian-installer-launcher</i> package to launch the installer from the live desktop. The <tt>586</tt> kernel flavour, which is currently necessary for the launcher to work properly, will be included by default.
|
||
</p>
|
||
</div>
|
||
|
||
<br><hr width=90% /><br>
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#924" class="lnkocn">924</a></label>
|
||
<h1 class="norm" id="924"><a name="924"></a>
|
||
Appendix
|
||
</h1>
|
||
</div>
|
||
|
||
<br><hr width=90% /><br>
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#925" class="lnkocn">925</a></label>
|
||
<h1 class="norm" id="925"><a name="925"></a>
|
||
Style guide
|
||
</h1>
|
||
</div>
|
||
|
||
<br><hr width=90% /><br>
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#926" class="lnkocn">926</a></label>
|
||
<h4 class="norm" id="926"><a name="926"></a>
|
||
<a name="h19" ></a><a name="style_guide" ></a><a name="style-guide" ></a>19. Style guide
|
||
</h4>
|
||
</div>
|
||
|
||
<br><hr width=90% /><br>
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#927" class="lnkocn">927</a></label>
|
||
<h5 class="norm" id="927"><a name="927"></a>
|
||
<a name="c19.1" ></a><a name="h19.1" ></a>19.1 Guidelines for authors
|
||
</h5>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#928" class="lnkocn">928</a></label>
|
||
<p class="i0" id="928">
|
||
This section deals with some general considerations to be taken into account when writing technical documentation for <i>live-manual</i>. They are divided into linguistic features and recommended procedures.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#929" class="lnkocn">929</a></label>
|
||
<p class="i0" id="929">
|
||
<b>Note:</b> Authors should first read <a href="#how-to-contribute">Contributing to this document</a>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#930" class="lnkocn">930</a></label>
|
||
<h6 class="norm" id="930"><a name="930"></a>
|
||
<a name="c19.1.1" ></a><a name="h19.1.1" ></a>19.1.1 Linguistic features
|
||
</h6>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#931" class="lnkocn">931</a></label>
|
||
<ul>
|
||
<li class="bullet" id="931">
|
||
<i>Use plain English</i>
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#932" class="lnkocn">932</a></label>
|
||
<p class="i0" id="932">
|
||
Keep in mind that a high percentage of your readers are not native speakers of English. So as a general rule try to use short, meaningful sentences, followed by a full stop.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#933" class="lnkocn">933</a></label>
|
||
<p class="i0" id="933">
|
||
This does not mean that you have to use a simplistic, naive style. It is a suggestion to try to avoid, as much as possible, complex subordinate sentences that make the text difficult to understand for non-native speakers of English.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#934" class="lnkocn">934</a></label>
|
||
<ul>
|
||
<li class="bullet" id="934">
|
||
<i>Variety of English</i>
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#935" class="lnkocn">935</a></label>
|
||
<p class="i0" id="935">
|
||
The most widely spread varieties of English are British and American so it is very likely that most authors will use either one or the other. In a collaborative environment, the ideal variety would be "International English" but it is very difficult, not to say impossible, to decide on which variety among all the existing ones, is the best to use.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#936" class="lnkocn">936</a></label>
|
||
<p class="i0" id="936">
|
||
We expect that different varieties may mix without creating misunderstandings but in general terms you should try to be coherent and before deciding on using British, American or any other English flavour at your discretion, please take a look at how other people write and try to imitate them.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#937" class="lnkocn">937</a></label>
|
||
<ul>
|
||
<li class="bullet" id="937">
|
||
<i>Be balanced</i>
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#938" class="lnkocn">938</a></label>
|
||
<p class="i0" id="938">
|
||
Do not be biased. Avoid including references to ideologies completely unrelated to <i>live-manual</i>. Technical writing should be as neutral as possible. It is in the very nature of scientific writing.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#939" class="lnkocn">939</a></label>
|
||
<ul>
|
||
<li class="bullet" id="939">
|
||
<i>Be politically correct</i>
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#940" class="lnkocn">940</a></label>
|
||
<p class="i0" id="940">
|
||
Try to avoid sexist language as much as possible. If you need to make references to the third person singular preferably use "they" rather than "he" or "she" or awkward inventions such as "s/he", "s(he)" and the like.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#941" class="lnkocn">941</a></label>
|
||
<ul>
|
||
<li class="bullet" id="941">
|
||
<i>Be concise</i>
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#942" class="lnkocn">942</a></label>
|
||
<p class="i0" id="942">
|
||
Go straight to the point and do not wander around aimlessly. Give as much information as necessary but do not give more information than necessary, this is to say, do not explain unnecessary details. Your readers are intelligent. Presume some previous knowledge on their part.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#943" class="lnkocn">943</a></label>
|
||
<ul>
|
||
<li class="bullet" id="943">
|
||
<i>Minimize translation work</i>
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#944" class="lnkocn">944</a></label>
|
||
<p class="i0" id="944">
|
||
Keep in mind that whatever you write will have to be translated into several other languages. This implies that a number of people will have to do an extra work if you add useless or redundant information.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#945" class="lnkocn">945</a></label>
|
||
<ul>
|
||
<li class="bullet" id="945">
|
||
<i>Be coherent</i>
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#946" class="lnkocn">946</a></label>
|
||
<p class="i0" id="946">
|
||
As suggested before, it is almost impossible to standardize a collaborative document into a perfectly unified whole. However, every effort on your side to write in a coherent way with the rest of the authors will be appreciated.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#947" class="lnkocn">947</a></label>
|
||
<ul>
|
||
<li class="bullet" id="947">
|
||
<i>Be cohesive</i>
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#948" class="lnkocn">948</a></label>
|
||
<p class="i0" id="948">
|
||
Use as many text-forming devices as necessary to make your text cohesive and unambiguous. (Text-forming devices are linguistic markers such as connectors).
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#949" class="lnkocn">949</a></label>
|
||
<ul>
|
||
<li class="bullet" id="949">
|
||
<i>Be descriptive</i>
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#950" class="lnkocn">950</a></label>
|
||
<p class="i0" id="950">
|
||
It is preferable to describe the point in one or several paragraphs than merely using a number of sentences in a typical "changelog" style. Describe it! Your readers will appreciate it.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#951" class="lnkocn">951</a></label>
|
||
<ul>
|
||
<li class="bullet" id="951">
|
||
<i>Dictionary</i>
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#952" class="lnkocn">952</a></label>
|
||
<p class="i0" id="952">
|
||
Look up the meaning of words in a dictionary or encyclopedia if you do not know how to express certain concepts in English. But keep in mind that a dictionary can either be your best friend or can turn into your worst enemy if you do not know how to use it correctly.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#953" class="lnkocn">953</a></label>
|
||
<p class="i0" id="953">
|
||
English has the largest vocabulary that exists (with over one million words). Many of these words are borrowings from other languages. When looking up the meaning of words in a bilingual dictionary the tendency of a non-native speaker of English is to choose the one that sounds more similar in their mother tongue. This often turns into an excessively formal discourse which does not sound quite natural in English.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#954" class="lnkocn">954</a></label>
|
||
<p class="i0" id="954">
|
||
As a general rule, if a concept can be expressed using different synonyms, it is a good advice to choose the first word proposed by the dictionary. If in doubt, choosing words of Germanic origin (Usually monosyllabic words) is often the right thing to do. Be warned that these two techniques might produce a rather informal discourse but at least your choice of words will be of wide use and generally accepted.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#955" class="lnkocn">955</a></label>
|
||
<p class="i0" id="955">
|
||
Using a dictionary of collocations is recommended. They are extremely helpful when it comes to know which words usually occur together.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#956" class="lnkocn">956</a></label>
|
||
<p class="i0" id="956">
|
||
Again it is a good practice to learn from the work of others. Using a search engine to check how other authors use certain expressions may help a lot.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#957" class="lnkocn">957</a></label>
|
||
<ul>
|
||
<li class="bullet" id="957">
|
||
<i>False friends, idioms and other idiomatic expressions</i>
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#958" class="lnkocn">958</a></label>
|
||
<p class="i0" id="958">
|
||
Watch out for false friends. No matter how proficient you are in a foreign language you cannot help falling from time to time in the trap of the so called "false friends", words that look similar in two languages but whose meanings or uses might be completely different.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#959" class="lnkocn">959</a></label>
|
||
<p class="i0" id="959">
|
||
Try to avoid idioms as much as possible. "Idioms" are expressions that may convey a completely different meaning from what their individual words seem to mean. Sometimes, idioms might be difficult to understand even for native speakers of English!
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#960" class="lnkocn">960</a></label>
|
||
<ul>
|
||
<li class="bullet" id="960">
|
||
<i>Avoid slang, abbreviations, contractions...</i>
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#961" class="lnkocn">961</a></label>
|
||
<p class="i0" id="961">
|
||
Even though you are encouraged to use plain, everyday English, technical writing belongs to the formal register of the language.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#962" class="lnkocn">962</a></label>
|
||
<p class="i0" id="962">
|
||
Try to avoid slang, unusual abbreviations that are difficult to understand and above all contractions that try to imitate the spoken language. Not to mention typical irc and family friendly expressions.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#963" class="lnkocn">963</a></label>
|
||
<h6 class="norm" id="963"><a name="963"></a>
|
||
<a name="c19.1.2" ></a><a name="h19.1.2" ></a>19.1.2 Procedures
|
||
</h6>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#964" class="lnkocn">964</a></label>
|
||
<ul>
|
||
<li class="bullet" id="964">
|
||
<i>Test before write</i>
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#965" class="lnkocn">965</a></label>
|
||
<p class="i0" id="965">
|
||
It is important that authors test their examples before adding them to <i>live-manual</i> to ensure that everything works as described. Testing on a clean chroot or VM can be a good starting point. Besides, it would be ideal if the tests were then carried out on different machines with different hardware to spot possible problems that may arise.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#966" class="lnkocn">966</a></label>
|
||
<ul>
|
||
<li class="bullet" id="966">
|
||
<i>Examples</i>
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#967" class="lnkocn">967</a></label>
|
||
<p class="i0" id="967">
|
||
When providing an example try to be as specific as you can. An example is, after all, just an example.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#968" class="lnkocn">968</a></label>
|
||
<p class="i0" id="968">
|
||
It is often better to use a line that only applies to a specific case than using abstractions that may confuse your readers. In this case you can provide a brief explanation of the effects of the proposed example.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#969" class="lnkocn">969</a></label>
|
||
<p class="i0" id="969">
|
||
There may be some exceptions when the example suggests using some potentially dangerous commands that, if misused, may cause data loss or other similar undesirable effects. In this case you should provide a thorough explanation of the possible side effects.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#970" class="lnkocn">970</a></label>
|
||
<ul>
|
||
<li class="bullet" id="970">
|
||
<i>External links</i>
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#971" class="lnkocn">971</a></label>
|
||
<p class="i0" id="971">
|
||
Links to external sites should only be used when the information on those sites is crucial when it comes to understanding a special point. Even so, try to use links to external sites as sparsely as possible. Internet links are likely to change from time to time resulting in broken links and leaving your arguments in an incomplete state.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#972" class="lnkocn">972</a></label>
|
||
<p class="i0" id="972">
|
||
Besides, people who read the manual offline will not have the chance to follow those links.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#973" class="lnkocn">973</a></label>
|
||
<ul>
|
||
<li class="bullet" id="973">
|
||
<i>Avoid branding and things that violate the license under which the manual is published</i>
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#974" class="lnkocn">974</a></label>
|
||
<p class="i0" id="974">
|
||
Try to avoid branding as much as possible. Keep in mind that other downstream projects might make use of the documentation you write. So you are complicating things for them if you add certain specific material.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#975" class="lnkocn">975</a></label>
|
||
<p class="i0" id="975">
|
||
<i>live-manual</i> is licensed under the GNU GPL. This has a number of implications that apply to the distribution of the material (of any kind, including copyrighted graphics or logos) that is published with it.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#976" class="lnkocn">976</a></label>
|
||
<ul>
|
||
<li class="bullet" id="976">
|
||
<i>Write a first draft, revise, edit, improve, redo if necessary</i>
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#977" class="lnkocn">977</a></label>
|
||
<p class="i0" id="977">
|
||
- Brainstorm!. You need to organize your ideas first in a logical sequence of events.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#978" class="lnkocn">978</a></label>
|
||
<p class="i0" id="978">
|
||
- Once you have somehow organized those ideas in your mind write a first draft.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#979" class="lnkocn">979</a></label>
|
||
<p class="i0" id="979">
|
||
- Revise grammar, syntax and spelling. Keep in mind that the proper names of the releases, such as <b>buster</b> or <b>sid</b>, should not be capitalized when referred to as code names. In order to check the spelling you can run the "spell" target. i.e. <tt>make spell</tt>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#980" class="lnkocn">980</a></label>
|
||
<p class="i0" id="980">
|
||
- Improve your statements and redo any part if necessary.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#981" class="lnkocn">981</a></label>
|
||
<ul>
|
||
<li class="bullet" id="981">
|
||
<i>Chapters</i>
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#982" class="lnkocn">982</a></label>
|
||
<p class="i0" id="982">
|
||
Use the conventional numbering system for chapters and subtitles. e.g. 1, 1.1, 1.1.1, 1.1.2 ... 1.2, 1.2.1, 1.2.2 ... 2, 2.1 ... and so on. See markup below.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#983" class="lnkocn">983</a></label>
|
||
<p class="i0" id="983">
|
||
If you have to enumerate a series of steps or stages in your description, you can also use ordinal numbers: First, second, third ... or First, Then, After that, Finally ... Alternatively you can use bulleted items.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#984" class="lnkocn">984</a></label>
|
||
<ul>
|
||
<li class="bullet" id="984">
|
||
<i>Markup</i>
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#985" class="lnkocn">985</a></label>
|
||
<p class="i0" id="985">
|
||
And last but not least, <i>live-manual</i> uses <a href="http://www.sisudoc.org/">SiSU</a> to process the text files and produce a multiple format output. It is recommended to take a look at <a href="http://www.sisudoc.org/sisu/en/html/sisu_manual/markup.html">SiSU's manual</a> to get familiar with its markup, or else type:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#986" class="lnkocn">986</a></label>
|
||
<p class="code" id="986">
|
||
$ sisu --help markup<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#987" class="lnkocn">987</a></label>
|
||
<p class="i0" id="987">
|
||
Here are some markup examples that may prove useful:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#988" class="lnkocn">988</a></label>
|
||
<p class="i0" id="988">
|
||
- For emphasis/bold text:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#989" class="lnkocn">989</a></label>
|
||
<p class="code" id="989">
|
||
*{foo}* or !{foo}!<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#990" class="lnkocn">990</a></label>
|
||
<p class="i0" id="990">
|
||
produces: <b>foo</b> or <b>foo</b>. Use it to emphasize certain key words.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#991" class="lnkocn">991</a></label>
|
||
<p class="i0" id="991">
|
||
- For italics:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#992" class="lnkocn">992</a></label>
|
||
<p class="code" id="992">
|
||
/{foo}/<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#993" class="lnkocn">993</a></label>
|
||
<p class="i0" id="993">
|
||
produces: <i>foo</i>. Use them e.g. for the names of Debian packages.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#994" class="lnkocn">994</a></label>
|
||
<p class="i0" id="994">
|
||
- For monospace:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#995" class="lnkocn">995</a></label>
|
||
<p class="code" id="995">
|
||
#{foo}#<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#996" class="lnkocn">996</a></label>
|
||
<p class="i0" id="996">
|
||
produces: <tt>foo</tt>. Use it e.g. for the names of commands. And also to highlight some key words or things like paths.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#997" class="lnkocn">997</a></label>
|
||
<p class="i0" id="997">
|
||
- For code blocks:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#998" class="lnkocn">998</a></label>
|
||
<p class="code" id="998">
|
||
code{<br><br>
|
||
$ foo<br>
|
||
# bar<br><br>
|
||
}code<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#999" class="lnkocn">999</a></label>
|
||
<p class="i0" id="999">
|
||
produces:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#1000" class="lnkocn">1000</a></label>
|
||
<p class="code" id="1000">
|
||
$ foo<br>
|
||
# bar<br>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#1001" class="lnkocn">1001</a></label>
|
||
<p class="i0" id="1001">
|
||
Use <tt>code{</tt> to open and <tt>}code</tt> to close the tags. It is important to remember to leave a space at the beginning of each line of code.
|
||
</p>
|
||
</div>
|
||
|
||
<br><hr width=90% /><br>
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#1002" class="lnkocn">1002</a></label>
|
||
<h5 class="norm" id="1002"><a name="1002"></a>
|
||
<a name="h19.2" ></a><a name="guidelines-translators" ></a>19.2 Guidelines for translators
|
||
</h5>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#1003" class="lnkocn">1003</a></label>
|
||
<p class="i0" id="1003">
|
||
This section deals with some general considerations to be taken into account when translating the contents of <i>live-manual</i>.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#1004" class="lnkocn">1004</a></label>
|
||
<p class="i0" id="1004">
|
||
As a general recommendation, translators should have read and understood the translation rules that apply to their specific languages. Usually, translation groups and mailing lists provide information on how to produce translated work that complies with Debian quality standards.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#1005" class="lnkocn">1005</a></label>
|
||
<p class="i0" id="1005">
|
||
<b>Note:</b> Translators should also read <a href="#how-to-contribute">Contributing to this document</a>. In particular the section <a href="#translation">Translation</a>
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#1006" class="lnkocn">1006</a></label>
|
||
<h6 class="norm" id="1006"><a name="1006"></a>
|
||
<a name="c19.2.1" ></a><a name="h19.2.1" ></a>19.2.1 Translation hints
|
||
</h6>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#1007" class="lnkocn">1007</a></label>
|
||
<ul>
|
||
<li class="bullet" id="1007">
|
||
<i>Comments</i>
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#1008" class="lnkocn">1008</a></label>
|
||
<p class="i0" id="1008">
|
||
The role of the translator is to convey as faithfully as possible the meaning of words, sentences, paragraphs and texts as written by the original authors into their target language.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#1009" class="lnkocn">1009</a></label>
|
||
<p class="i0" id="1009">
|
||
So they should refrain from adding personal comments or extra bits of information of their own. If they want to add a comment for other translators working on the same documents, they can leave it in the space reserved for that. That is, the header of the strings in the <b>po</b> files preceded by a number sign <b>#</b>. Most graphical translation programs can automatically handle those types of comments.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#1010" class="lnkocn">1010</a></label>
|
||
<ul>
|
||
<li class="bullet" id="1010">
|
||
<i>TN, Translator's Note</i>
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#1011" class="lnkocn">1011</a></label>
|
||
<p class="i0" id="1011">
|
||
It is perfectly acceptable however, to include a word or an expression in brackets in the translated text if, and only if, that makes the meaning of a difficult word or expression clearer to the reader. Inside the brackets the translator should make evident that the addition was theirs using the abbreviation "TN" or "Translator's Note".
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#1012" class="lnkocn">1012</a></label>
|
||
<ul>
|
||
<li class="bullet" id="1012">
|
||
<i>Impersonal sentences</i>
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#1013" class="lnkocn">1013</a></label>
|
||
<p class="i0" id="1013">
|
||
Documents written in English make an extensive use of the impersonal form "you". In some other languages that do not share this characteristic, this might give the false impression that the original texts are directly addressing the reader when they are actually not doing so. Translators must be aware of that fact and reflect it in their language as accurately as possible.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#1014" class="lnkocn">1014</a></label>
|
||
<ul>
|
||
<li class="bullet" id="1014">
|
||
<i>False friends</i>
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#1015" class="lnkocn">1015</a></label>
|
||
<p class="i0" id="1015">
|
||
The trap of "false friends" explained before especially applies to translators. Double check the meaning of suspicious false friends if in doubt.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#1016" class="lnkocn">1016</a></label>
|
||
<ul>
|
||
<li class="bullet" id="1016">
|
||
<i>Markup</i>
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#1017" class="lnkocn">1017</a></label>
|
||
<p class="i0" id="1017">
|
||
Translators working initially with <b>pot</b> files and later on with <b>po</b> files will find many markup features in the strings. They can translate the text anyway, as long as it is translatable, but it is extremely important that they use exactly the same markup as the original English version.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#1018" class="lnkocn">1018</a></label>
|
||
<ul>
|
||
<li class="bullet" id="1018">
|
||
<i>Code blocks</i>
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#1019" class="lnkocn">1019</a></label>
|
||
<p class="i0" id="1019">
|
||
Even though the code blocks are usually untranslatable, including them in the translation is the only way to score a 100% complete translation. And even though it means more work at first because it might require the intervention of the translators if the code changes, it is the best way, in the long run, to identify what has already been translated and what has not when checking the integrity of the .po files.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#1020" class="lnkocn">1020</a></label>
|
||
<ul>
|
||
<li class="bullet" id="1020">
|
||
<i>Newlines</i>
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#1021" class="lnkocn">1021</a></label>
|
||
<p class="i0" id="1021">
|
||
The translated texts need to have the exact same newlines as the original texts. Be careful to press the "Enter" key or type <b>\n</b> if they appear in the original files. These newlines often appear, for instance, in the code blocks.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#1022" class="lnkocn">1022</a></label>
|
||
<p class="i0" id="1022">
|
||
Make no mistake, this does not mean that the translated text needs to have the same length as the English version. That is nearly impossible.
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#1023" class="lnkocn">1023</a></label>
|
||
<ul>
|
||
<li class="bullet" id="1023">
|
||
<i>Untranslatable strings</i>
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#1024" class="lnkocn">1024</a></label>
|
||
<p class="i0" id="1024">
|
||
Translators should never translate:
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#1025" class="lnkocn">1025</a></label>
|
||
<p class="i0" id="1025">
|
||
- The code names of releases (which should be written in lowercase)
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#1026" class="lnkocn">1026</a></label>
|
||
<p class="i0" id="1026">
|
||
- The names of programs
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#1027" class="lnkocn">1027</a></label>
|
||
<p class="i0" id="1027">
|
||
- The commands given as examples
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#1028" class="lnkocn">1028</a></label>
|
||
<p class="i0" id="1028">
|
||
- Metadata (often between colons <b>:metadata:</b>)
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#1029" class="lnkocn">1029</a></label>
|
||
<p class="i0" id="1029">
|
||
- Links
|
||
</p>
|
||
</div>
|
||
|
||
<div class="substance">
|
||
<label class="ocn"><a href="#1030" class="lnkocn">1030</a></label>
|
||
<p class="i0" id="1030">
|
||
- Paths
|
||
</p>
|
||
</div>
|
||
|
||
</div>
|
||
|
||
<div class="main_column">
|
||
<table summary="table of contents scroll navigation band" id="toc" width="100%" bgcolor="#ffffff">
|
||
<tr><td width="20%">
|
||
<table summary="home button / home information" border="0" cellpadding="3" cellspacing="0">
|
||
<tr><td align="left" bgcolor="#ffffff">
|
||
<p class="tiny_left"><a href="http://debian-live.alioth.debian.org/manual" target="_top">
|
||
Live manual
|
||
</a></p>
|
||
<p class="tiny_left"><a href="http://debian-live.alioth.debian.org" target="_top">
|
||
Live Systems
|
||
</a></p>
|
||
</td></tr>
|
||
</table>
|
||
</td>
|
||
<td width="75%" align="center">
|
||
|
||
<table summary="segment navigation available documents types: toc,doc,pdf,concordance" border="0" cellpadding="3" cellspacing="0">
|
||
<tr>
|
||
<td align="center" bgcolor="#ffffff">
|
||
|
||
|
||
</tr></table>
|
||
</td>
|
||
<td width="20%">
|
||
|
||
</td></tr>
|
||
</table>
|
||
<p>
|
||
|
||
<a name="bottom" id="bottom"></a>
|
||
<a name="end" id="end"></a>
|
||
</div>
|
||
|
||
</body>
|
||
</html>
|
||
|