This is Gentoo's testing wiki. It is a non-operational environment and its textual content is outdated.
Please visit our production wiki at https://wiki.gentoo.org
ハンドブック:X86/インストール/メディア
ハードウェア要件
始める前に、x86の機械に首尾よくGentooをインストールするために必要なハードウェアの条件を示します。
Minimal CD | LiveDVD | |
---|---|---|
CPU | i486 or later | i686 or later |
Memory | 256 MB | 512 MB |
Disk space | 2.5 GB (excluding swap space) | |
Swap space | At least 256 MB |
The X86 project is a good place to be for more information about Gentoo's x86 support.
Gentoo Linux インストールメディア
MinimalインストールCD
2018年8月23日現在、公式 Minimal CD は UEFI モードで起動できます。古いバージョンは BIOS (MBR) モードでのみ起動します。UEFI ブート可能なシステムを構築しようとしている読者は最新の ISO をダウンロードする必要があります。
Gentoo MinimalインストールCDは、独立したGentoo環境を含むブート可能イメージです。このCDを使うとLinuxをCDやその他のインストールメディアから起動することができます。起動時、接続されたハードウェアが検出されて適切なドライバが読み込まれます。 このイメージは、Gentooの開発者によってメンテナンスされるもので、インターネット接続さえできれば誰でもGentooをインストールできるようにします。
MinimalインストールCDは、install-x86-minimal-<release>.isoと呼ばれます。
必要なときに使うGentoo LiveDVD
必要な場合に使う、Gentooをインストール用の特別なDVDがGentoo Tenプロジェクトによって作成されています。この章以降で説明する方法は、MinimalインストールCDをターゲットにしているので、少々の差異があるかもしれません。しかしLiveDVD (または他の起動可能なLinux環境) は、ターミナル上で単純にsudo su -またはsudo -iを実行するだけで、rootプロンプトの取得を行えます。
Stage とは?
stage3 tarballは最小限のGentoo環境を含んだアーカイブで、このマニュアルに従ってインストールを進めるのに適しています。以前は、Gentooハンドブックでは3つのstage tarballから1つを選ぶインストール方法を説明していました。現在でもstage1とstage2 tarballを提供していますが、公式なインストール手順ではstage3 tarballを使用します。もしstage1またはstage2 tarballからインストールしたいのであれば、Gentoo FAQ内のGentooをstage1やstage2のアーカイブからインストールするには?を読んでください。
stage3 tarballは、公式Gentooミラーのいずれか のreleases/x86/autobuilds/からダウンロードできます。stageファイルは頻繁に更新され、インストールイメージの中には含まれていません。
ダウンロード
メディアの入手
Gentoo Linuxが使う既定のインストールメディアは、MinimalインストールCDで、とても小さいブータブルGentoo Linux環境を格納しています。この環境はGentooをインストールするために最適なツールをすべて含んでいます。このCDのイメージは、ダウンロードページから(推奨)か、たくさんの利用可能なミラーのいずれかを自分で選び、そのミラー上でISOが置いてある場所を訪れることで、ダウンロードできます。
ミラーからダウンロードするなら、以下の場所でMinimalインストールCDを見つけられます:
- releases/ディレクトリに行く。
- 関連するターゲットアーキテクチャのディレクトリ(例えばx86/)を選択する。
- autobuilds/ディレクトリを選択する。
- amd64とx86アーキテクチャでは、それぞれcurrent-install-amd64-minimal/ or current-install-x86-minimal/のどちらかを選択する。他のすべてのアーキテクチャでは、current-iso/ディレクトリへ進む。
arm、mips、s390のような一部のターゲットアーキテクチャには、MinimalインストールCDがありません。現時点では、Gentoo Release Engineering projectはこれらのターゲット向けの.isoファイルの作成をサポートしていません。
この場所の中では、インストールメディアファイルは.isoという接尾辞 (拡張子) を持ちます。例えば、以下の一覧を見てみてください。
[DIR] hardened/ 05-Dec-2014 01:42 - [ ] install-x86-minimal-20141204.iso 04-Dec-2014 21:04 208M [ ] install-x86-minimal-20141204.iso.CONTENTS 04-Dec-2014 21:04 3.0K [ ] install-x86-minimal-20141204.iso.DIGESTS 04-Dec-2014 21:04 740 [TXT] install-x86-minimal-20141204.iso.DIGESTS.asc 05-Dec-2014 01:42 1.6K [ ] stage3-x86-20141204.tar.bz2 04-Dec-2014 21:04 198M [ ] stage3-x86-20141204.tar.bz2.CONTENTS 04-Dec-2014 21:04 4.6M [ ] stage3-x86-20141204.tar.bz2.DIGESTS 04-Dec-2014 21:04 720 [TXT] stage3-x86-20141204.tar.bz2.DIGESTS.asc 05-Dec-2014 01:42 1.5K
上記の例では、install-x86-minimal-20141204.isoというファイルがMinimalインストールCDそのものです。 しかし見て分かりますが、他の関係ファイルも存在しています:
- .CONTENTSファイルは、インストールメディアで利用可能な全てのファイルの一覧を含むテキストファイルです。このファイルは、インストールメディアをダウンロードする前に、特定のファームウェアまたはドライバが含まれているかどうか調べるために使えます。
- .DIGESTSファイルは、様々なハッシュ形式とアルゴリズムで計算したISOファイルのハッシュ値を含んでいます。このファイルは、ダウンロードしたISOファイルが破損しているか否かを調べるために使われます。
- .DIGESTS.ascファイルは、(.DIGESTSのような) ISOファイルのハッシュ値だけではなく、ファイルのデジタル署名を含みます。これは両方ともダウンロードしたファイルが破損しているか否かを調べるために使われますが、同様にダウンロードしたものがGentooリリースエンジニアリングチームによって実際に提供されたものであり、改竄されていないかを調べるためにも用います。
今のところ、この場所で利用可能な他のファイルは無視してください。インストールがもっと進んだ後に再登場しますので。.isoファイルをダウンロードし、もしダウンロードの検証が必要であれば、.isoファイル用の.DIGESTS.ascファイルも同じようにダウンロードします。 .CONTENTSファイルはダウンロードする必要はありません。これからのインストール手順ではもう参照しないからです。.DIGESTSファイルと.DIGESTS.ascは、後者が署名されていることを除いて、同じ情報が含まれています。
ダウンロードしたファイルを検証する
これは任意自由選択なステップで、Gentoo Linuxをインストールするために必須なものではありません。しかしながら、ダウンロードしたファイルが破損していないことを確かめ、Gentooインフラストラクチャ チームから実際に提供されていることを保証するため、推奨されます。
.DIGESTSと.DIGESTS.ascファイルを通じ、ISOファイルの妥当性は、適切なツール群を用いて確認できます。この検証は通常、2つのステップで行われます。
- まず、デジタル署名を検証します。これは、インストール·ファイルがGentooリリースエンジニアリングチームによって提供されていることを確認するためです。
- デジタル署名が正しければ、ダウンロードされたファイル自体が破損していないかを確かめるため、チェックサムを検証します。
Microsoft Windows上での検証
Microsoft Windowsシステムでは、チェックサムとデジタル署名を検証するための適切なツール群が普通にある見込みはまずありません。
まずデジタル署名を検証するには、例えばGPG4Winのようなツールを利用できます。インストール後、Gentooリリースエンジニアリングチームの公開鍵をインポートする必要があります。鍵の一覧は署名のページで提供されています。インポート後、ユーザは.DIGESTS.ascファイルの署名を検証できるようになります。
これは.DIGESTSファイルが正しいことを検証しません。.DIGESTS.ascが正しいことだけを検証します。このことはまた、チェックサムが.DIGESTS.ascファイルに含まれる値を用いて検証されるべきであることを意味します。そのため、上記の手順では.DIGESTS.ascファイルのみダウンロードするようになっています。
チェックサム自体は、Hashcalcアプリケーションを使って検証できますが、多数の代替も同様に存在します。ほとんどの場合、これらのツールはユーザに対して計算されたチェックサムを表示しますので、ユーザはこのチェックサムを.DIGESTS.ascファイルの中にある値で検証する必要があります。
Linux上での検証
Linuxシステムでは、デジタル署名を検証する最も一般的な方法はapp-crypt/gnupgソフトウェアを使うことです。このパッケージがインストールされていると、.DIGESTS.ascファイルのデジタル署名を検証するために以下のコマンドが使えます。
まず、適切な鍵を利用できるようにするため、署名のページよりダウンロードします:
user $
gpg --keyserver hkp://keys.gnupg.net --recv-keys 0xBB572E0E2D182910
gpg: requesting key 0xBB572E0E2D182910 from hkp server pool.sks-keyservers.net gpg: key 0xBB572E0E2D182910: "Gentoo Linux Release Engineering (Automated Weekly Release Key) <releng@gentoo.org>" 1 new signature gpg: 3 marginal(s) needed, 1 complete(s) needed, classic trust model gpg: depth: 0 valid: 3 signed: 20 trust: 0-, 0q, 0n, 0m, 0f, 3u gpg: depth: 1 valid: 20 signed: 12 trust: 9-, 0q, 0n, 9m, 2f, 0u gpg: next trustdb check due at 2018-09-15 gpg: Total number processed: 1 gpg: new signatures: 1
次に.DIGESTS.ascファイルのデジタル署名を検証します:
user $
gpg --verify install-x86-minimal-20141204.iso.DIGESTS.asc
gpg: Signature made Fri 05 Dec 2014 02:42:44 AM CET gpg: using RSA key 0xBB572E0E2D182910 gpg: Good signature from "Gentoo Linux Release Engineering (Automated Weekly Release Key) <releng@gentoo.org>" [unknown] gpg: WARNING: This key is not certified with a trusted signature! gpg: There is no indication that the signature belongs to the owner. Primary key fingerprint: 13EB BDBE DE7A 1277 5DFD B1BA BB57 2E0E 2D18 2910
すべてが確実であることを完全に確かめるために、表示された指紋がGentooの署名のページ上にある指紋かどうかを調べます。
デジタル署名が検証されれば、次にチェックサムを確認します。これは、ダウンロードしたISOファイルが破損していないことを確認するためです。 .DIGESTS.ascファイルには、複数のハッシュアルゴリズムが含まれています。そのため、適切なものを検証するための1つの方法としては、.DIGESTS.ascに登録された先頭のチェックサムを見てください。 例えば、SHA512チェックサムを取得します:
user $
grep -A 1 -i sha512 install-x86-minimal-20141204.iso.DIGESTS.asc
# SHA512 HASH 364d32c4f8420605f8a9fa3a0fc55864d5b0d1af11aa62b7a4d4699a427e5144b2d918225dfb7c5dec8d3f0fe2cddb7cc306da6f0cef4f01abec33eec74f3024 install-x86-minimal-20141204.iso -- # SHA512 HASH 0719a8954dc7432750de2e3076c8b843a2c79f5e60defe43fcca8c32ab26681dfb9898b102e211174a895ff4c8c41ddd9e9a00ad6434d36c68d74bd02f19b57f install-x86-minimal-20141204.iso.CONTENTS
上記の出力では、2つのSHA512チェックサムが表示されます。1つはinstall-x86-minimal-20141204.isoファイルのもので、1つはそれに付随する.CONTENTSファイルです。最初のチェックサムだけが重要で、その 比較対象となるSHA512チェックサムは、以下のように生成することができます:
user $
sha512sum install-x86-minimal-20141204.iso
364d32c4f8420605f8a9fa3a0fc55864d5b0d1af11aa62b7a4d4699a427e5144b2d918225dfb7c5dec8d3f0fe2cddb7cc306da6f0cef4f01abec33eec74f3024 install-x86-minimal-20141204.iso
双方のチェックサムが同一であれば、ファイルは破損していません。インストールを続行できます。
ディスクに書き込む
もちろん、ISOファイルをダウンロードしただけでは、Gentoo Linuxのインストールは始められません。ISOファイルはブートCDに書き込む必要があり、しかもISOファイルそのものではなく、ISOファイルの中身を書き込む必要があります。以下にいくつかのよく使われる方法を示します--より詳細な情報が知りたい場合はISOファイルの書き込みについてのわたしたちのFAQを見てください。
Microsoft Windowsでの書き込み
Microsoft Windowsでは、ISOファイルのCD書き込みをサポートする多数のツールが存在します。
- EasyCD Creatorを使う場合は、File、Record CD from CD imageの順に選択してください。次に、Files of typeをISO image fileに変更してください。それから、ISOファイルの場所を見つけてOpenをクリックしてください。Start recordingをクリックすると、CD-RにISOイメージが正しく書き込まれます。
- Nero Burning ROMを使う場合は、自動的にポップアップするウィザードを中止して、FileメニューからBurn Imageを選択してください。書き込むイメージを選択して、Openをクリックしてください。Burnボタンを押して、ほやほやのCDが焼きあがるのを待ちましょう。
Linuxでの書き込み
Linuxでは、ISOファイルのCD書き込みにcdrecordコマンドが利用可能です。これはapp-cdr/cdrtoolsパッケージに含まれます。
例えば、/dev/sr0デバイス(これはシステム上の1番目のCDデバイスです。必要ならば正しいデバイスに置き換えてください)のCDにISOファイルを書き込むには:
user $
cdrecord dev=/dev/sr0 install-x86-minimal-20141204.iso
GUIを好むユーザーはkde-apps/k3bパッケージの一部であるK3Bを使うことができます。K3Bでは、ToolsメニューからBurn CD Imageを選択してください。それから、K3Bの指示に従ってください。
起動する
Booting the installation media
Once the installation media is ready, it is time to boot it. Insert the media in the system, reboot, and enter the motherboard's firmware user interface. This is usually performed by pressing a keyboard key such as DEL, F1, F10, or ESC during the Power-On Self-test (POST) process. The 'trigger' key varies depending on the system and motherboard. If it is not obvious use an internet search engine and do some research using the motherboard's model name as the search keyword. Results should be easy to determine. Once inside the motherboard's firmware menu, change the boot order so that the external bootable media (CD/DVD disks or USB drives) are tried before the internal disk devices. Without this change, the system will most likely reboot to the internal disk device, ignoring the external boot media.
When installing Gentoo with the purpose of using the UEFI interface instead of BIOS, it is recommended to boot with UEFI immediately. If not, then it might be necessary to create a bootable UEFI USB stick (or other medium) once before finalizing the Gentoo Linux installation.
If not yet done, ensure that the installation media is inserted or plugged into the system, and reboot. A boot prompt should be shown. At this screen, Enter will begin the boot process with the default boot options. To boot the installation media with custom boot options, specify a kernel followed by boot options and then hit Enter.
At the boot prompt, users get the option of displaying the available kernels (F1) and boot options (F2). If no choice is made within 15 seconds (either displaying information or using a kernel) then the installation media will fall back to booting from disk. This allows installations to reboot and try out their installed environment without the need to remove the CD from the tray (something well appreciated for remote installations).
Specifying a kernel was mentioned. On the Minimal installation media, only two predefined kernel boot options are provided. The default option is called gentoo. The other being the -nofb variant; this disables kernel framebuffer support.
The next section displays a short overview of the available kernels and their descriptions:
Kernel choices
- gentoo
- Default kernel with support for K8 CPUs (including NUMA support) and EM64T CPUs.
- gentoo-nofb
- Same as gentoo but without framebuffer support.
- memtest86
- Test the local RAM for errors.
Alongside the kernel, boot options help in tuning the boot process further.
Hardware options
- acpi=on
- This loads support for ACPI and also causes the acpid daemon to be started by the CD on boot. This is only needed if the system requires ACPI to function properly. This is not required for Hyperthreading support.
- acpi=off
- Completely disables ACPI. This is useful on some older systems and is also a requirement for using APM. This will disable any Hyperthreading support of your processor.
- console=X
- This sets up serial console access for the CD. The first option is the device, usually ttyS0 on x86, followed by any connection options, which are comma separated. The default options are 9600,8,n,1.
- dmraid=X
- This allows for passing options to the device-mapper RAID subsystem. Options should be encapsulated in quotes.
- doapm
- This loads APM driver support. This also requires that
acpi=off
. - dopcmcia
- This loads support for PCMCIA and Cardbus hardware and also causes the pcmcia cardmgr to be started by the CD on boot. This is only required when booting from PCMCIA/Cardbus devices.
- doscsi
- This loads support for most SCSI controllers. This is also a requirement for booting most USB devices, as they use the SCSI subsystem of the kernel.
- sda=stroke
- This allows the user to partition the whole hard disk even when the BIOS is unable to handle large disks. This option is only used on machines with an older BIOS. Replace sda with the device that requires this option.
- ide=nodma
- This forces the disabling of DMA in the kernel and is required by some IDE chipsets and also by some CDROM drives. If the system is having trouble reading from the IDE CDROM, try this option. This also disables the default hdparm settings from being executed.
- noapic
- This disables the Advanced Programmable Interrupt Controller that is present on newer motherboards. It has been known to cause some problems on older hardware.
- nodetect
- This disables all of the autodetection done by the CD, including device autodetection and DHCP probing. This is useful for doing debugging of a failing CD or driver.
- nodhcp
- This disables DHCP probing on detected network cards. This is useful on networks with only static addresses.
- nodmraid
- Disables support for device-mapper RAID, such as that used for on-board IDE/SATA RAID controllers.
- nofirewire
- This disables the loading of Firewire modules. This should only be necessary if your Firewire hardware is causing a problem with booting the CD.
- nogpm
- This disables gpm console mouse support.
- nohotplug
- This disables the loading of the hotplug and coldplug init scripts at boot. This is useful for doing debugging of a failing CD or driver.
- nokeymap
- This disables the keymap selection used to select non-US keyboard layouts.
- nolapic
- This disables the local APIC on Uniprocessor kernels.
- nosata
- This disables the loading of Serial ATA modules. This is used if the system is having problems with the SATA subsystem.
- nosmp
- This disables SMP, or Symmetric Multiprocessing, on SMP-enabled kernels. This is useful for debugging SMP-related issues with certain drivers and motherboards.
- nosound
- This disables sound support and volume setting. This is useful for systems where sound support causes problems.
- nousb
- This disables the autoloading of USB modules. This is useful for debugging USB issues.
- slowusb
- This adds some extra pauses into the boot process for slow USB CDROMs, like in the IBM BladeCenter.
Logical volume/device management
- dolvm
- This enables support for Linux's Logical Volume Management.
Other options
- debug
- Enables debugging code. This might get messy, as it displays a lot of data to the screen.
- docache
- This caches the entire runtime portion of the CD into RAM, which allows the user to umount /mnt/cdrom and mount another CDROM. This option requires that there is at least twice as much available RAM as the size of the CD.
- doload=X
- This causes the initial ramdisk to load any module listed, as well as dependencies. Replace X with the module name. Multiple modules can be specified by a comma-separated list.
- dosshd
- Starts sshd on boot, which is useful for unattended installs.
- passwd=foo
- Sets whatever follows the equals as the root password, which is required for dosshd since the root password is by default scrambled.
- noload=X
- This causes the initial ramdisk to skip the loading of a specific module that may be causing a problem. Syntax matches that of doload.
- nonfs
- Disables the starting of portmap/nfsmount on boot.
- nox
- This causes an X-enabled LiveCD to not automatically start X, but rather, to drop to the command line instead.
- scandelay
- This causes the CD to pause for 10 seconds during certain portions the boot process to allow for devices that are slow to initialize to be ready for use.
- scandelay=X
- This allows the user to specify a given delay, in seconds, to be added to certain portions of the boot process to allow for devices that are slow to initialize to be ready for use. Replace X with the number of seconds to pause.
The bootable media will check for
no*
options before do*
options, so that options can be overridden in the exact order specified.Now boot the media, select a kernel (if the default gentoo kernel does not suffice) and boot options. As an example, we boot the gentoo kernel, with dopcmcia
as a kernel parameter:
boot:
gentoo dopcmcia
Next the user will be greeted with a boot screen and progress bar. If the installation is done on a system with a non-US keyboard, make sure to immediately press Alt+F1 to switch to verbose mode and follow the prompt. If no selection is made in 10 seconds the default (US keyboard) will be accepted and the boot process will continue. Once the boot process completes, the user is automatically logged in to the "Live" Gentoo Linux environment as the root user, the super user. A root prompt is displayed on the current console, and one can switch to other consoles by pressing Alt+F2, Alt+F3 and Alt+F4. Get back to the one started on by pressing Alt+F1.
例外的なハードウェア構成
インストールメディアが起動するとき、すべてのハードウェア機器を検出して適切なカーネルモジュールを読み込もうとします。これは非常に多くの場合、とても良い仕事をします。しかしある場合において、システムに必要なカーネルモジュールを自動で読み込まないかもしれません。PCI自動検出機能がシステムのハードウェアを見逃した場合、適切なカーネルモジュールを手動で読み込む必要があります。
次の例は、(ある種類のネットワークインタフェイスをサポートする) 8139tooモジュールを読み込みます:
root #
modprobe 8139too
追加可能: ユーザアカウント
インストール環境に他の人たちがアクセスする必要があったり、インストールメディア上で非rootユーザでコマンドを実行する(例えば、セキュリティ上の理由から、root権限無しでirssiを使ってチャットする)必要があるなら、別のユーザアカウントを作成し、強いrootパスワードを設定する必要があります。
rootパスワードを変更するには、passwdユーティリティを使ってください:
root #
passwd
New password: (新しいパスワードを入力) Re-enter password: (もう一度新しいパスワードを入力)
ユーザーアカウントを作成するためには、まずアカウントの資格情報を、次にパスワードを入力します。このために、useraddとpasswdコマンドを使います。
次の例では、johnというユーザが作成されます:
root #
useradd -m -G users john
root #
passwd john
New password: (Enter john's password) Re-enter password: (Re-enter john's password)
現在のrootユーザから新しく作成したユーザアカウントに切り替えるには、suコマンドを使ってください:
root #
su - john
追加可能:インストール中のドキュメント閲覧
TTY
Gentooハンドブックをインストール中に見るには、最初に上記の方法でユーザアカウントを作ってください。そしてAlt+F2を押すことで新しい端末を使い始められます。
インストール中、 linksコマンドでGentooハンドブックを閲覧できます。もちろん、インターネット接続が機能し始めた瞬間からですけど。
user $
links https://wiki.gentoo.org/wiki/Handbook:X86
元々の端末に戻るには、Alt+F1を押してください。
GNU Screen
公式 Gentoo インストールメディアにはデフォルトで GNU Screen ユーティリティがインストールされています。熟練の Linux ファンにとっては、上に書いた複数の TTY を使う方法よりも、ペインを分割してインストール指示を読むために screen を使うほうが効率がいいかもしれません。
追加可能:SSHデーモンの開始
他のユーザーがインストール中にシステムにアクセスできるようにする(インストール中のサポートをしたり、あるいは全て遠隔操作で行うため)ためには、(前述の通り)ユーザーアカウントを作成し、SSHデーモンを起動する必要があります。
OpenRC 上で SSH デーモンを始動させるためには、次のコマンドを実行します:
root #
rc-service sshd start
ユーザーがシステムにログオンすると、(指紋・fingerprint と呼ばれるもので) ホスト鍵を確認するようメッセージが表示されると思います。これはSSHサーバーへの最初の接続では期待される典型的な挙動です。ところが、この後の手順でシステムのセットアップが完了した後、改めてログオンしようとすると、SSHクライアントはホスト鍵が変更されていると警告します。SSH的には別のサーバー (現在インストールに使っているLive環境ではなく、新しくインストールされた Gentoo システム) にログオンしようとしているように見えるのです。この場合は画面上の指示に従い、クライアント側で記憶しているホスト鍵を更新しましょう。
sshdを使えるようにするには、ネットワークを適切に機能させる必要があります。ネットワーク設定の章を参照してください。