Be patient! The remainder of this document explains how to setup a vfat partition that is writable using the syslinux bootloader instead of isolinux. An example partitioning scheme can be seen below:. The files need to be reordered since syslinux will be used as the bootloader instead of isolinux :.
Adjust the syslinux configuration file using sed as shown below. The slowusb parameter will introduce some extra delays before attempting to mount the filesystem. This is needed to allow the USB drive to settle upon detection. Finally install the syslinux bootloader on the USB drive:. Rufus is a free and open source project created to write images to USB drives, with a variety of operating systems.
It tends to be faster than the Universal USB installer see in the next section. Rufus can be downloaded from the project's homepage. Rufus is easy to use and should be mostly self explanatory. Type "a", then enter "1". This will set the "bootable" flag for this partition, which tells the machine which partition to boot. Now we will make the swap partition. The swap partition is used by the Operating System to store temporary files it needs to run properly.
It will also be used when the computer hibernates, or crashes. There is some debate about how large the swap partition should be, but a good rule of thumb is 2x the amount of RAM your system uses. Create another partition by entering "n", then enter "2". Enter "t", then "3". This will set the type of the partition to Linux Swap. Finally, we will create the root partition. This is where the Gentoo system and all of your data will be stored.
Create this partition by entering "n", then "3", then hit enter twice. This will select the default first and last sector, which will, by default, use the remainder of the space on the disk. Enter "p" at the prompt once more, to print out the list of partitions. This should print out a list with three partitions.
Double check the sizes, types, and which partition has the bootable flag. When you are sure that everything is good, enter "w" to write these changes to the disk and to exit the fdisk program.
Now we need to format the partitions. Currently, the disk has empty partitions that the system cannot use. By formatting them, we set each partition up so that the Gentoo system will be able to work with them. The boot partition will be formatted with the EXT2 file system. The swap partition will be formatted with a swap file system. The root partition will be formatted with the EXT4 file system. These are typical choices, but there are more options that you can research.
Run the following commands:. Now that the file systems are set-up on the partitons, we want to mount the partitions and begin installing Gentoo onto the disk.
To mount them, run:. This is where our boot partition will go, so we mount it there. We are now ready to begin installing Gentoo! The first thing that we want to do is check the date on the machine. Some parts of the installation rely on the date being correct, and may produce strange results, otherwise. Check the date by executing in the terminal:. To change the date, execute, replacing each of the letters in the date code with their correct values March 29th, in the year would be :.
Once the date is correct, run the following commands to download a copy of the latest stage3 tarball:. This will open a very basic web browser, that will allow you to navigate a website using the arrow keys, spacebar, and enter. The first thing we will do is select a mirror from the list on the page.
These subdirectories may vary by mirror, but should be similar and simple enough to navigate. Find a list containing a "stage3-amdxxxxxxxx. Select the file to download it to your current directory in the terminal. You can quit out of links by typing "q". Once it is finished downloading, you must unpack the tarball archive, which contains enough of the basic Gentoo system to allow us to install the rest.
Unpack it by running:. If the drive is empty, try installing Windows before installing Linux. It is strongly recommended to disable "Fast Startup", aka "hybrid shutdown" or "hybrid boot" in Windows. Without it, Windows' filesystems are not unmounted even when you're using Linux, so editing Windows files can result in data loss. To disable Fast Startup, see here for Windows 8 and here for Windows If you are using BitLocker to encrypt your windows volumes, you need to decide if you want to keep using it.
It is possible to keep using BitLocker, have the drives auto-unlock, and access its contents from Gentoo, but additional steps should be taken.
You can avoid all the hassle by disabling BitLocker and decrypting your volumes. Search for your drive, and click on Turn off BitLocker. Your drives will begin decrypting, witch will take a while. If you want to keep using BitLocker, you need a little understanding on how it works. Basically, it uses your computer TPM to store the decryption keys of you C volume, which in turn contains the keys for the rest of the volumes, if presents.
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. It's recommended to run systemd-firstboot --prompt --setup-machine-id to ensure the system is setup correctly, but the necessary steps can be run individually too.
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. On OpenRC, add it 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, sshd must be configured to start on boot. To add the sshd init script to the default runlevel on OpenRC:. If serial console access is needed which is possible in case of remote servers , agetty must be configured. 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 networking was previously configured in the Configuring the system step and network setup is complete, then this 'networking tools' section can be safely skipped. In this case, proceed 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. Exit the chrooted environment and unmount all mounted partitions. Then type in that one magical command that initiates the final, true test: reboot.
Do not forget to remove the bootable CD, otherwise the CD might be booted again instead of the new Gentoo system. Once rebooted in the freshly installed Gentoo environment, finish up with Finalizing the Gentoo installation. Therefore it is strongly recommended to add a user for day-to-day use.
The groups the user is member of define what activities the user can perform. The following table lists a number of important groups:. For instance, to create a user called larry who is member of the wheel , users , and audio groups, log in as root first only root can create users and run useradd :.
If a user ever needs to perform some task as root, they can use su - to temporarily receive root privileges. With the Gentoo installation finished and the system rebooted, if everything has gone well, we can now remove the downloaded stage3 tarball from the hard disk.
Not sure where to go from here? There are many paths to explore Gentoo provides its users with lots of possibilities and therefore has lots of documented and less documented features to explore here on the wiki and on other Gentoo related sub-domains see the Gentoo online section below. It is important to note that, due to the number of choices available in Gentoo, the documentation provided by the handbook is limited in scope - it mainly focuses on the basics of getting a Gentoo system up and running and basic system management activities.
The handbook intentionally excludes instructions on graphical environments, details on hardening, and other important administrative tasks. That being stated, there are more sections of the handbook to assist readers with more basic functions. Readers should definitely take a look at the next part of the handbook entitled Working with Gentoo which explains how to keep the software up to date, install additional software packages, details on USE flags, the OpenRC init system, and various other informative topics relating to managing a Gentoo system post-installation.
Apart from the handbook, readers should also feel encouraged to explore other corners of the Gentoo wiki to find additional, community-provided documentation.
The Gentoo wiki team also offers a documentation topic overview which lists a selection of wiki articles by category. For instance, it refers to the localization guide to make a system feel more at home particularly useful for users who speak English as a second language. The majority of users with desktop use cases will setup graphical environments in which to work natively.
There are many community maintained 'meta' articles for supported desktop environments DEs and window managers WMs. Readers should be aware that each DE will require slightly different setup steps, which will lengthen add complexity to bootstrapping. Many other Meta articles exist to provide our readers with high level overviews of available software within Gentoo. With the exception of the Libera. Chat hosted internet relay chat IRC network and the mailing lists, most Gentoo websites require an account on a per site basis in order to ask questions, open a discussion, or enter a bug.
Every user is welcome on our Gentoo forums or on one of our internet relay chat channels. It is easy to search for the forums to see if an issue experienced on a fresh Gentoo install has been discovered in the past and resolved after some feedback. The likelihood of other users experiencing the installation issues by first-time Gentoo can be surprising. It is advised users search the forums and the wiki before asking for assistance in Gentoo support channels.
Several mailing lists are available to the community members who prefer to ask for support or feedback over email rather than create a user account on the forums or IRC. Users will need to follow the instructions in order to subscribe to specific mailing lists.
Sometimes after reviewing the wiki, searching the forums, and seeking support in the IRC channel or mailing lists there is no known solution to a problem. Generally this is a sign to open a bug on Gentoo's Bugzilla site. Readers who desire to learn more about developing Gentoo can take a look at the Development guide. This guide provides instructions on writing ebuilds, working with eclasses, and provides definitions for many general concepts behind Gentoo development. Gentoo is a robust, flexible, and excellently maintained distribution.
The developer community is happy to hear feedback on how to make Gentoo an even better distribution. As a reminder, any feedback for this handbook should follow the guidelines detailed in the How do I improve the Handbook? We look forward to seeing how our users will choose to implement Gentoo to fit their unique use cases and needs. Note For help on the other installation approaches, including using non-Gentoo bootable media, please read our Alternative installation guide.
Note Some target architectures such as arm , mips , and s will not have minimal install CDs. At this time the Gentoo Release Engineering project does not support building. Note This is an optional step and not necessary to install Gentoo Linux. However, it is recommended as it ensures that the downloaded file is not corrupt and has indeed been provided by the Gentoo Infrastructure team.
Important This does not verify that the. That also implies that the checksum should be verified against the values in the. Note In all likelihood, the default gentoo kernel, as mentioned above, without specifying any of the optional parameters will work just fine. For boot troubleshooting and expert options, continue on with this section. Otherwise, just press Enter and skip ahead to Extra hardware configuration.
They can be switched by pressing Alt then a function key between F1 - F7. It can be useful to switch to a new terminal when waiting for job to complete, to open documentation, etc. 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. Tip If no interfaces are displayed when the standard ifconfig command is used, try using the same command with the -a option. This option forces the utility to show all network interfaces detected by the system whether they be in an up or down state. If ifconfig -a produces no results then the hardware is faulty or the driver for the interface has not been loaded into the kernel.
Both situations reach beyond the scope of this Handbook. Contact gentoo webchat for support. Note Support for the iw command might be architecture-specific. Note Some wireless cards may have a device name of wlan0 or ra0 instead of wlp9s0.
Run ip link to determine the correct device name. For more information on configuring wireless networking in Gentoo Linux, please read the Wireless networking chapter in the Gentoo Handbook. Note If the IP address, broadcast address, netmask and nameservers are known, then skip this subsection and continue with Using ifconfig and route.
In this section, the focus is on IPv4 addresses. CODE Broadcast address. Important Although still supported by most motherboard manufacturers, MBR boot sectors and their associated partitioning limitations are considered legacy. Readers who must proceed with setup type should knowingly acknowledge the following information: Most post motherboards consider using MBR boot sectors a legacy supported, but not ideal boot mode.
Due to using bit identifiers, partition tables in the MBR cannot address storage space that is larger than 2 TiBs in size. Unless a extended partition is created, MBR supports a maximum of four partitions. This setup does not provide a backup boot sector, so if something overwrites the partition table, all partition information will be lost.
Command m for help : p. Command m for help : g. Command m for help : d. Command m for help : n. Command m for help : t. Command m for help : w. Command m for help : o. Important Some motherboards do not include a Real-Time Clock RTC , which will keep relatively accurate time even while the system is powered off. It is very important for these systems to automatically sync the system clock with a time server at every system start and on a regular internal thereafter.
This is just as important for systems that do include a RTC, but have a failed battery. Warning Automatic time sync comes at a price. It will reveal the system's IP address and related network information to a time server in the case of the example below ntp. Users with privacy concerns should be aware of this before setting the system clock using the below method.
Warning Readers who are just starting out with Gentoo should not choose a no-multilib tarball unless it is absolutely necessary.
Migrating from a no-multilib to a multilib system requires an extremely well-working knowledge of Gentoo and the lower-level toolchain it may even cause our Toolchain developers to shudder a little. It is not for the faint of heart and is beyond the scope of this guide.
Note It is technically possible to switch a running Gentoo installation from OpenRC to systemd and back. However, switching requires some effort and is outside the scope of this installation manual. Before downloading a stage tarball, decide whether OpenRC or systemd will be used as the target init system and download the relevant stage tarball. Note Most stages are now explicitly suffixed with the init system type openrc or systemd , although some architectures may still be missing these for now.
Note Technically variables can be exported via the shell 's profile or rc files, however that is not best practice for basic system administration. Additional documentation on make. For a successful Gentoo installation only the variables that are mentioned below need to be set. Tip Although the GCC optimization article has more information on how the various compilation options can affect a system, the Safe CFLAGS article may be a more practical place for beginners to start optimizing their systems.
Warning Using a large number of jobs can significantly impact memory consumption. To avoid running out of memory, lower the number of jobs to fit the available memory. Tip When using parallel emerges --jobs , the effective number of jobs run can grow exponentially up to make jobs multiplied by emerge jobs. This can be worked around by running a localhost-only distcc configuration that will limit the number of compiler instances per host.
Tip For those interested, the official specification for Portage's plug-in sync API can be found in the Portage project's Sync article. Note The --make-rslave operations are needed for systemd support later in the installation. Warning When using non-Gentoo installation media, this might not be sufficient. Tip If the Gentoo installation is interrupted anywhere after this point, it should be possible to 'resume' the installation at this step. There is no need to repartition the disks again!
Simply mount the root partition and run the steps above starting with copying the DNS info to re-enter the working environment. This is also useful for fixing bootloader issues.
More information can be found in the chroot article. This is to be expected and nothing to worry about - the tool will create the location. Note The output of the command is just an example and evolves over time. Note If you are using systemd, please make sure the profile name contains systemd. If you are using OpenRC, please make sure the profile name does not contain systemd. Warning Profile upgrades are not to be taken lightly.
When selecting the initial profile, make sure to use profile corresponding to the same version as the one initially used by stage3 e. Each new profile version is announced through a news item containing migration instructions. Make sure to read it and follow them before switching to a newer profile. Note The developer subprofile is specifically for Gentoo Linux development and is not meant to be used by casual users. Tip If a full scale desktop environment profile has been selected this process could greatly extend the amount of time necessary for the install process.
Those in a time crunch can work by this 'rule of thumb': the shorter the profile name, the less specific the system's world set ; the less specific the world set, the fewer packages the system will require. Note The above example is truncated, the actual list of USE values is much, much larger. Ebuild developers choose certain default USE flag values in ebuilds in order to prevent conflicts, enhance security, and avoid errors, and other reasons.
Disabling all USE flags will negate default behavior and may cause major issues.
0コメント