Live システムマニュアル

About

1. このマニュアルについて

1.1 せっかちな人向け
1.2 用語
1.3 著者
1.4 この文書への貢献
1.4.1 変更の適用
1.4.2 翻訳

2. Live Systems Projectについて

2.1 動機
2.1.1 現在の Live システムの問題点
2.1.2 自身の Live システムを作成する理由
2.2 哲学
2.2.1 Debian「main」の変更しないパッケージしか使いません
2.2.2 Live システム固有のパッケージ設定はありません
2.3 連絡先

ユーザ

3. Installation

3.1 Requirements
3.2 Installing live-build
3.2.1 From the Debian repository
3.2.2 From source
3.2.3 From 'snapshots'
3.3 Installing live-boot and live-config
3.3.1 From the Debian repository
3.3.2 From source
3.3.3 From 'snapshots'

4. 基本

4.1 live システムとは何?
4.2 ビルド済みイメージのダウンロード
4.3 ウェブ live イメージビルダーの利用
4.3.1 ウェブビルダーの使い方と注意
4.4 最初の段階: ISO hybrid イメージのビルド
4.5 ISO hybrid live イメージの利用
4.5.1 ISO イメージの実際のメディアへの書き込み
4.5.2 ISO hybrid イメージの USB メモリへのコピー
4.5.3 USB メモリの空きスペースの利用
4.5.4 live メディアのブート
4.6 仮想マシンを利用したテスト
4.6.1 QEMU での ISO イメージのテスト
4.6.2 VirtualBox での ISO イメージのテスト
4.7 HDD イメージのビルド及び利用
4.8 netboot イメージのビルド
4.8.1 DHCP サーバ
4.8.2 TFTP サーバ
4.8.3 NFS サーバ
4.8.4 ネットワーク経由のブートをテストする方法
4.8.5 Qemu

5. Overview of tools

5.1 The live-build package
5.1.1 The lb init command
5.1.2 The lb config command
5.1.3 The lb build command
5.1.4 The lb clean command
5.2 The live-boot package
5.3 The live-config package

6. Managing a configuration

6.1 Dealing with configuration changes
6.1.1 Why use auto scripts? What do they do?
6.1.2 Use example auto scripts
6.2 Clone a configuration published via Git

7. 独自化の概要

7.1 ビルド時とブート時の設定
7.2 ビルド段階
7.3 ファイルによる lb config の補完
7.4 独自化タスク

8. Customizing package installation

8.1 Package sources
8.1.1 Distribution, archive areas and mode
8.1.2 Distribution mirrors
8.1.3 Distribution mirrors used at build time
8.1.4 Distribution mirrors used at run time
8.1.5 Additional repositories
8.2 Choosing packages to install
8.2.1 Package lists
8.2.2 Using metapackages
8.2.3 Local package lists
8.2.4 Local binary package lists
8.2.5 Generated package lists
8.2.6 Using conditionals inside package lists
8.2.7 Removing packages at install time
8.2.8 Desktop and language tasks
8.2.9 Kernel flavour and version
8.2.10 Custom kernels
8.3 Installing modified or third-party packages
8.3.1 Using packages.chroot to install custom packages
8.3.2 Using an APT repository to install custom packages
8.3.3 Custom packages and APT
8.4 Configuring APT at build time
8.4.1 Choosing apt or aptitude
8.4.2 Using a proxy with APT
8.4.3 Tweaking APT to save space
8.4.4 Passing options to apt or aptitude
8.4.5 APT pinning

9. 収録内容の独自化

9.1 Includes
9.1.1 Live/chroot ローカルインクルード
9.1.2 バイナリローカルインクルード
9.2 フック
9.2.1 Live/chroot ローカルフック
9.2.2 ブート時フック
9.2.3 バイナリローカルフック
9.3 Debconf 質問の preseed

10. Customizing run time behaviours

10.1 Customizing the live user
10.2 Customizing locale and language
10.3 Persistence
10.3.1 The persistence.conf file
10.3.2 Using more than one persistence store

11. バイナリイメージの独自化

11.1 ブートローダ
11.2 ISO メタ情報

12. Debian インストーラの独自化

12.1 Debian インストーラの種類
12.2 preseed による Debian インストーラの独自化
12.3 Debian インストーラの収録内容の独自化

プロジェクト

13. プロジェクトへの貢献

13.1 変更を加える

14. バグの報告

14.1 既知の問題
14.2 最初から再ビルド
14.3 最新のパッケージを使う
14.4 情報収集
14.5 可能であれば失敗している状況を分離する
14.6 正しいパッケージに対してバグを報告する
14.6.1 ビルド時のパッケージ収集中
14.6.2 ビルド時のパッケージインストール中
14.6.3 ブート時
14.6.4 実行時
14.7 調査してください
14.8 バグの報告先

15. コーディングスタイル

15.1 互換性
15.2 インデント
15.3 改行
15.4 変数
15.5 その他

16. 手順

16.1 主要リリース
16.2 ポイントリリース
16.2.1 ある Debian リリースの最後のポイントリリース
16.2.2 ポイントリリース告知用テンプレート

17. Git リポジトリ

17.1 リポジトリを複数処理

18. 例

18.1 例の使用
18.2 チュートリアル 1: デフォルトイメージ
18.3 チュートリアル 2: ウェブブラウザユーティリティ
18.4 チュートリアル 3: 私的イメージ
18.4.1 最初の改訂
18.4.2 2回目の改訂
18.5 VNC 公衆クライアント
18.6 128MB USB メモリ向けの基本イメージ
18.7 地域化した GNOME デスクトップとインストーラ

付録

19. スタイルガイド

19.1 著者向けガイドライン
19.1.1 言語特性
19.1.2 手順
19.2 翻訳者向けガイドライン
19.2.1 翻訳の手がかり

Metadata

Live システムマニュアル

ユーザ

5. Overview of tools

This chapter contains an overview of the three main tools used in building live systems: live-build, live-boot and live-config.

5.1 The live-build package

live-build is a collection of scripts to build live systems. These scripts are also referred to as "commands".

The idea behind live-build is to be a framework that uses a configuration directory to completely automate and customize all aspects of building a Live image.

Many concepts are similar to those used to build Debian packages with debhelper:

Unlike debhelper, live-build provides the tools to generate a skeleton configuration directory. This could be considered to be similar to tools such as dh-make. For more information about these tools, read on, since the remainder of this section discuses the four most important commands. Note that the preceding lb is a generic wrapper for live-build commands.

5.1.1 The lb init command

As discussed in live-build, the scripts that make up live-build read their configuration with the source command from a single directory named config/. As constructing this directory by hand would be time-consuming and error-prone, the lb init command can be used to create the initial skeleton configuration tree.

The lb init command creates the following directories inside config/: hooks/, includes/, several other includes subdirectories for each stage of the build process and package-lists/. The latter includes a list of several important live packages like live-boot, live-config and live-config-sysvinit.

5.1.2 The lb config command

Issuing lb config without any arguments completes the config/ subdirectory which it populates with some default settings in configuration files, and two skeleton trees named auto/ and local/.

$ lb config
[2014-04-25 17:14:34] lb config

P: Updating config tree for a debian/wheezy/i386 system

Using lb config without any arguments would be suitable for users who need a very basic image, or who intend to provide a more complete configuration via auto/config later (see Managing a configuration for details).

Normally, you will want to specify some options. For example, to specify which distribution you want to build using its codename:

$ lb config --distribution sid

It is possible to specify many options, such as:

$ lb config --binary-images netboot --bootappend-live "boot=live components hostname=live-host username=live-user" ...

A full list of options is available in the lb_config man page.

5.1.3 The lb build command

The lb build command reads in your configuration from the config/ directory. It then runs the lower level commands needed to build your Live system.

5.1.4 The lb clean command

It is the job of the lb clean command to remove various parts of a build so subsequent builds can start from a clean state. By default, chroot, binary and source 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 lb clean --binary prior to building a new binary. If your changes invalidate the bootstrap and/or package caches, e.g. changes to --mode, --architecture, or --bootstrap, you must use lb clean --purge. See the lb_clean man page for a full list of options.

5.2 The live-boot package

live-boot is a collection of scripts providing hooks for the initramfs-tools, used to generate an initramfs capable of booting live systems, such as those created by live-build. This includes the live system ISOs, netboot tarballs, and USB stick images.

At boot time it will look for read-only media containing a /live/ 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.

More information on initial ramfs in Debian can be found in the Debian Linux Kernel Handbook at ‹http://kernel-handbook.alioth.debian.org/› in the chapter on initramfs.

5.3 The live-config package

live-config consists of the scripts that run at boot time after live-boot 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.