Installation alternatives/ja

このガイドは、CD-ROM が用意できない場合や、コンピュータが CD からブートできない場合など、特殊なインストールニーズを持つ方のために、代替の Gentoo インストール方法の保管場所となることを意図しています.

If the standard boot-from-CD install method doesn't work, cannot be used, or if another method is just preferred, there are other methods to get an environment suitable to install Gentoo from. If there are other installation methods found to be useful, please add to this article.

GentooではないLiveCDからのインストール
ユーザは Gentoo が提供する CD 以外の LiveCD からブートすることもできます. とにかく、これらの LiveCD は、Gentoo をコンパイルしてインストールする間に使用できるだけの機能を備えた環境を提供します. ここで提示する手順は、原則、どんな LiveCD でも同じように機能するはずです.

あまりにも多くの LiveCD があるため列挙することはできませんが、Knoppix を試してみるのが一つの選択肢かもしれません. オフィスアプリケーション、ウェブブラウザ、そして暇をつぶすためのゲームも備えた、完全なグラフィカルデスクトップを提供しています. Knoppix は でのみ利用可能なので、ユーザの要件によっては別の LiveCD か、別の方法を使用する必要があるかもしれません.

LiveCD からブートしてください. ターミナルを開き、パスワードを変更できるように を実行してください. これにより CD の root パスワードを設定できます. 必要であれば、これでリモートログインのために sshd デーモンを設定できるようになります. 次に、 マウントポイントを作成してください.

この時点で、から、標準のインストールを再開することができます. ただし、もし proc システムをマウントする場合、代わりに以下のコマンドを実行してください:

過程で を展開するときに、展開された stage の中で適切なグループ ID が設定されるように、次の  コマンドラインオプションを確実に使用してください:

For some distributions, such as Ubuntu, pay particular attention to the warning in the section of the handbook. may be of interest if issues are still encountered.

Once ready to chroot into the unpacked stage in, a different chroot command sequence will need to be used. This ensures that the environment variables are properly setup.

最後に、いくつかPortageの FEATURES がLiveCDでは動作しないことを知っておいてください. 特に と の値に注意してください. もしエラーが発生する場合、 FEATURES のいくつか、あるいはすべてのオプションを無効にしてみてください.

Diskless install using PXE from the LiveCD
This method is easier to configure than PXE boot based on iSCSI or NFS. Multiple machines can boot from the same set of images distributed via TFTP and can be easily extended to also work over HTTP or other protocol.

Having a nice router, or one capable of running open source firmware such as OpenWRT/LEDE, is one way to centralize TFTP and DHCP. Getting the firmware online can sometimes be an uphill battle.

Some other distributions including Fedora already distribute images needed to bootstrap a live, or installation, CD. With Gentoo, users need to extract files from the ISO.

These instructions may be sufficient for more experienced users. See below for more directions, depending on the PXE flavor in use. There are different PXE boot-codes, but all of them require a kernel and eventually a ramdisk.

Please take a look at page for details on the alternatives, then come back here.

TFTP
This will be needed in tandem with a DHCP server for most PCs equipped with PXE boot. However, iPXE may be used to boot without a TFTP or DHCP server - see ipxe.org for info on embedding scripts, chainloading, and manual booting. There are still merits to TFTP booting such as wide-range device support.

Install, make sure it serves and start it.

Now the TFTP boot service is ready, so the next step is to configure a DHCP service.

DHCP
Setting up a DHCP server on the same machine is possible - just make sure that the booted machines are connected to it. Or just tweak the configuration of an existing router.

Example configuration for OpenWRT DHCP service follows:

From here, directions will change depending on the PXE boot-code (i.e. SYSLINUX, GRUB, iPXE).

GRUB
{{FileBox|filename=/tftproot/boot/grub/grub.cfg|1= menuentry "gentoo install" { linux /gentoo/kernel root=/dev/ram0 init=/linuxrc dokeymap looptype=squashfs loop=/image.squashfs  cdroot net.ifnames=0 initrd /gentoo/network.igz }}

Requirements
PXE (Preboot eXecution Environment) is a method for booting computers over a PXE-capable network interface (and using a PXE-supporting BIOS). In case the system does not support PXE boot from the network interface or BIOS, PXE can also be used as a boot method from block devices (like CDs or USBs). In such cases, a minimal boot environment mimics the PXE supporting network card (see also Etherboot/gPXE).

Server base setup
Create directories: The first thing to do is to create the directories where the diskless system will be stored. Create a directory called which houses a directory for each diskless client. For the remainder of this howto, the client that is being worked on will be called 'eta'.

DHCP and TFTP setup: The client will get boot information using DHCP and download all the required files using TFTP.

For dhcpd, just run (or any other DHCP server of choice). Make sure that the correct interface is selected in, and configure it accordingly. Then, add the following on.

Next configure the interface in so that it doesn't get cleared at bootup. See for more information.

For TFTP, emerge. In, put the following:

Emerge :

Once GRUB is compiled, create the diskless client's boot directory:

Original way was to copy the PXE image to the diskless client but the path does not seem to exit anymore.

Then edit its config file.

NFS is quite easy to configure. The only thing that has to be done is to add a line on the config file:

One important thing to do now is to modify the file to fit requirements.

Creating the system on the server
A next step is to reboot the server with a Gentoo installation CD (although experienced administrators can continue without if they are sufficiently versed in Gentoo installations). Follow the standard install procedure as explained in the BUT with the following differences: when mounting the file system, execute the next step (where  is the partition where the  directory was created).

Mounting any other partition is not needed as all of the files will reside in the directory.

This example uses a stage3 tarball. Mount to the diskless directory and chroot into it to continue with the install. Then follow the installation manual until kernel configuration.

When doing the of the kernel configuration, don't forget to enable the following options with the others recommended into the install guide.

Save the kernel in the chrooted (not in ) according to the pxegrub setting defined earlier. Next configure the diskless client's.

Now to prevent the client from running a filesystem check:

Install since the client will heavily depend on it:

Do not install another bootloader because there is already one - pxegrub. Simply finish the install and restart the server. Start the services that are needed to boot the new client: DHCP, TFTPD, and NFS.

Booting the new client
For the new client to boot properly, the BIOS and the network card need to be configured to use PXE as the first boot method - before CD-ROM or floppy. For help with this consult the hardware manuals or manufacturers website. The network card should get an IP address using DHCP and download the GRUB PXE image using TFTP. Then, a nice black and white GRUB bootmenu should be displayed from where users can select the kernel to boot and press the (Return) key. If everything is okay the kernel should boot, mount the root filesystem using NFS and provide a login prompt. Enjoy.

要件
In order to install Gentoo from an existing Linux distribution it needs to have the chroot command installed, and have a copy of the Gentoo installation or ISO that's desired to install. A network connection is highly recommended as otherwise the installation can only work with the files available in the installation media.

概要
まず既存の Linux パーティションをリサイズすることで Gentoo にパーティションを割り当て、パーティションをマウントし、マウントされたパーティションに tarball を展開し、擬似システムの中に chroot して、ビルドを開始します. ブートストラッププロセスが完了したら、システムの最終的な設定をして、ブートできることを確認して、再起動すれば Gentoo を使用できます.

どうやって Gentoo のために場所を空けるか？
The root partition is the filesystem mounted under. The first example shows the output of on a system. The second example uses (disk free) to see how much space there is left and how it will be resized. Note that resizing the root partition is not mandatory! Anything else supported by the resizer can be resized, but let's talk about that later.

As can be seen, the partition mounted as named  has 2.4 GB free. In this case, it was decided to be resized as to leave 400 MB of free space, therefore allocating 2 GB for Gentoo. Not bad, it could have quite some stuff installed. However, 1 GB is deemed enough for most users. So now partition this thing!

Using parted to resize partition
is extremely useful for resizing partitions. It is included on the.

Look up on that page the type of file system to resize and see if can do it. If not, some partitions might need to be destroyed to make space for Gentoo. Go ahead downloading the software and install it. In the next step, a problem arises: the Linux root partition needs to be resized, therefore a boot medium with a minimal Linux system must be booted in order to resize. If the partition can be unmounted while still running in Linux then the following steps are not needed. Just install and run it on a chosen unmounted partition to resize. Here's how it was done on this system.

Time to reboot and resize the partition. Do this only after taking a quick look at the parted documentation on the GNU website. The resize can be long for large hard-drives, be patient. Reboot the system with the Minimal installation CD. Run parted to be able to resize the partition. Once this lengthy process is done, continue with installing Gentoo. Reboot back into the old Linux system for now. The drive to operate on is the drive containing the partition that is going to be resized. For example, if the partition to be resized is, the drive is.

NUMBER is the partition number used by Linux. On MS-DOS disk labels, the primary partitions number from 1 to 4, logical partitions from 5 onwards. END is disk location, such as 4GB or 10%. Negative value counts from the end of the disk. For example, -1s specifies exactly the last sector. }}

Once the resize has finished, boot back into the old Linux as described. Then go to and follow the instructions.

Chrooting
When chrooting, use the following command to flush the environment:

楽しんで！