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

Výběr správného instalačního média

From Gentoo Wiki (test)
Jump to:navigation Jump to:search
This page is a translated version of the page Handbook:AMD64/Installation/Media and the translation is 100% complete.
AMD64 Handbook
Installation
About the installation
Choosing the media
Configuring the network
Preparing the disks
Installing stage3
Installing base system
Configuring the kernel
Configuring the system
Installing tools
Configuring the bootloader
Finalizing
Working with Gentoo
Portage introduction
USE flags
Portage features
Initscript system
Environment variables
Working with Portage
Files and directories
Variables
Mixing software branches
Additional tools
Custom package repository
Advanced features
Network configuration
Getting started
Advanced configuration
Modular networking
Wireless
Adding functionality
Dynamic management


Požadavky na hardware

Before we start, we first list what hardware requirements are needed to successfully install Gentoo on a amd64 box.


AMD64 livedisk hardware requirements
Minimal CD LiveDVD
CPU Any AMD64 CPU or EM64T CPU (Core i3, i5, and i7 are EM64T)
Memory 256 MB 512 MB
Disk space 2.5 GB (excluding swap space)
Swap space At least 256 MB

The AMD64 project is a good place to be for more information about Gentoo's amd64 support.


Gentoo Linux installation media

Minimální instalační CD

Note
As of August 23, 2018 the official Minimal CDs are capable of booting in UEFI mode. Previous versions boot in BIOS (MBR) mode only. Readers looking to make their system UEFI bootable must download the latest ISO.

The Gentoo minimal installation CD is a bootable image which contains a self-sustained Gentoo environment. It allows the user to boot Linux from the CD or other installation media. During the boot process the hardware is detected and the appropriate drivers are loaded. The image is maintained by Gentoo developers and allows anyone to install Gentoo if an active Internet connection is available.

The Minimal Installation CD is called install-amd64-minimal-<release>.iso.

Příležitostné Gentoo LiveDVD

Projekt Gentoo Ten příležitostně vytváří speciální DVD, které může být použit k instalaci Gentoo. Pokyny uvedené níže v této kapitole cílí na minimální instalační CD, tudíž mohou být poněkud rozdílné. Nicméně LiveDVD (i jakékoli jiné bootovatelné Linuxové prostředí) podporuje získání root přístupu zadáním sudo su - nebo sudo -i v terminálu.

Co je to stage?

A stage3 tarball is an archive containing a minimal Gentoo environment, suitable to continue the Gentoo installation using the instructions in this manual. Previously, the Gentoo Handbook described the installation using one of three stage tarballs. While Gentoo still offers stage1 and stage2 tarballs, the official installation method uses the stage3 tarball. If you are interested in performing a Gentoo installation using a stage1 or stage2 tarball, please read the Gentoo FAQ on How do I install Gentoo using a stage1 or stage2 tarball?

Stage3 tarballs can be downloaded from releases/amd64/autobuilds/ on any of the official Gentoo mirrors. Stage files update frequently and are not included on the installation images.

Downloading

Obtain the media

The default installation media that Gentoo Linux uses are the minimal installation CDs, which host a bootable, very small Gentoo Linux environment. This environment contains all the right tools to install Gentoo. The CD images themselves can be downloaded from the downloads page (recommended) or by manually browsing to the ISO location on one of the many available mirrors.

Pokud stahujete ze zrcadla, minimální instalační CD naleznete následujícím způsobem:

  1. Go to the releases/ directory.
  2. Select the directory for the relevant target architecture (such as amd64/).
  3. Select the autobuilds/ directory.
  4. For amd64 and x86 architectures select either the current-install-amd64-minimal/ or current-install-x86-minimal/ directory (respectively). For all other architectures navigate to the current-iso/ directory.
Note
Některé architektury jako arm, mips, a s390 nemají minimální CD. Momentálně Gentoo Release Engineering projekt nepodporuje sestavování .iso souborů pro tyto cíle.

Inside this location, the installation media file is the file with the .iso suffix. For instance, take a look at the following listing:

CODE Example list of downloadable files at releases/amd64/autobuilds/current-iso/
[DIR] hardened/                                          05-Dec-2014 01:42    -   
[   ] install-amd64-minimal-20141204.iso                 04-Dec-2014 21:04  208M  
[   ] install-amd64-minimal-20141204.iso.CONTENTS        04-Dec-2014 21:04  3.0K  
[   ] install-amd64-minimal-20141204.iso.DIGESTS         04-Dec-2014 21:04  740   
[TXT] install-amd64-minimal-20141204.iso.DIGESTS.asc     05-Dec-2014 01:42  1.6K  
[   ] stage3-amd64-20141204.tar.bz2                      04-Dec-2014 21:04  198M  
[   ] stage3-amd64-20141204.tar.bz2.CONTENTS             04-Dec-2014 21:04  4.6M  
[   ] stage3-amd64-20141204.tar.bz2.DIGESTS              04-Dec-2014 21:04  720   
[TXT] stage3-amd64-20141204.tar.bz2.DIGESTS.asc          05-Dec-2014 01:42  1.5K

In the above example, the install-amd64-minimal-20141204.iso file is the minimal installation CD itself. But as can be seen, other related files exist as well:

  • A .CONTENTS file which is a text file listing all files available on the installation media. This file can be useful to verify if particular firmware or drivers are available on the installation media before downloading it.
  • A .DIGESTS file which contains the hash of the ISO file itself, in various hashing formats/algorithms. This file can be used to verify if the downloaded ISO file is corrupt or not.
  • A .DIGESTS.asc file which not only contains the hash of the ISO file (like the .DIGESTS file), but also a cryptographic signature of that file. This can be used to both verify if the downloaded ISO file is corrupt or not, as well as verify that the download is indeed provided by the Gentoo Release Engineering team and has not been tampered with.

Prozatím ignorujte ostatní dostupné soubory - budeme se jimi opět zabývat jakmile instalace pokročí dále. Stáhněte soubor .ISO a pokud jej chcete ověřit, stáhněte také soubor .DIGEST.asc k souboru .iso. Soubor .CONTENTS nemusíte stahovat, jelikož instalační pokyny se k němu již nebudou vracet a soubor .DIGESTS by měl obsahovat stejné informace jako soubor .DIGESTS.asc vyjma toho, že druhý obsahuje navíc podpis.

Ověření stažených souborů

Note
Tento krok je volitelný a není pro instalaci nezbytný. Nicméně doporučuje se ho provést, jelikož se tím ověří, že soubor není poškozen a byl skutečně poskytnut Gentoo Infrastructure týmem.

S pomocí správných nástrojů může být prostřednictvím souborů .DIGESTS a .DIGESTS.asc ověřena pravost souboru ISO. Toto ověření se obvykle dělá ve dvou krocích:

  1. Nejprve se ověří kryptografický podpis, čímž se zjistí, zda instalační soubor pochází od Gentoo Release Engineering týmem
  2. Pokud kryptografický podpis souhlasí, ověří se kontrolní součet, čímž se zjistí, že stažený soubor není poškozen.

Ověření v Microsoft Windows

Je jen malá pravděpodobnost, že se v systému Microsoft Windows právě nacházejí správné nástroje pro ověření kontrolních součtů a kryptografických podpisů.

K ověření kryptografického podpisu je nejprve třeba použít nástroj jako je například GPG4Win. Po nainstalování je třeba importovat veřejné klíče Gentoo Release Engineering týmu. Seznam klíčů je dostupný ze stránky s podpisy. Jakmile dojde k importu, uživatel může ověřit podpis souboru .DIGESTS.asc.

Important
Tím není ověřena správnost souboru .DIGESTS, ale pouze .DIGESTS.asc. Z toho vyplývá, že kontrolní součet by měl být ověřován pouze proti hodnotám v souboru .DIGESTS.asc, a proto také pokyny výše odkazují ke stažení souboru .DIGESTS.asc.

Kontrolní součet může být ověřen použitím aplikace Hashcalc, i když jiné programy mohou existovat také. Tyto nástroje většinou uživateli ukáží vypočtený kontrolní součet a po uživateli se vyžaduje, aby si ho ověřil s hodnotou uvedenou uvnitř souboru .DIGESTS.asc.

Ověření v Linuxu

V systému Linux je nejběžnější metodou k ověření kryptografického podpisu použití softwaru app-crypt/gnupg. Po nainstalování tohoto balíčku můžete použít následující příkazy k ověření kryptografického podpisu v souboru .DIGESTS.asc.

Nejprve stáhněte správnou sadu klíčů poskytovaných na stránce podpisů:

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

Následně ověřte kryptografický podpis souboru .DIGESTS.asc:

user $gpg --verify install-amd64-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

Abyste měli absolutní jistotu, že je vše správně, ověřte zobrazený otisk s otiskem na stránce podpisů Gentoo.

Po ověření kryptografického podpisu následně ověřte kontrolní součet, abyste se ujistili, že stažený ISO soubor není poškozen. Soubor .DIGESTS.asc obsahuje vícero hashovacích algoritmů, takže jednou z metod jak ověřit jeden z nich je podívat se na kontrolní součet uvedený v souboru .DIGESTS.asc. Například kontrolní součet SHA512 získáte takto:

user $grep -A 1 -i sha512 install-amd64-minimal-20141204.iso.DIGESTS.asc
# SHA512 HASH
364d32c4f8420605f8a9fa3a0fc55864d5b0d1af11aa62b7a4d4699a427e5144b2d918225dfb7c5dec8d3f0fe2cddb7cc306da6f0cef4f01abec33eec74f3024  install-amd64-minimal-20141204.iso
--
# SHA512 HASH
0719a8954dc7432750de2e3076c8b843a2c79f5e60defe43fcca8c32ab26681dfb9898b102e211174a895ff4c8c41ddd9e9a00ad6434d36c68d74bd02f19b57f  install-amd64-minimal-20141204.iso.CONTENTS

In the above output, two SHA512 checksums are shown - one for the install-amd64-minimal-20141204.iso file and one for its accompanying .CONTENTS file. Only the first checksum is of interest, as it needs to be compared with the calculated SHA512 checksum which can be generated as follows:

user $sha512sum install-amd64-minimal-20141204.iso
364d32c4f8420605f8a9fa3a0fc55864d5b0d1af11aa62b7a4d4699a427e5144b2d918225dfb7c5dec8d3f0fe2cddb7cc306da6f0cef4f01abec33eec74f3024  install-amd64-minimal-20141204.iso

Pokud oba kontrolní součty souhlasí, soubor není poškozen a instalace může pokračovat.

Burning a disk

Samozřejmě pouze se staženým souborem ISO nemůže být instalace Gentoo Linuxu zahájena. Soubor ISO musí být vypálen na CD, z něhož bude startováno, takovým způsobem, že na CD bude vypálen jeho obsah, nikoli soubor samotný. Níže jsou popsány nejběžnější metody. Podrobnější pokyny jsou k nalezení na stránce Naše FAQ k vypalování souborů ISO.

Vypalování s Microsoft Windows

Pro Microsoft Windows je k dispozici mnoho nástrojů, které podporují vypalování ISO obrazů na CD.

  • V EasyCD Creatoru zvolte Soubor, Nahrát CD z obrazu. Po té změňte Typ souborů na soubor obrazu ISO. Po té najděte soubor ISO a klikněte na Otevřít. Po kliknutí na Zahájit nahrávání bude ISO obraz řádně vypálen na CD-R.
  • V Nero Burning ROM zrušte průvodce, který automaticky vyskočí a zvolte Vypálit obraz z menu Soubor. Zvolte obraz k vypálení a klikněte na Otevřít. Nyní zmáčkněte tlačítko Vypálit a sledujte, jak je vaše nové CD vypáleno.

Vypálení s Linuxem

V Linuxu může být soubor ISO vypálen na CD s použitím příkazu cdrecord, který je součástí balíčku app-cdr/cdrtools.

Například k vypálení souboru ISO na zařízení /dev/sr0 (toto je první zařízení CD v systému - zaměňte jej za správný soubor zařízení, pokud je to třeba):

user $cdrecord dev=/dev/sr0 install-amd64-minimal-20141204.iso

Users that prefer a graphical user interface can use K3B, part of the kde-apps/k3b package. In K3B, go to Tools and use Burn CD Image. Then follow the instructions provided by K3B.

Booting

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.

Important
Jestliže instalujete Gentoo se záměrem používat rozhraní UEFI namísto BIOS, doporučuje se zavádět přímo pomocí UEFI. Jestliže se tak nestane, bude před dokončením instalace Gentoo Linuxu nejspíše nutné vytvořit bootovatelný UEFI USB flash disk (nebo jiné médium).

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.

Kromě volby jádra můžete pomocí voleb zavádění zaváděcí proces dále vyladit.

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.
Note
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.


Dodatečná konfigurace hardwaru

When the Installation medium boots, it tries to detect all the hardware devices and loads the appropriate kernel modules to support the hardware. In the vast majority of cases, it does a very good job. However, in some cases it may not auto-load the kernel modules needed by the system. If the PCI auto-detection missed some of the system's hardware, the appropriate kernel modules have to be loaded manually.

V následujícím příkladu je nahrán modul 8139too (který podporuje určité druhy síťových karet):

root #modprobe 8139too

Volitelné: Uživatelské přístupy

If other people need access to the installation environment, or there is need to run commands as a non-root user on the installation medium (such as to chat using irssi without root privileges for security reasons), then an additional user account needs to be created and the root password set to a strong password.

Ke změně hesla root použijte utilitu passwd:

root #passwd
New password: (Enter the new password)
Re-enter password: (Re-enter the password)

K vytvoření uživatelského účtu nejprve vložte jeho údaje následované heslem. Pro tyto úkony se používají příkazy useradd a passwd.

V následujícím příkladu bude vytvořen uživatel s jménem "john":

root #useradd -m -G users john
root #passwd john
New password: (Enter john's password)
Re-enter password: (Re-enter john's password)

K přepnutí se z (současného) uživatele "root" na nově vytvořený uživatelský účet, použijte příkaz su:

root #su - john

Volitelné: Zobrazení dokumentace během instalace

TTYs

Pro zobrazení dokumentace nejprve vytvořte uživatelský účet jak je popsáno výše. Po té stiskněte Alt+F2 k přepnutí na nový terminál.

V průběhu instalace může použít příkaz links k prohlížení Příručky Gentoo - samozřejmě pouze od chvíle, kdy zprovozníte připojení k internetu.

user $links https://wiki.gentoo.org/wiki/Handbook:AMD64

K návratu na původní terminál stiskněte Alt+F1.

GNU Screen

The GNU Screen utility is installed by default on official Gentoo installation media. It may be more efficient for the seasoned Linux enthusiast to use screen to view installation instructions via split panes rather than the multiple TTY method mentioned above.

Volitelné: Spuštění démona SSH

Abyste umožnili ostatním uživatelům přístup k systému v průběhu instalace (kvůli podpoře během instalace nebo dokonce k jejímu vzdálenému provedení), musí být vytvořen uživatelský účet (jak bylo popsáno dříve) a spuštěn démon SSH.

Démona SSH nahodíte spuštěním následujícího příkazu:

root #rc-service sshd start
Note
If users log on to the system, they will see a message that the host key for this system needs to be confirmed (through what is called a fingerprint). This behavior is typical and can be expected for initial connections to an SSH server. However, later when the system is set up and someone logs on to the newly created system, the SSH client will warn that the host key has been changed. This is because the user now logs on to - for SSH - a different server (namely the freshly installed Gentoo system rather than the live environment that the installation is currently using). Follow the instructions given on the screen then to replace the host key on the client system.

Abyste mohli použít sshd, síť musí správně fungovat. Pokračujte na kapitolu Konfigurace sítě.