Visit the LVM article for more details. Newcomers beware: although fully supported, LVM is outside the scope of this guide. While it is possible to mix and match, that goes beyond the scope of this manual. If this suffices as information, the advanced reader can directly skip ahead to the actual partitioning.
Both fdisk and parted are partitioning utilities. Here, fdisk is used since it has a better text-based user interface. Before going to the creation instructions, the first set of sections will describe in more detail how partitioning schemes can be created and mention some common pitfalls. The design of disk partition layout is highly dependent on the demands of the system and the file system s applied to the device.
How many partitions and how big very much depends on considering the trade-offs and choosing the best option for the circumstance. Separate partitions or volumes have the following advantages:. There is no perfect value for swap space size.
The purpose of the space is to provide disk storage to the kernel when internal memory RAM is under pressure. A swap space allows for the kernel to move memory pages that are not likely to be accessed soon to disk swap or page-out , which will free memory in RAM for the current task.
Of course, if the pages swapped to disk are suddenly needed, they will need to be put back in memory page-in which will take considerably longer than reading from RAM as disks are very slow compared to internal memory. When a system is not going to run memory intensive applications or has lots of RAM available, then it probably does not need much swap space.
However do note in case of hibernation that swap space is used to store the entire contents of memory likely on desktop and laptop systems rather than on server systems. If the system requires support for hibernation, then swap space larger than or equal to the amount of memory is necessary.
As a general rule, the swap space size is recommended to be twice the internal memory RAM. The faster a disk can swap, the faster the system will run when data in swap space must be accessed. When choosing between rotational and solid state disks, it is better for performance to put swap on the SSD.
Also, swap files can be used as an alternative to swap partitions; this is mostly interesting for systems with very limited disk space.
The instructions below contain the necessary pointers to correctly handle this operation. After partitioning, format the ESP accordingly:. It is a very small 1 to 2 MB partition in which boot loaders like GRUB2 can put additional data that doesn't fit in the allocated storage. It will not be used in this guide. The example partition layout was mentioned earlier:.
Use the p key to display the disk's current partition configuration:. This particular disk was configured to house two Linux filesystems each with a corresponding partition listed as "Linux" as well as a swap partition listed as "Linux swap". Type g to create a new GPT disklabel on the disk; this will remove all existing partitions. For an existing GPT disklabel see the output of p above , alternatively consider removing the existing partitions one by one from the disk.
Type d to delete a partition. The partition has now been scheduled for deletion. It will no longer show up when printing the list of partitions p , but it will not be erased until the changes have been saved.
This allows users to abort the operation if a mistake was made - in that case, type q immediately and hit Enter and the partition will not be deleted.
Repeatedly type p to print out a partition listing and then type d and the number of the partition to delete it. Eventually, the partition table will be empty:.
Type n to create a new partition, followed by 1 to select the first partition. When prompted for the first sector, make sure it starts from which may be needed for the boot loader and hit Enter. When prompted for the first sector, hit Enter. After all this is done, type t to set the partition type, 2 to select the partition just created and then type in 19 to set the partition type to "Linux Swap". Finally, to create the root partition, type n to create a new partition.
When prompted for the last sector, hit Enter to create a partition that takes up the rest of the remaining space on the disk. After completing these steps, typing p should display a partition table that looks similar to this:. To save the partition layout and exit fdisk , type w.
The example partition layout mentioned earlier is now:. This particular disk was until now configured to house two Linux filesystems each with a corresponding partition listed as "Linux" as well as a swap partition listed as "Linux swap" , using a GPT table. Type o to create a new MBR disklabel here also named DOS disklabel on the disk; this will remove all existing partitions.
For an existing DOS disklabel see the output of p above , alternatively consider removing the existing partitions one by one from the disk. Type n to create a new partition, followed by p for a primary partition and 1 to select the first primary partition.
After all this is done, type t to set the partition type, 2 to select the partition just created and then type in 82 to set the partition type to "Linux Swap".
Now that the partitions have been created, it is time to place a filesystem on them. In the next section the various file systems that Linux supports are described. Readers that already know which filesystem to use can continue with Applying a filesystem to a partition.
The others should read on to learn about the available filesystems Linux supports several dozen filesystems, although many of them are only wise to deploy for specific purposes.
Only certain filesystems may be found found stable on the amd64 architecture - it is advised to read up on the filesystems and their support state before selecting a more experimental one for important partitions.
The below is a non-exaustive list. To create a filesystem on a partition or volume, there are user space utilities available for each possible filesystem. Click the filesystem's name in the table below for additional information on each filesystem:. When using ext4 on a small partition less than 8 GiB , then the file system must be created with the proper options to reserve enough inodes. This can be done using one of the following commands, respectively:.
This will generally quadruple the number of inodes for a given file system as its "bytes-per-inode" reduces from one every 16kB to one every 4kB. To activate the swap partition, use swapon :. Now that the partitions have been initialized and are housing a filesystem, it is time to mount those partitions.
Use the mount command, but don't forget to create the necessary mount directories for every partition created.
As an example we mount the root partition:. Later in the instructions the proc filesystem a virtual interface with the kernel as well as other kernel pseudo-filesystems will be mounted. But first we install the Gentoo installation files. Before installing Gentoo, it is a good idea to be sure the date and time are set correctly. A misconfigured clock may lead to strange issues with the installation: base system files should be extracted with accurate time stamps. In fact, due to Gentoo's web based services using security certificates, it might not be possible to download the installation files if the system clock is too far skewed.
An accurate clock is a requirement for proceeding with the installation. Verify the current date and time by running the date command:. It can be used to automatically sync the system clock to UTC time using a time server. Using this method requires a working network configuration and may not be available on all architectures. For systems that do not have access to a time server, the date command can also be used to set the system clock. UTC time is recommended for all Linux systems.
A timezone will be defined later in the installation which will modify the clock to display local time. Choosing a base tarball for the system can save a considerable amount of time later on in the installation process, specifically when it is time to choose a system profile. The selection of a stage tarball will directly impact future system configuration and can save a headache or two later on down the line. The multilib tarball uses bit libraries when possible, and only falls back to the bit versions when necessary for compatibility.
This is an excellent option for the majority of installations because it provides a great amount of flexibility for customization in the future. Those who desire their systems to be capable of easily switching profiles should download the multilib tarball option for their respective processor architecture.
Most users should not use the 'advanced' tarballs options; they are for specific software or hardware configurations. Selecting a no-multilib tarball to be the base of the system provides a complete bit operating system environment. This effectively renders the ability to switch to multilib profiles improbable, although still technically possible. It is Gentoo's native and original init system, but is also deployed by a few other Linux distributions and BSD systems.
This means a solution can be found to run the dozens of daemons in the Gentoo ebuild repository. For historical reasons only, this manual focuses on installation and configuration using OpenRC. Rewriting and enhancing it to also explain a systemd installation see below is planned. It is used as the primary init system by a majority of Linux distributions. Unfortunately, the corresponding installation Handbook sections for system still need to be written or are work in progress.
It something seems lacking in the Handbook for a systemd install path, review the systemd article before asking for support. Those using environments with fully graphical web browsers will have no problem copying a stage file URL from the main website's download section. Simply select the appropriate tab, right click the link to the stage file, then Copy Link to copy the link to the clipboard, then paste the link to the wget utility on the command-line to download the stage tarball:.
To download a stage, surf to the Gentoo mirror list like so:. Like links it is a non-graphical browser but it is not menu-driven. On the mirror list, select a mirror close by. Usually HTTP mirrors suffice, but other protocols are available as well.
There all available stage files are displayed they might be stored within subdirectories named after the individual sub-architectures. Select one and press d to download. After the stage file download completes, it is possible to verify the integrity and validate the contents of the stage tarball. Those interested should proceed to the next section. Those not interested in verifying and validating the stage file can close the command-line browser by pressing q and can move directly to the Unpacking the stage tarball section.
Like with the minimal installation CDs, additional downloads to verify and validate the stage file are available. Although these steps may be skipped, these files are provided for users who care about the legitimacy of the file s they just downloaded. Use openssl and compare the output with the checksums provided by the. Another way is to use the shasum command:.
Compare the output of these commands with the value registered in the. The values need to match, otherwise the downloaded file might be corrupt or the digests file is.
Just like with the ISO file, it is also possible to verify the cryptographic signature of the. The fingerprints of the OpenPGP keys used for signing release media can be found on the release media signatures page of the Gentoo webserver.
Now unpack the downloaded stage onto the system. Use the tar utility to proceed:. The x stands for e x tract, the p for p reserve permissions and the f to denote that we want to extract a f ile not standard input. Finally, --numeric-owner is used to ensure that the user and group IDs of the files being extracted from the tarball will remain the same as Gentoo's release engineering team intended even if adventurous users are not using official Gentoo live environments.
Now that the stage file is unpacked, proceed with Configuring the compile options. To optimize the system, it is possible to set variables which impact the behavior of Portage, Gentoo's officially supported package manager.
All those variables can be set as environment variables using export but setting via export is not permanent. Portage reads in the make. Fire up an editor in this guide we use nano to alter the optimization variables we will discuss hereafter. From the make. Several of those variables are discussed in the next section. Although those are defined generally here, for maximum performance one would need to optimize these flags for each program separately.
The reason for this is because every program is different. However, this is not manageable, hence the definition of these flags in the make. In make. Don't place experimental settings in this variable; too much optimization can make programs misbehave crash, or even worse, malfunction. We will not explain all possible optimization options. To understand them all, read the GNU Online Manual s or the gcc info page info gcc - only works on a working Linux system. The make.
Possible options are described in the make. A commonly used value is native as that tells the compiler to select the target architecture of the current system the one users are installing Gentoo on.
A second one is the -O flag that is a capital O, not a zero , which specifies the gcc optimization class flag. Possible classes are s for size-optimized , 0 zero - for no optimizations , 1, 2 or even 3 for more speed-optimization flags every class has the same flags as the one before, plus some extras. Another popular optimization flag is -pipe use pipes rather than temporary files for communication between the various stages of compilation.
It has no impact on the generated code, but uses more memory. On systems with low memory, gcc might get killed. In that case, do not use this flag. Using -fomit-frame-pointer which doesn't keep the frame pointer in a register for functions that don't need one might have serious repercussions on the debugging of applications. The default values contained in the stage3 archive that is unpacked should be good enough. The following one is just an example:.
Then continue with Installing the Gentoo base system. In order to download source code quickly it is recommended to select a fast mirror. Portage will look in the make. It is possible to surf to the Gentoo mirror list and search for a mirror or mirrors that is close to the system's physical location as those are most frequently the fastest ones.
However, we provide a nice tool called mirrorselect which provides users with a nice interface to select the mirrors needed. Just navigate to the mirrors of choice and press Spacebar to select one or more mirrors. This file contains the sync information needed to update the package repository the collection of ebuilds and related files containing all the information Portage needs to download and install software packages.
Configuring the repository can be done in a few simple steps. First, if it does not exist, create the repos. Next, copy the Gentoo repository configuration file provided by Portage to the newly created repos. Take a peek with a text editor or by using the cat command. The inside of the file should be in. The default sync-uri variable value listed above will determine a mirror location based on a rotation.
This will aid in easing bandwidth stress on Gentoo's infrastructure and will provide a fail-safe in case a specific mirror is offline. It is recommended the default URI is retained unless a local, private Portage mirror will be used. This needs to be done to ensure that networking still works even after entering the new environment. To copy this information, it is recommended to pass the --dereference option to the cp command.
Otherwise in the new environment the symbolic link would point to a non-existing file as the link's target is most likely not available inside the new environment. In a few moments, the Linux root will be changed towards the new location. To make sure that the new environment works properly, certain filesystems need to be made available there as well.
Now that all partitions are initialized and the base environment installed, it is time to enter the new installation environment by chrooting into it. This means that the session will change its root most top-level location that can be accessed from the current installation environment installation CD or other installation medium to the installation system namely the initialized partitions.
Hence the name, change root or chroot. From this point, all actions performed are immediately on the new Gentoo Linux environment. Of course it is far from finished, which is why the installation still has some sections left! Now that the new environment has been entered, it is necessary to mount the boot partition.
This will be important when it is time to compile the kernel and install the bootloader:. Next step is to install a snapshot of the Gentoo ebuild repository. This snapshot contains a collection of files that informs Portage about available software titles for installation , which profiles the system administrator can select, package or profile specific news items, etc.
Readers who have no network or bandwidth restrictions can happily skip down to the next section. This will fetch the latest snapshot which is released on a daily basis from one of Gentoo's mirrors and install it onto the system:. From this point onward, Portage might mention that certain updates are recommended to be executed.
This is because system packages installed through the stage file might have newer versions available; Portage is now aware of new packages because of the repository snapshot. Package updates can be safely ignored for now; updates can be delayed until after the Gentoo installation has finished. It is possible to update the Gentoo ebuild repository to the latest version. The previous emerge-webrsync command will have installed a very recent snapshot usually recent up to 24h so this step is definitely optional.
Suppose there is a need for the last package updates up to 1 hour , then use emerge --sync. This command will use the rsync protocol to update the Gentoo ebuild repository which was fetched earlier on through emerge-webrsync to the latest state.
On slow terminals, like some framebuffers or serial consoles, it is recommended to use the --quiet option to speed up the process:. When the Gentoo ebuild repository is synchronized, Portage may output informational messages similar to the following:. News items were created to provide a communication medium to push critical messages to users via the Gentoo ebuild repository.
To manage them, use eselect news. The eselect application is a Gentoo-specific utility that allows for a common management interface for system administration. In this case, eselect is asked to use its news module. A profile is a building block for any Gentoo system. These settings are all maintained by Gentoo's Portage developers.
You can see what profile the system is currently using with eselect , now using the profile module:. After viewing the available profiles for the amd64 architecture, users can select a different profile for the system:.
In order to select a pure bit environment, with no bit applications or libraries, use a no-multilib profile:. At this point, it is wise to update the system's world set so that a base can be established. This following step is necessary so the system can apply any updates or USE flag changes which have appeared since the stage3 was built and from any profile selection:.
USE is one of the most powerful variables Gentoo provides to its users. Several programs can be compiled with or without optional support for certain items. Others can be compiled with or without SSL support. Some programs can even be compiled with framebuffer support svgalib instead of X11 support X-server.
Most distributions compile their packages with support for as much as possible, increasing the size of the programs and startup time, not to mention an enormous amount of dependencies. With Gentoo users can define what options a package should be compiled with. This is where USE comes into play. In the USE variable users define keywords which are mapped onto compile-options.
For instance, ssl will compile SSL support in the programs that support it. The default USE settings are placed in the make. Gentoo uses a complex inheritance system for its profiles, which we will not dive into at this stage. The easiest way to check the currently active USE settings is to run emerge --info and select the line that starts with USE:.
USE flags can be globally removed by adding a - minus sign in front of the value in the the list. For example, to disable support for X graphical environments, -X can be set:. All of the Gentoo packages are tagged with the license s the package falls under. This allows users to select software by specific licenses or groups of licenses prior to installing it. The license groups defined in the Gentoo repository, managed by the Gentoo Licenses project , are:.
The default value will only accept licenses that are explicitly approved by the Free Software Foundation, the Open Source Initiative, or that follow the Free Software Definition:. If systemd is desired, please consult the systemd article.
It contains instructions equivalent to the instructions in the following sections of this Handbook. Specifically, it will walk the reader through various init system commands systemctl and systemd-specific services such as timedatectl , hostnamectl , etc. Select the timezone for the system. Later, when systemd is running, we can configure the timezone and related settings with the timedatectl command. Locales specify not only the language that the user should use to interact with the system, but also the rules for sorting strings, displaying dates and times, etc.
Locales are case sensitive and must be represented exactly as described. The next step is to run the locale-gen command. To verify that the selected locales are now available, run locale -a. Once done, it is now time to set the system-wide locale settings. Again we use eselect for this, now with the locale module. With eselect locale list , the available targets are displayed:. Setting the locale will avoid warnings and errors during kernel and software compilations later in the installation.
A full Localization guide to provide additional guidance through the locale selection process. Before getting to configuring kernel sections, it is beneficial to be aware that some devices require additional firmware to be installed on the system before they will operate correctly. This is often the case for network interfaces, especially wireless network interfaces commonly used in both desktop and laptop computers.
Modern video chips from vendors like AMD, Nvidia, and Intel, often need external firmware files to be fully functional. On systems using graphics cards from these vendors, it is wise to emerge this firmware package in order to have it available before configuring and compiling the kernel.
In addition to discrete graphics hardware and network interfaces, CPUs also can require firmware updates. Typically this kind of firmware is referred to as microcode. Newer revisions of microcode are sometimes necessary to patch instability, security concerns, or other bugs in CPU hardware.
See the Microcode article for more information on how to apply microcode updates. Manual configuration is explained as the default choice since it is the best way to optimize an environment. The core around which all distributions are built is the Linux kernel. It is the layer between the user programs and the system hardware. Gentoo provides its users several possible kernel sources. A full listing with description is available at the Kernel overview page.
Choose an appropriate kernel source and install it using emerge :. However, this symbolic link will not be created by default. An easy way to create the symbolic link is to utilize eselect's kernel module.
In order to create a symbolic link called linux , use:. Manually configuring a kernel is often seen as the most difficult procedure a Linux user ever has to perform.
Nothing is less true - after configuring a couple of kernels no one remembers that it was difficult! However, one thing is true: it is vital to know the system when a kernel is configured manually.
Another source of system information is to run lsmod to see what kernel modules the installation CD uses as it might provide a nice hint on what to enable. Now go to the kernel source directory and execute make menuconfig. This will fire up menu-driven configuration screen. The Linux kernel configuration has many, many sections.
Let's first list some options that must be activated otherwise Gentoo will not function, or not function properly without additional tweaks. We also have a Gentoo kernel configuration guide on the Gentoo wiki that might help out further. These ensure that a minimum of kernel features required for proper functioning is available:.
Naturally the choice in the last two lines depends on the selected init system OpenRC vs. It does not hurt to have support for both init systems enabled.
Enabling support is possible, but goes beyond the scope of the handbook. Make sure that every driver that is vital to the booting of the system such as SCSI controller, etc. Next select the exact processor type. It is also recommended to enable MCE features if available so that users are able to be notified of any hardware problems.
Now go to File Systems and select support for the filesystems that will be used by the system. Do not compile the file system that is used for the root filesystem as module, otherwise the system may not be able to mount the partition.
The two compression options won't harm but are not definitely needed, neither does the PPP over Ethernet option, that might only be used by ppp when configured to do kernel mode PPPoE. With the configuration now done, it is time to compile and install the kernel. Exit the configuration and start the compilation process:. This is handled by the make install command:. In certain cases it is necessary to build an initramfs - an initial ram-based file system. With an initramfs, these partitions can be mounted using the tools available inside the initramfs.
Without an initramfs, there is a huge risk that the system will not boot up properly as the tools that are responsible for mounting the file systems need information that resides on those file systems. An initramfs will pull in the necessary files into an archive which is used right after the kernel boots, but before the control is handed over to the init tool.
Scripts on the initramfs will then make sure that the partitions are properly mounted before the system continues booting. See genkernel --help for more information. The resulting file can be found by simply listing the files starting with initramfs :.
If a manual configuration looks too daunting, then consider using genkernel. It will configure and build the kernel automatically.
This means that when genkernel is used to build the kernel, the system will generally detect all hardware at boot-time, just like the installation CD does. Because genkernel doesn't require any manual kernel configuration, it is an ideal solution for those users who may not be comfortable compiling their own kernels.
Note that genkernel does not automatically generate a custom kernel configuration the hardware on which it is being run. Now, let's see how to use genkernel. This would make the entry in the file look like so:. Now, compile the kernel sources by running genkernel all. Be aware though, as genkernel compiles a kernel that supports almost all hardware, this compilation will take quite a while to finish! Once genkernel completes, a kernel, full set of modules and initial ram disk initramfs will be created.
We will use the kernel and initrd when configuring a boot loader later in this document. Write down the names of the kernel and initrd as this information is used when the boot loader configuration file is edited. The initrd will be started immediately after booting to perform hardware autodetection just like on the installation CD before the "real" system starts up.
Distribution Kernels are ebuilds that cover the complete process of unpacking, configuring, compiling, and installing the kernel. The primary advantage of this method is that the kernels are upgraded to new versions as part of world upgrade without a need for manual action. There are other methods available to customize the kernel config such as config snippets.
Before using the distribution kernels, please verify that the correct installkernel package for the system is installed. When using systemd-boot formerly gummiboot , install:. If in doubt:. System administrators who want to avoid compiling the kernel sources locally can instead use precompiled kernel images:.
Once the kernel is installed, the package manager will automatically upgrade it to newer versions. The previous versions will be kept until the package manager is requested to clean up stale packages. Please remember to periodically run:. Distribution kernels are now capable of rebuilding kernel modules installed by other packages.
To view all available modules, run the following find command. For instance, to automatically load the 3c59x. The actual file name is insignificant to the loader. Continue the installation with Configuring the system. This file contains the mount points of those partitions where they are seen in the file system structure , how they should be mounted and with what special options automatically or not, whether users can mount them or not, etc.
Every line consists of six fields, separated by whitespace space s , tabs or a mixture. Each field has its own meaning:. Partition labels and partition UUIDs can be used to identify the block device's individual partition s , regardless of what filesystem has been chosen for the partition itself. While not always true for partition labels, using a UUID to identify a partition in fstab provides a guarantee that the bootloader will not be confused when looking for a certain volume, even if the filesystem would be changed in the future.
The naming for block device files depends on a number of factors, including how and in what order the disks are attached to the system. They also could show up in a different order depending on which of the devices are detected by the kernel first during the early boot process. With this being stated, unless one intends to constantly fiddle with the disk ordering, using default block device files is a simple and straightforward approach.
This is just an example, and should be modified according to the partitioning decisions made earlier in the installation. It needs to be checked during boot, so we would write down:. Those people should substitute defaults with noauto. This does mean that those users will need to manually mount this partition every time they want to use it. Add the rules that match the previously decided partitioning scheme and append rules for devices such as CD-ROM drive s , and of course, if other partitions or drives are used, for those too.
When auto is used in the third field, it makes the mount command guess what the filesystem would be. This is recommended for removable media as they can be created with one of many filesystems.
The user option in the fourth field makes it possible for non-root users to mount the CD. To improve performance, most users would want to add the noatime mount option, which results in a faster system since access times aren't registered those are not needed generally anyway. This is also recommended for solid state drive SSD users, who should also enable the discard mount option ext4 and btrfs only for now which makes the TRIM command work.
This seems to be quite easy, but lots of users are having difficulties finding the appropriate name for their Linux PC.
To speed things up, know that the decision is not final - it can be changed afterwards. In the examples below, the hostname tux is used within the domain homenetwork. During the Gentoo Linux installation, networking was already configured. However, that was for the installation CD itself and not for the installed environment. Right now, the network configuration is made for the installed Gentoo Linux system.
It uses a straightforward yet perhaps not intuitive syntax. But don't fear, everything is explained below. DHCP is used by default. This is described later in Installing Necessary System Tools.
If the system has several network interfaces, then the appropriate net. If after booting the system we find out that the assumption about the network interface name which is currently documented as eth0 was wrong, then execute the following steps to rectify this:.
Next inform Linux about the network environment. Set the root password using the passwd command. The root Linux account is an all-powerful account, so pick a strong password.
Later an additional regular user account will be created for daily operations. Review the settings and change where needed. Edit it to configure and select the right keyboard. Take special care with the keymap variable. If the wrong keymap is selected, then weird results will come up when typing on the keyboard.
Edit it according to personal preference. Otherwise the system might show clock skew behavior. Some tools are missing from the stage3 archive because several packages provide the same functionality. It is now up to the user to choose which ones to install. The first tool to decide on has to provide logging facilities for the system. Unix and Linux have an excellent history of logging capabilities - if needed, everything that happens on the system can be logged in log files. This happens through the system logger.
Others are available through Portage as well - the number of available packages increases on a daily basis. To install the system logger of choice, emerge it and have it added to the default runlevel using rc-update. Next is the cron daemon. Although it is optional and not required for every system, it is wise to install one.
A cron daemon executes scheduled commands. It is very handy if some command needs to be executed regularly for instance daily, weekly or monthly. Installing one of them is similar to installing a system logger. To be able to access the system remotely after installation, add the sshd init script to the default runlevel:.
Depending on the filesystems used, it is necessary to install the required file system utilities for checking the filesystem integrity, creating additional file systems etc. If there is no need for any additional networking tools, continue immediately with the section on Configuring a bootloader. In order for the system to automatically obtain an IP address for one or more network interface s using netifrc scripts, it is necessary to install a DHCP client.
More information on dhcpcd can be found in the dhcpcd article. Now continue with Configuring the bootloader. With the Linux kernel configured, system tools installed and configuration files edited, it is time to install the last important piece of a Linux installation: the boot loader.
The boot loader is responsible for firing up the Linux kernel upon boot - without it, the system would not know how to proceed when the power button has been pressed. In this section of the Handbook a delineation has been made between emerging the boot loader's package and installing a boot loader to a system disk.
Here the term emerge will be used to ask Portage to make the software package available to the system. The term install will signify the boot loader copying files or physically modifying appropriate sections of the system's disk drive in order to render the boot loader activated and ready to operate on the next power cycle.
With a small amount of configuration, necessary before build time, GRUB2 can support more than a half a dozen additional platforms. The GRUB installer can perform this operation automatically with the --removable option. Verify the ESP is mounted before running the following commands. This creates the default directory defined by the UEFI specification, and then copies the grubx To generate the final GRUB2 configuration, run the grub-mkconfig command:.
The output of the command must mention that at least one Linux image is found, as those are needed to boot the system. If an initramfs is used or genkernel was used to build the kernel, the correct initrd image should be detected as well. If the files are indeed missing, go back to the kernel configuration and installation instructions.
However, it lacks features when compared to GRUB. Of course, it is also used because some people know LILO and want to stick with it. Either way, Gentoo supports both bootloaders.
In the configuration file, sections are used to refer to the bootable kernel. Make sure that the kernel files with kernel version and initramfs files are known, as they need to be referred to in this configuration file.
If an initramfs is necessary, then change the configuration by referring to this initramfs file and telling the initramfs where the root device is located:. If additional options need to be passed to the kernel, use an append statement. For instance, to add the video statement to enable framebuffer:. Users that used genkernel should know that their kernels use the same boot options as is used for the installation CD.
For instance, if SCSI device support needs to be enabled, add doscsi as kernel option. Such systems do not need to have additional also known as secondary bootloaders like GRUB2 in order to help boot the system. Using efibootmgr is really for those who desire to take a minimalist although more rigid approach to booting their system; using GRUB2 see above is easier for the majority of users because it offers a flexible approach when booting UEFI systems.
Be sure to read through the EFI stub kernel article before continuing. The kernel must have specific options enabled to be directly bootable by the system's UEFI firmware.
It might be necessary to recompile the kernel. It is also a good idea to take a look at the efibootmgr article.
With these changes done, when the system reboots, a boot entry called "Gentoo" will be available. Syslinux is yet another bootloader alternative for the amd64 architecture. It supports MBR and, as of version 6. PXE network boot and lesser-known options are also supported. Although Syslinux is a popular bootloader for many it is unsupported by the Handbook.
Readers can find information on emerging and then installing this bootloader in the Syslinux article. Minimal Installation CD , Stage 3.
If you are unsure what you need to download, please refer to the Gentoo Handbook for the complete installation documentation. It explains how you can find the right architecture for your machine and which files you need at what stage of the installation process.
If you want to use the musl stages, you must add the musl overlay to your installation. Instructions how to do this can be found on the page of the Hardened musl project. The ia64 architecture is intended for use on Intel Itanium processors only. Stage 3. The lp64d stages can be used on all bit RISC-V processors supporting the double-precision floating point instruction set. The lp64 stages can be used on all bit RISC-V processors; they require no hardware support for floating point arithmetics.
For an overview of the different instruction sets, see, e. For all other experimental downloads including for the mips architecture , please refer to the complete experimental downloads archive.
Downloads Gentoo Linux is available free over the Internet. What should I download? What do I do with these files?
0コメント