Difference between revisions of "Install"

From Funtoo
Jump to navigation Jump to search
(Redirected page to Install/Introduction)
Tag: New redirect
 
(31 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{#widget:AddThis}}
#REDIRECT [[Install/Introduction]]
= Install Funtoo Linux =
__NOTITLE__
<languages/>
{{Announce|To help us translate this documentation, {{CreateAccount}}, log in to the wiki. Then go to Actions -> Translate in the menu, or click the "Translate this page" link, above. You will be able to select small parts of the install docs and translate these parts to your native language.}}
<translate>
== Introduction == <!--T:2--> 
 
<!--T:3-->
This document was written to help you install Funtoo Linux on PC-compatible systems, while keeping distracting options regarding system configuration to a minimum.
 
<!--T:4-->
If you've had previous experience installing Gentoo Linux then a lot of steps will be familiar, but you should still read through as there are a few differences. If you're new to installing a Gentoo-based Linux, or new to Linux entirely -- welcome! We have attempted to make these installation instructions understandable to new users as well.
 
<!--T:5-->
{{Note|If you are installing Funtoo Linux on [[Funtoo Linux Installation on ARM|ARM]] architecture, please see [[Funtoo Linux Installation on ARM]] for notable differences regarding ARM support. }}
 
== Installation Overview == <!--T:6-->
 
<!--T:7-->
This is a basic overview of the Funtoo installation process:
 
<!--T:8-->
# [[#Live CD|Download and boot the live CD of your choice]].
# [[#Prepare Hard Disk|Prepare your disk]].
# [[#Creating filesystems|Create]] and [[#Mounting filesystems|mount]] filesystems.
# [[#Installing the Stage 3 tarball|Install the Funtoo stage tarball]] of your choice.
# [[#Chroot into Funtoo|Chroot into your new system]].
# [[#Downloading the Portage tree|Download the Portage tree]].
# [[#Configuring your system|Configure your system]] and [[#Configuring your network|network]].
# [[#Kernel|Install a kernel]].
# [[#Installing a Bootloader|Install a bootloader]].
# [[#Finishing Steps|Complete final steps]].
# [[#Restart your system|Reboot and enjoy]].
 
{{/Download LiveCD}}
 
=== Prepare Hard Disk === <!--T:25-->
 
<!--T:26-->
In this section, you will need to choose a disk format to use for booting and partitioning -- either MBR or UEFI/GPT. If you are not familiar with the differences between these options, please review our [[Install/Disk Formats|Disk Formats]] page for an overview of each option and the trade-offs. Generally, it's usually safe to pick the legacy MBR method for system disks under 2TB in size and most modern PC systems support MBR as well as UEFI booting.
 
==== But First... ====
 
Before doing anything to your disks, make sure you are partitioning the right one. Use the {{c|lsblk}} command to view a list of all block devices on your system, as well as partitions on these block devices:
 
{{console|body=
# ##i##lsblk
NAME          MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda            8:0    0  1.8T  0 disk
├─sda1          8:1    0  512M  0 part
├─sda2          8:2    0    8G  0 part [SWAP]
└─sda3          8:3    0  1.8T  0 part
  ├─main-root 254:0    0  500G  0 lvm  /
  └─main-data 254:1    0  1.3T  0 lvm  /home
}}
 
Make sure you will not be overwriting any important data and that you have chosen the correct {{c|/dev/sd?}} device. Above, you can see that {{c|sda}} contains three partitions, {{c|sda1}}, {{c|sda2}} and {{c|sda3}}, and that {{c|sda3}} contains LVM volumes.
 
Once you've double-checked your target block device and made sure you'll be partitioning the correct disk, proceed to the next step.
 
{{/MBR Partitioning}}
 
{{/GPT Partitioning}}
 
{{/Creating Filesystems}}
 
{{/Mounting Filesystems}}
 
{{/Setting the Date}}
 
{{/Download and Extract Stage3}}
 
{{/Chroot}}
 
{{/Download Portage Tree}}
 
{{/Configuration Files}}
 
{{/Introducing Portage}}
 
{{/Kernel}}
 
{{/Bootloader}}
 
=== Configuring your network === <!--T:196-->
 
<!--T:197-->
It's important to ensure that you will be able to connect to your local-area network after you reboot into Funtoo Linux. There are three approaches you can use for configuring your network: NetworkManager, dhcpcd, and the [[Funtoo Linux Networking]] scripts. Here's how to choose which one to use based on the type of network you want to set up.
 
==== Wi-Fi ==== <!--T:198-->
 
<!--T:232-->
For laptop/mobile systems where you will be using Wi-Fi, roaming, and connecting to various networks NetworkManager is strongly recommended. 
Since Wi-Fi cards require firmware to operate, it is also recommended that you emerge the linux-firmware ebuild:
 
<!--T:233-->
{{console|body=(chroot) # ##i##emerge linux-firmware networkmanager
}}
 
Depending on your architecture, you might now see a message similar to the following:
 
{{console|body=
The following USE changes are necessary to proceed
...
}}
This means that your USE flags need to be updated to allow this installation. For now, you can let portage handle this for you by adding the flag <code>--autounmask-write</code>:
{{console|body=(chroot) # ##i##emerge linux-firmware networkmanager --autounmask-write
}}
After this, update the config:
{{console|body=(chroot) # ##i##dispatch-conf
}}
Accept the new config by pressing <code>u</code>. Then, you can proceed to install NetworkManager:
 
{{console|body=(chroot) # ##i##emerge linux-firmware networkmanager
(chroot) ###i## rc-update add NetworkManager default
}}
The above command will ensure that NetworkManager starts after you boot into Funtoo Linux. Once you've completed these installation steps and have booted into Funtoo Linux, you can use the {{c|nmtui}} command (which has an easy-to-use console-based interface) to configure NetworkManager so that it will connect (and automatically reconnect, after reboot) to a Wi-Fi access point:
{{console|body=# ##i##nmtui}}
For more information about NetworkManager, see the [[Package:NetworkManager|NetworkManager package page]].
 
<!--T:234-->
{{Note|wpa_supplicant is also a good choice for wireless network connections. See the {{package|net-wireless/wpa_supplicant}} package for steps involved in setting up wpa_supplicant.}}
 
==== Desktop (Wired DHCP) ==== <!--T:200-->
 
<!--T:201-->
For a home desktop or workstation with wired Ethernet that will use DHCP, the simplest and most effective option to enable network connectivity is to simply add {{c|dhcpcd}} to the default runlevel:
 
<!--T:203-->
{{console|body=
(chroot) # ##i##rc-update add dhcpcd default}}
When you reboot, {{c|dhcpcd}} will run in the background and manage all network interfaces and use DHCP to acquire network addresses from a DHCP server.
 
<!--T:204-->
If your upstream DHCP server is dnsmasq, it can be configured to assign addresses via mac address to make servers on DHCP feasible.
 
==== Server (Static IP) ==== <!--T:205-->
 
<!--T:235-->
For servers, the [[Funtoo Linux Networking]] scripts are recommended. They are optimized for static configurations and things like virtual ethernet bridging for virtualization setups. See [[Funtoo Linux Networking]] for information on how to use Funtoo Linux's template-based network configuration system.
 
==== Hostname ==== <!--T:207-->
By default Funtoo uses "localhost" as hostname. Although the system will work perfectly fine using this name, some ebuilds refuse to install when detecting localhost as hostname. It also may create confusion if several systems use the same hostname. Therefore, it is advised to change it to a more meaningful name. The hostname itself is arbitrary, meaning you can choose almost any combination of characters, as long as it makes sense to the system administrator. To change the hostname, edit
 
<!--T:208-->
{{console|body=
(chroot) # ##i##nano /etc/conf.d/hostname
}}
 
<!--T:209-->
Look for the line starting with hostname and change the entry between the quotes. Save the file, on the next boot Funtoo will use the new hostname.
 
<!--T:210-->
{{warning|Do not use special characters in the hostname, as the shell may interpret these, leading to unpredictable results. Use the Latin alphabet: a-z, A-Z, 0-9}}
{{tip|Use short hostnames (up to 8 or 10 characters) to prevent the terminal screen being filled with the hostname, leaving little space for the command itself. This become particularly poignant when coding long command strings in various programming languages like Bash, Python, SQL and Perl}}
 
=== Finishing Steps === <!--T:211-->
==== Set your root password ====
It's imperative that you set your root password before rebooting so that you can log in.
<console>
(chroot) # ##i##passwd
</console>
 
===Restart your system === <!--T:212-->
 
<!--T:213-->
Now is the time to leave chroot, to unmount Funtoo Linux partitions and files and to restart your computer. When you restart, the GRUB boot loader will start, load the Linux kernel and initramfs, and your system will begin booting.
 
<!--T:214-->
Leave the chroot, change directory to /mnt, unmount your Funtoo partitions, and reboot.
<console>
(chroot) # ##i##exit
# ##i##cd /mnt
# ##i##umount -lR funtoo
# ##i##reboot
</console>
 
<!--T:215-->
{{fancynote|System Rescue CD will gracefully unmount your new Funtoo filesystems as part of its normal shutdown sequence.}}
 
<!--T:216-->
You should now see your system reboot, the GRUB boot loader appear for a few seconds, and then see the Linux kernel and initramfs loading. After this, you should see Funtoo Linux itself start to boot, and you should be greeted with a <code>login:</code> prompt. Funtoo Linux has been successfully installed!
 
=== Profiles === <!--T:217-->
 
<!--T:218-->
Once you have rebooted into Funtoo Linux, you can further customize your system to your needs by using [[Funtoo Profiles]]. A quick introduction to profiles is included below -- consult the [[Funtoo Profiles]] page for more detailed information. There are five basic profile types: arch, build, subarch, flavors and mix-ins:
 
<!--T:220-->
{{TableStart}}
{{2ColHead|Sub-Profile Type|Description}}
{{2Col|{{c|arch}}|Typically {{c|x86-32bit}} or {{c|x86-64bit}}, this defines the processor type and support of your system. This is defined when your stage was built and should not be changed.}}
{{2Col|{{c|build}}|Defines whether your system is a {{c|current}}, {{c|stable}} or {{c|experimental}} build. {{c|current}} systems will have newer packages unmasked than {{c|stable}} systems. This is defined when your stage is built and is typically not changed.}}
{{2Col|{{c|subarch}}|Defines CPU optimizations for your system. The subarch is set at the time the stage3 is built, but can be changed later to better settings if necessary. Be sure to pick a setting that is compatible with your CPU.}}
{{2Col|{{c|flavor}}|Defines the general type of system, such as {{c|server}} or {{c|desktop}}, and will set default USE flags appropriate for your needs.}}
{{2Col|{{c|mix-ins}}|Defines various optional settings that you may be interested in enabling.}}
{{TableEnd}}
 
<!--T:221-->
One arch, build and flavor must be set for each Funtoo Linux system, while mix-ins are optional and you can enable more than one if desired. Often, flavors and mix-ins inherit settings from other sub-profiles. Use {{c|epro show}} to view your current profile settings, in addition to any inheritance information:</translate>
{{console|body=
(chroot) # ##i## epro show
 
=== ##g##Enabled Profiles##!g##: ===
 
        arch: ##c## x86-64bit
      build: ##c## current
    subarch: ##c## intel64-haswell
      flavor: ##c## desktop
    mix-ins: ##c## gnome
 
 
=== ##g##All inherited flavors from desktop flavor##!g##: ===
 
                    ##c##workstation##!c## (from desktop flavor)
                            ##c##core##!c## (from workstation flavor)
                        ##c##minimal##!c## (from core flavor)
 
=== ##g##All inherited mix-ins from desktop flavor##!g##: ===
 
                              ##c##X##!c## (from workstation flavor)
                          ##c##audio##!c## (from workstation flavor)
                            ##c##dvd##!c## (from workstation flavor)
                          ##c##media##!c## (from workstation flavor)
      ##c##mediadevice-audio-consumer##!c## (from media mix-in)
                ##c##mediadevice-base##!c## (from mediadevice-audio-consumer mix-in)
      ##c##mediadevice-video-consumer##!c## (from media mix-in)
                ##c##mediadevice-base##!c## (from mediadevice-video-consumer mix-in)
        ##c##mediaformat-audio-common##!c## (from media mix-in)
          ##c##mediaformat-gfx-common##!c## (from media mix-in)
        ##c##mediaformat-video-common##!c## (from media mix-in)
                  ##c##console-extras##!c## (from workstation flavor)
                          ##c##print##!c## (from desktop flavor)
}}
<translate>
<!--T:223-->
Here are some basic examples of {{c|epro}} usage:
{{TableStart}}
{{2ColHead|Description|Command}}
{{2Col|View available profiles. Enabled profiles will be highlighted in cyan. Directly enabled profiles will be in bold and have a {{c|*}} appended.|{{c|epro list}}}}
{{2Col|Change the system flavor.|{{c|epro flavor desktop}}}}
{{2Col|Add a mix-in.|{{c|epro mix-in +gnome}}}}
{{TableEnd}}
 
===Kits=== <!--T:232-->
 
<!--T:233-->
Funtoo now provides sets of packages that are know to work in what we call kits.
 
===Next Steps=== <!--T:228-->
 
<!--T:229-->
If you are brand new to Funtoo Linux and Gentoo Linux, please check out [[Funtoo Linux First Steps]], which will help get you acquainted with your new system. You may also be interested in the following resources:
 
* [[ZFS]] - a quick and easy HOWTO on how to get ZFS set up under Funtoo Linux.
* [[:Category:Official Documentation|official documentation]], which includes all docs that we officially maintain for installation and operation of Funtoo Linux.
 
<!--T:230-->
We also have a number of pages dedicated to setting up your system. See [[:Category:First Steps|First Steps]] for a list of these pages.
 
<!--T:231-->
If your system did not boot correctly, see [[Installation Troubleshooting]] for steps you can take to resolve the problem.
 
[[Category:HOWTO]]
[[Category:Install]]
[[Category:Official Documentation]]
</translate>

Latest revision as of 04:12, November 21, 2021