The Funtoo Linux project has transitioned to "Hobby Mode" and this wiki is now read-only.
Difference between revisions of "Install/ko"
(Created page with "* 스왑 공간으로 사용될 {{c|/dev/sda2}}") |
|||
Line 271: | Line 271: | ||
* {{c|/boot}}로 잡기 위해 사용될 {{c|/dev/sda1}} | * {{c|/boot}}로 잡기 위해 사용될 {{c|/dev/sda1}} | ||
* {{c|/dev/sda2}} | * 스왑 공간으로 사용될 {{c|/dev/sda2}} | ||
* {{c|/dev/sda3}}, which will hold your root filesystem. | * {{c|/dev/sda3}}, which will hold your root filesystem. |
Revision as of 12:42, July 25, 2018
Install Funtoo Linux
소개
이 문서는 복잡한 시스템 설정을 최소하하면서 여러분이 펀투 리눅스를 PC 호환 시스템에 설치하는 것을 돕기 위해 쓰여졌습니다.
만약 젠투 리눅스를 설치한 경험이 있다면 많은 단계들이 친숙할 겁니다. 하지만, 몇몇 차이점들이 존재하기 때문에 쭉 읽는 것을 권합니다. 만약 젠투 기반 리눅스, 혹은 리눅스 자체가 처음이시라면... 잘 오셨습니다! 우리는 새로운 사용자도 이 설치 문서를 이해할 수 있도록 노력했습니다.
만약 펀투 리눅스를 ARM 아키텍쳐에 설치할 예정이라면, ARM 지원에 관해 ARM에 펀투 리눅스 설치하기 문서를 읽어주세요.
설치 개요
펀투 리눅스 설치 과정에 대한 기본적인 개요입니다.
- Live CD를 골라 다운로드하고 부팅하기
- 하드디스크 준비하기
- 파일시스템을 생성하고 마운트하기
- 펀투 Stage tarball을 골라 설치하기
- 새 시스템으로 루트 디렉토리 변경하기
- Portage tree 다운로드하기
- 시스템과 네트워크 설정하기
- 커널 설치하기
- 부트로더 설치하기
- 설치 마무리하기
- 재부팅하고 사용하기
Live CD
펀투 리눅스를 설치하기 위해, 여러분은 먼저 리눅스 기반의 Live CD나 USB로 부팅해야 합니다. 젠투 기반의 시스템 복구 CD는 32비트와 64비트 시스템을 모두 지원하고 많은 도구들을 포함하고 있습니다. 때문에 우리는 이를 추천합니다. CD/DVD에 굽거나 USB에 설치가 가능하고 아래에서 다운로드 받을 수 있습니다.
비디오 없음: 시스템 복구 CD는 UEFI로 부팅할 때 비디오를 제대로 초기화하지 못할 수 있습니다 (FL-2030 참고). 이런 경우, 시스템 복구 CD의 GRUB 메뉴에서 e
를 눌러 메뉴 엔트리를 편집하고 insmod all_video
를 GRUB boot line에 추가하여 부팅해야 합니다. 이 버그는 시스템 복구 CD 개발자들에게 보고되었습니다.
If using an older version of System Rescue CD, be sure to select the rescue64
kernel at the boot menu if you are installing a 64-bit system. By default, System Rescue CD used to boot in 32-bit mode though the latest version attempts to automatically detect 64-bit processors.
네트워크 접속
펀투 리눅스를 설치하는 데에는 인터넷 접속이 반드시 필요합니다. 따라서, 일단 시스텐 복구 CD로 부팅하고 나면, 인터넷 접속 여부를 확인해야 합시다.
root # ping www.google.com PING www.google.com (216.58.217.36) 56(84) bytes of data. 64 bytes from den03s10-in-f4.1e100.net (216.58.217.36): icmp_seq=1 ttl=57 time=30.1 ms
만약 ping이 성공적이라면 (위의 64 bytes
문구가 보인다면), 네트워크가 설정되어 있는 것입니다. Control-C를 눌러 ping을 멈춥시다.
만약 인터넷 접속에 와이파이 연결이 필요하다면, 시스템 복구 CD의 GUI 환경이 필요합니다. GUI 세션을 시작하기 위해 startx
를 실행해 줍시다.
root # startx
그리고 나서, NetworkManager applet (작업 표시줄 오른쪽에 있는 아이콘)를 이용해 와이파이 네트워크를 선택해줍니다. 다음으로 터미널을 열어줍니다. 이때, 남은 단계들을 마치는 동안 터미널이 사용 가능해야 합니다.
원격으로 설치하기
또다른 방법으로, 여러분은 다른 컴퓨터에서 원격으로 설치하기 위해 SSH를 통한 네트워크로 시스템 복구 CD에 로그인 할 수 있습니다. 그리고 이것은 펀투 리눅스를 설치하는 더 편한 방법일 수 있습니다.
만약 여러분이 설치를 원격으로 하고 싶다면, 방법을 알려드리겠습니다. 먼저, 여러분은 시스템 복구 CD가 네트워크 접속에 대한 기능을 가지고 있음을 확인해야 합니다. 그리고 나서, 여러분은 시스템 복구 CD에 대한 루트 비밀번호를 설정해야 합니다.
root # passwd New password: ******** Retype new password: ******** passwd: password updated successfully
일단 비밀번호를 입력하고 나면, 여러분은 시스템 복구 CD의 IP를 확인하고 ssh
를 통해 접속해야합니다. IP주소를 확인하기 위해서는 ifconfig
를 입력합니다.
root # ifconfig
하나의 인터페이스는 여러분으니 LAN으로부터 하나의 IP 주소를 (inet addr:
에 나열되어 있는 것처럼) 가져야 합니다. 이후 여러분의 LAN에 있는 시스템에서 시스템 복구 CD로 원격 접속하고 이미 존재하는 OS에서 편하게 단계들을 해나가면 됩니다. 여러분의 연격 시스템에서 시스템 복구 CD의 IP주소로 1.2.3.4
로 바꾸어 입력하도록 합시다. 리눅스나 맥OS 시스템에서 접속한다면 다음과 같이 나타날 겁니다.
(remote system) $ ssh root@1.2.3.4 Password: **********
만약 여러분이 윈도우 시스템에서 원격으로 접속하고 싶다면, PuTTY와 같은 SSH 클라이언트를 다운로드해야 합니다.
SSH를 통해 로그인한 후에는 시스템 복구 CD에 원격으로 접속하여 설치 단계를 해나갈 수 있습니다.
하드디스크 준비하기
이 문단에서는 하드디스크에서 펀투 리눅스로 부팅할 수 있는 다양한 방법에 대해 배울 것입니다. "부트"는 여러분의 데스크탑, 노트북이나 서버에 있는 전원 버튼을 눌렀을 때 리눅스가 시작하는 과정을 의미합니다. 여러분은 "부팅"을 여러분 컴퓨터의 펌웨어 (내장 소프트웨어)가 시작하는 과정으로, 그리고 리눅스 커널을 "찾고" 실행하는 과정으로 생각할 수 있습니다. 그 후 리눅스 커널로 넘어가고 여러분의 하드웨어를 인식한 뒤 시작하는 것입니다.
배경 지식
만약 여러분이 완전한 리눅스 초보라면, 그냥 무엇을 사용해야 합니까? 문단으로 건너 뛰는 것이 덜 혼란스러울 겁니다.
초기에는 PC 호환 컴퓨터를 부팅하는 방법이 단 하나였습니다. 모든 데스크탑과 서버는 "PC BIOS"라고 불리는 표준 펌웨어를 가지고 있었습니다. 그리고 모든 하드디스크는 리눅스를 실행할 수 있도록 하는 부트로더 코드(MBR)를 PC BIOS가 찾는 부분인 마스터 부트 레코드를 디스크의 시작에 사용하였습니다. 그리고 우리의 하드 드라이브는 표준 MBR 파티션 스키마를 사용하여 여러 부분으로 파티션되어 있었습니다. 이것이 작동했던 방법이고 우리는 이 방법을 좋아했습니다!
그후 부트 시스템을 위한 새로운 방식의 펌웨어인 EFI와 UEFI가 나타나고, 2.2TB보다 큰 다스크들에 파티션을 정의하기 위해 GPT 파티션 테이블이 생겼습니다. 갑자기 리눅스 시스템을 설치하고 부팅하는 다양한 옵션이 생겼고, 한 방법으로 모든 기기에 알맞은 접근 방식이었던 것은 훨씬 더 복잡한 무언가로 변하게 되었습니다.
하드 드라이브로 펀투 리눅스를 부팅하도록 설정하는 것에 여러분이 이용가능한 옵션들을 잠시 검토해 보도록 합시다. 이 설치 가이드는 구식인 BIOS 부팅과 MBR을 사용하고 또 권장합니다. 이 방법은 희귀한 경우들을 제외하면 대부분 잘 작동하고 보편적으로 지원됩니다. 이 방식으로 잘못될 것은 없습니다. 만약 여러분의 디스크 용량이 2TB 이하라면 여러분의 디스크 용량을 모두 사용할 수 있습니다.
하지만 구식 방법이 알맞지 않은 상황들이 존재합니다. 만약 여러분이 2TB가 넘는 시스템 디스크를 가지고 있다면 MBR 파티션은 여러분의 저장 장치를 완전히 사용하는 것을 막을 것입니다. 이것이 한가지 이유입니다. 또다른 이유는 UEFI로만 부팅할 수 있고 BIOS 부팅은 지원하지 않는 몇몇의 소위 "PC" 시스템들이 존재한다는 것입니다. 그래서, 이러한 곤경에 처한 사람들을 불쌍히 여기는 차원에서 이 설치 가이드는 UEFI 부팅에 대해서도 쓰여 있습니다.
우리는 특별한 이유가 없다면 구식 방법으로 진행하는 것을 권장합니다. 우리가 이 가이드에서 리눅스 커널을 부르기 위해 사용할 부트로더는 GRUB이라 불립니다. 그래서 우리는 이 방법을 BIOS + GRUB (MBR) 방법이라고 부릅니다. 이것은 리눅스로 부팅하기 위한 PC 호환 시스템의 전통적인 방법입니다.
만약 부팅하는 데 UEFI가 필요하다면, 몇몇 시스템에서는 지원하기는 하지만 다른 시스템에서는 지원하지 않기 때문에 MBR을 전혀 사용하지 않는 것을 추천합니다. 대신에, 우리는 우리는 리눅스를 부를 GRUB으로 부팅하기 위해 UEFI를 사용하는 것을 추천합니다. 우리는 이 방법을 UEFI + GRUB (GPT) 방법이라 부릅니다.
그리고 네, 훨씬 더 많은 방법들이 존재하고 그중 일부는 부팅 방법 문서에 적혀 있습니다. 우리는 BIOS + GRUB (GPT) 방법을 권하고는 했습니다만, 이 방법은 다양한 하드웨어에서 꾸준히 지원되지는 않습니다.
무엇을 사용해야 합니까?
중요한 질문... 여러분은 어떤 방법을 사용해야 할까요? 바로 여기에 그 답이 적혀있습니다.
- 법칙 1 - 구식 방법
- 만약 시스템 복구 CD로 확실히 부팅이 되었고, 처음에 밝은 파란색 메뉴가 보인다면, BIOS를 통해 CD로 부팅한 것입니다. 그리고 여러분은 퍼투 리눅스를 BIOS를 사용해 부팅할 수 있는 것입니다. 여러분이 2.2TB가 넘는 시스템 디스크를 가지고 있는 것과 같이 UEFI를 사용할 이유가 없다면 구식 방법을 통해 BIOS 부팅을 사용하시면 됩니다. 단, UEFI를 사용해야하는 경우엔, UEFI부팅을 지원할지도 모르니 법칙 2를 보시면 됩니다.
- 법칙 2 - 신식 방법
- 만약 여러분이 시스템 복구 CD로 확실히 부팅했고 처음에 흑백 화면이 나온다면... 축하드립니다, 여러분의 시스템은 UEFI 부팅을 지원하도록 설정되어 있습니다. 이는 펀투 리눅스를 UEFI를 통해 부팅하도록 설치할 준비가 되어 있다는 뜻입니다. 여러분의 시스템은 BIOS 부팅을 지원할 지도 모릅니다만, 먼저 UEFI를 시도합시다. 여러분은 BIOS 부팅 설정을 그대로 가져다 쓸 수 있습니다.
고급 사용자들은 아마 궁금해 할 겁니다. "무엇이 구식과 신식 방법의 큰 차이일까?" 여기에 그 차이가 적혀 있습니다. 만약 여러분이 구식 MBR 파티션을 사용한다면, 여러분의 /boot
파티션은 ext2 파일 시스템일 것이고 MBR 파티션을 만들기 위해 fdisk
를 사용할 것입니다. 만약 여러분이 신식 GPT 파티션과 UEFI 부팅을 사용한다면, UEFI 읽을 수 있는 것이 vfat 파일 시스템이기 때문에 여러분의 /boot
파티션은 vfat 파일 시스템일 것입니다. 그리고 GPT 파티션을 만들기 위해 gdisk
를 사용할 것입니다. 여러분이 궁금해 했던 경우에, 이것이 근본적인 이유입니다.
신식 UEFI 방법을 통해 펀투 리눅스를 설치하기 위해서, 여러분은 UEFI를 이용하여 시스템 복구 CD로 부팅해야 합니다. 만약 여러분이 UEFI를 이용하여 시스템 복구 CD로 성공적으로 부팅했다면, 여러분은 처음에 시스템 복구 CD로 부팅할 방법을 고르는 흑백 화면을 보게 될 겁니다. 그렇지 않고 파란 화면과 검은 글씨가 보인다면 UEFI가 활성화되지 않은 상태인 것이고 설치 단계 이후 UEFI 부팅을 위한 설정을 할 수 없을 겁니다.
몇몇 메인보드는 UEFI를 지원하는 것처럼 보이지만, 그렇지 않을 수 있습니다. 여러분이 알아보세요. 예를 들어 기가바이트 GA-990FXA-UD7 rev 1.1의 Award BIOS는 CD/DVD에 대한 UEFI 부팅을 지원합니다. 이것은 하드 드라이브에 대한 UEFI 부팅을 가능하게 하고 펀투 리눅스를 설치하는 것에 부족합니다 UEFI는 반드시 이동식 매체(시스템 복구 CD)와 고정 매체(하드디스크)를 동시에 지원해야 합니다. 이 보드의 최근 리비전(rev 3.0)은 UEFI 부팅을 완전히 지원하는 새로운 BIOS를 가지고 있는 것으로 알려져 있습니다. 이것이 세번째 법칙에 해당한다 할 수 있습니다... 그대의 하드웨어를 알라.
구식(BIOS/MBR) 방법
여러분이 BIOS를 이용하여 부팅할 것이고 시스템 복구 CD의 초기 부팅 메뉴가 밝은 파란색이었다면 이 방법을 사용하세요. 만약 신식 방법을 사용할 것이라면, 이 글을 클릭하여 아래 문단으로 건너 뛰기 바랍니다.
먼저, 여러분이 파티션을 나눌 정확한 하드디스크를 찾았음을 확인하는 것은 훌륭한 생각입니다. 아래 명령어를 사용하여 /dev/sda
가 여러분이 파티션을 나눌 디스크임을 확인하세요.
root # fdisk -l /dev/sda Disk /dev/sda: 640.1 GB, 640135028736 bytes, 1250263728 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk label type: gpt root # Start End Size Type Name 1 2048 1250263694 596.2G Linux filesyste Linux filesystem
부팅할 때 시스템의 BIOS를 혼란시킬 수 있는 디스크의 모든 MBR 혹은 GPT 파티션 테이블은 삭제하는 것이 권장됩니다. 이는 sgdisk
를 통해 이루어질 수 있습니다.
이것은 기존에 존재했던 모든 파티션에 접근할 수 없도록 만들 겁니다! 우리는 여러분에게 강력하게 경고하고 작업을 진행하기 전 모든 중요한 자료들을 백업하기로 충고하는 바입니다.
root # sgdisk --zap-all /dev/sda Creating new GPT entries. GPT data structures destroyed! You may now partition the disk using fdisk or other utilities.
아래 출력문은 걱정할 거리는 아니고 명령은 성공한 것입니다.
*************************************************************** Found invalid GPT and valid MBR; converting MBR to GPT format in memory. ***************************************************************
이제 우리는 MBR 파티션 테이블을 생성하고 파티션을 나구기 위해 fdisk
를 사용할 것입니다.
root # fdisk /dev/sda
fdisk
내에서, 아래 단계들을 따라가세요.
파티션 테이블 비우기
Command (m for help): o ↵
파티션 1 생성 (boot)
Command (m for help): n ↵ Partition type (default p): ↵ Partition number (1-4, default 1): ↵ First sector: ↵ Last sector: +128M ↵
파티션 2 생성 (swap)
Command (m for help): n ↵ Partition type (default p): ↵ Partition number (2-4, default 2): ↵ First sector: ↵ Last sector: +2G ↵ Command (m for help): t ↵ Partition number (1,2, default 2): ↵ Hex code (type L to list all codes): 82 ↵
루트 파티션 생성
Command (m for help): n ↵ Partition type (default p): ↵ Partition number (3,4, default 3): ↵ First sector: ↵ Last sector: ↵
파티션 테이블 확인
Command (m for help): p
Disk /dev/sda: 298.1 GiB, 320072933376 bytes, 625142448 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x82abc9a6
Device Boot Start End Blocks Id System
/dev/sda1 2048 264191 131072 83 Linux
/dev/sda2 264192 4458495 2097152 82 Linux swap / Solaris
/dev/sda3 4458496 625142447 310341976 83 Linux
디스크에 파티션 테이블 쓰기
Command (m for help): w
여러분의 새 MBR 파티션 테이블이 이제 시스템 디스크에 쓰여질 것입니다.
여러분은 파티션 나구기를 끝냈습니다! 이제, 파일시스템 생성하기로 건너 뛰세요.
신식(UEFI/GPT) 방법
Use this method if you are interested in booting using UEFI, and if your System Rescue CD initial boot menu was black and white. If it was light blue, this method will not work.
gdisk
명령어는 아래처럼 GPT 파티션 테이블을 만듭니다. 아래 값들이 대부분의 사용자에게 작동할 것입니다만, 필요에 따라 용량을 조정하세요. gdisk
를 실행합니다.
root # gdisk /dev/sda
gdisk
내에서, 아래 단계들을 따라가세요.
새로운 비어 있는 파티션 테이블 생성 (이는 디스크에 저장된 된 모든 자료를 삭제할 것입니다.)
Command: o ↵ This option deletes all partitions and creates a new protective MBR. Proceed? (Y/N): y ↵
파티션 1 생성 (boot)
Command: n ↵ Partition Number: 1 ↵ First sector: ↵ Last sector: +500M ↵ Hex Code: EF00 ↵
파티션 2 생성 (swap)
Command: n ↵ Partition Number: 2 ↵ First sector: ↵ Last sector: +4G ↵ Hex Code: 8200 ↵
파티션 3 생성 (루트)
Command: n ↵ Partition Number: 3 ↵ First sector: ↵ Last sector: ↵ (for rest of disk) Hex Code: ↵
다음을 따라, 여러분은 "{c|p}"를 입력하고 엔터키를 쳐 여러분의 현재 파티션 테이블을 볼 수 있습니다. 만약 여러분이 실수를 했다면, 여러분은 생성된 파티션을 지우기 위해 "d
"를 입력할 수 있습니다. 여러분의 파티션 설정에 만족했을 때, "w
"를 입력하여 설정을 디스크에 쓰세요.
디스크에 파티션 테이블 쓰기
Command: w ↵ Do you want to proceed? (Y/N): Y ↵
파티션 테이블은 이제 디스크에 쓰여질 것이고 gdisk
는 종료될 것입니다.
이제, 여러분의 GPT/GUID 파티션들이 생성되었고 아래 "블록 장치들"처럼 리눅스 하에서 보여지게 될 것입니다.
/boot
로 잡기 위해 사용될/dev/sda1
- 스왑 공간으로 사용될
/dev/sda2
/dev/sda3
, which will hold your root filesystem.
You can verify that the block devices above were correctly created by running the command lsblk
.
Creating filesystems
This section covers both BIOS and UEFI installs. Don't skip it!
Before your newly-created partitions can be used, the block devices that were created in the previous step need to be initialized with filesystem metadata. This process is known as creating a filesystem on the block devices. After filesystems are created on the block devices, they can be mounted and used to store files.
Let's keep this simple. Are you using old-school MBR partitions? If so, let's create an ext2 filesystem on /dev/sda1
:
root # mkfs.ext2 /dev/sda1
If you're using new-school GPT partitions for UEFI, you'll want to create a vfat filesystem on /dev/sda1
, because this is what UEFI is able to read:
root # mkfs.vfat -F 32 /dev/sda1
Now, let's create a swap partition. This partition will be used as disk-based virtual memory for your Funtoo Linux system.
You will not create a filesystem on your swap partition, since it is not used to store files. But it is necessary to initialize it using the mkswap
command. Then we'll run the swapon
command to make your newly-initialized swap space immediately active within the live CD environment, in case it is needed during the rest of the install process:
root # mkswap /dev/sda2 root # swapon /dev/sda2
Now, we need to create a root filesystem. This is where Funtoo Linux will live. We generally recommend ext4 or XFS root filesystems. If you're not sure, choose ext4. Here's how to create a root ext4 filesystem:
root # mkfs.ext4 /dev/sda3
...and here's how to create an XFS root filesystem, if you prefer to use XFS instead of ext4:
root # mkfs.xfs /dev/sda3
Your filesystems (and swap) have all now been initialized, so that that can be mounted (attached to your existing directory heirarchy) and used to store files. We are ready to begin installing Funtoo Linux on these brand-new filesystems.
When deploying an OpenVZ host, please use ext4 exclusively. The Parallels development team tests extensively with ext4, and modern versions of openvz-rhel6-stable
are not compatible with XFS, and you may experience kernel bugs.
Mounting filesystems
Mount the newly-created filesystems as follows, creating /mnt/funtoo
as the installation mount point:
root # mkdir /mnt/funtoo root # mount /dev/sda3 /mnt/funtoo root # mkdir /mnt/funtoo/boot root # mount /dev/sda1 /mnt/funtoo/boot
Optionally, if you have a separate filesystem for /home
or anything else:
root # mkdir /mnt/funtoo/home root # mount /dev/sda4 /mnt/funtoo/home
If you have /tmp
or /var/tmp
on a separate filesystem, be sure to change the permissions of the mount point to be globally-writeable after mounting, as follows:
root # chmod 1777 /mnt/funtoo/tmp
Setting the Date
If your system's date and time are too far off (typically by months or years,) then it may prevent Portage from properly downloading source tarballs. This is because some of our sources are downloaded via HTTPS, which use SSL certificates and are marked with an activation and expiration date. However, if your system time is relatively close to correct, you can probably skip this step for now.
Now is a good time to verify the date and time are correctly set to UTC. Use the date
command to verify the date and time:
root # date Fri Jul 15 19:47:18 UTC 2011
If the date and/or time need to be corrected, do so using date MMDDhhmmYYYY
, keeping in mind hhmm
are in 24-hour format. The example below changes the date and time to "July 16th, 2011 @ 8:00PM" UTC:
root # date 071620002011 Fri Jul 16 20:00:00 UTC 2011
Once you have set the system clock, it's a very good idea to copy the time to the hardware clock, so it persists across reboots:
root # hwclock --systohc
Installing the Stage 3 tarball
Now that filesystems are created and your hardware and system clock are set, the next step is downloading the initial Stage 3 tarball. The Stage 3 is a pre-compiled system used as a starting point to install Funtoo Linux.
To download the correct build of Funtoo Linux for your system, head over to the Subarches page. Subarches are builds of Funtoo Linux that are designed to run on a particular type of CPU, to offer the best possible performance. They also take advantage of the instruction sets available for each CPU.
The Subarches page lists all CPU-optimized versions of Funtoo Linux. Find the one that is appropriate for the type of CPU that your system has, and then click on its name in the first column (such as corei7
, for example.) You will then go to a page dedicated to that subarch, and the available stage3's available for download will be listed. If you are using a virtualization technology to run Funtoo Linux, and your VM may migrate to different types of hardware, then it's recommended that you use a stage3 that is optimized for the oldest CPU instruction set that your VM will run on, or a generic image if it may run on both AMD and Intel processors.
For most subarches, you will have several stage3's available to choose from. This next section will help you understand which one to pick.
Which Build?
If you're not sure, pick funtoo-current
.
Funtoo Linux has various different 'builds':
Build | Description |
---|---|
funtoo-current | The most commonly-selected build of Funtoo Linux. Receives rapid updates and preferred by desktop users. |
funtoo-stable | Emphasizes less-frequent package updates and trusted, reliable versions of packages over the latest versions. |
Which Variant?
If you're not sure, pick standard
.
Our "regular" stage3's are listed with a variant of standard
. The following variant builds are available:
Variant | Description |
---|---|
standard | The "standard" version of Funtoo Linux |
pure64 | A 64-bit build that drops multilib (32-bit compatibility) support. Can be ideal for server systems. |
hardened | Includes PIE/SSP toolchain for enhanced security. PIE does require the use of PaX in the kernel, while SSP works with any kernel, and provides enhanced security in user-space to avoid stack-based exploits. For expert users. |
Download the Stage3
Once you have found the stage3 that you would like to download, use wget
to download the Stage 3 tarball you have chosen to use as the basis for your new Funtoo Linux system. It should be saved to the /mnt/funtoo
directory as follows:
root # cd /mnt/funtoo root # wget http://build.funtoo.org/funtoo-current/x86-64bit/generic_64/stage3-latest.tar.xz
Note that 64-bit systems can run 32-bit or 64-bit stages, but 32-bit systems can only run 32-bit stages. Make sure that you select a Stage 3 build that is appropriate for your CPU. If you are not certain, it is a safe bet to choose the generic_64
or generic_32
stage. Consult the Subarches page for more information.
Once the stage is downloaded, extract the contents with the following command, substituting in the actual name of your stage 3 tarball:
root # tar xpf stage3-latest.tar.xz
It is very important to use tar's
"p
" option when extracting the Stage 3 tarball - it tells tar
to preserve any permissions and ownership that exist within the archive. Without this option, your Funtoo Linux filesystem permissions will be incorrect.
Chroot into Funtoo
To install Funtoo Linux, the chroot
command is first used. The chroot command will "switch into" the new Funtoo Linux system, so the commands you execute after running "chroot" will run within your newly-extracted Funtoo Linux system.
Before chrooting, there are a few things that need to be done to set up the chroot environment. You will need to mount /proc
, /sys
and /dev
inside your new system. Use the following commands to do so:
root # cd /mnt/funtoo root # mount -t proc none proc root # mount --rbind /sys sys root # mount --rbind /dev dev
You'll also want to copy over resolv.conf
in order to have proper resolution of Internet hostnames from inside the chroot:
root # cp /etc/resolv.conf /mnt/funtoo/etc/
Now you can chroot into your new system. Use env
before chroot
to ensure that no environment settings from the installation media are pulled in to your new system:
root # env -i HOME=/root TERM=$TERM chroot . bash -l
For users of live CDs with 64-bit kernels installing 32-bit systems: Some software may use uname -r
to check whether the system is 32 or 64-bit. You may want append linux32 to the chroot command as a workaround, but it's generally not needed.
If you receive the error "chroot: failed to run command `/bin/bash': Exec format error
", it is most likely because you are running a 32-bit kernel and trying to execute 64-bit code. Make sure that you have selected the proper type of kernel when booting SystemRescueCD.
It's also a good idea to change the default command prompt while inside the chroot. This will avoid confusion if you have to change terminals. Use this command:
root # export PS1="(chroot) $PS1"
Test internet name resolution from within the chroot:
root # ping -c 5 google.com
If you can't ping, make sure /etc/resolv.conf
doesn't contain things like 127.0.x.x
addresses, if it does, change the 127.0.x.x
entry to 8.8.8.8
-- Google's public dns address. Make sure to replace this with your dns of choice once the system is installed.
Congratulations! You are now chrooted inside a Funtoo Linux system. Now it's time to get Funtoo Linux properly configured so that Funtoo Linux will start successfully, without any manual assistance, when your system is restarted.
Downloading the Portage tree
For an alternative way to do this, see Installing Portage From Snapshot.
Now it's time to install a copy of the Portage repository, which contains package scripts (ebuilds) that tell portage how to build and install thousands of different software packages. To create the Portage repository, simply run emerge --sync
from within the chroot. This will automatically clone the portage tree from GitHub:
(chroot) # emerge --sync
If you receive the error with initial emerge --sync
due to git protocol restrictions, set the SYNC
variable in /etc/portage/make.conf
to
"https://github.com/funtoo/ports-2012.git"
Configuring your system
As is expected from a Linux distribution, Funtoo Linux has its share of configuration files. The one file you are absolutely required to edit in order to ensure that Funtoo Linux boots successfully is /etc/fstab
. The others are optional.
Using Nano
The default editor included in the chroot environment is called nano
. To edit one of the files below, run nano as follows:
(chroot) # nano /etc/fstab
When in the editor, you can use arrow keys to move the cursor, and common keys like backspace and delete will work as expected. To save the file, press Control-X, and answer y
when prompted to save the modified buffer if you would like to save your changes.
Configuration Files
Here are a full list of files that you may want to edit, depending on your needs:
File | Do I need to change it? | Description |
---|---|---|
/etc/fstab |
YES - required | Mount points for all filesystems to be used at boot time. This file must reflect your disk partition setup. We'll guide you through modifying this file below. |
/etc/localtime |
Maybe - recommended | Your timezone, which will default to UTC if not set. This should be a symbolic link to something located under /usr/share/zoneinfo (e.g. /usr/share/zoneinfo/America/Montreal) |
/etc/make.conf (symlink) - also known as:/etc/portage/make.conf |
Maybe - recommended | Parameters used by gcc (compiler), portage, and make. It's a good idea to set MAKEOPTS. This is covered later in this document. Note that it is normal for this file to be empty in Funtoo Linux, as many settings have been migrated to our enhanced profile system. |
/etc/conf.d/hostname |
Maybe - recommended | Used to set system hostname. Set the hostname variable to the fully-qualified (with dots, ie. foo.funtoo.org ) name if you have one. Otherwise, set to the local system hostname (without dots, ie. foo ). Defaults to localhost if not set. |
/etc/hosts |
No | You no longer need to manually set the hostname in this file. This file is automatically generated by /etc/init.d/hostname . |
/etc/conf.d/keymaps |
Optional | Keyboard mapping configuration file (for console pseudo-terminals). Set if you have a non-US keyboard. See Funtoo Linux Localization. |
/etc/conf.d/hwclock |
Optional | How the time of the battery-backed hardware clock of the system is interpreted (UTC or local time). Linux uses the battery-backed hardware clock to initialize the system clock when the system is booted. |
/etc/conf.d/modules |
Optional | Kernel modules to load automatically at system startup. Typically not required. See Additional Kernel Resources for more info. |
/etc/conf.d/consolefont |
Optional | Allows you to specify the default console font. To apply this font, enable the consolefont service by running rc-update add consolefont. |
profiles |
Optional | Some useful portage settings that may help speed up intial configuration. |
If you're installing an English version of Funtoo Linux, you're in luck, as most of the configuration files can be used as-is. If you're installing for another locale, don't worry. We will walk you through the necessary configuration steps on the Funtoo Linux Localization page, and if needed, there's always plenty of friendly, helpful support available. (See Community)
Let's go ahead and see what we have to do. Use nano -w <name_of_file>
to edit files -- the "-w
" argument disables word-wrapping, which is handy when editing configuration files. You can copy and paste from the examples.
It's important to edit your /etc/fstab
file before you reboot! You will need to modify both the "fs" and "type" columns to match the settings for your partitions and filesystems that you created with gdisk
or fdisk
. Skipping this step may prevent Funtoo Linux from booting successfully.
/etc/fstab
/etc/fstab
is used by the mount
command which is run when your system boots. Lines in this file inform mount
about filesystems to be mounted and how they should be mounted. In order for the system to boot properly, you must edit /etc/fstab
and ensure that it reflects the partition configuration you used earlier in the install process. If you can't remember the partition configuration that you used earlier, the lsblk
command may be of help to you:
(chroot) # nano -w /etc/fstab
/etc/fstab
- An example fstab file# The root filesystem should have a pass number of either 0 or 1.
# All other filesystems should have a pass number of 0 or greater than 1.
#
# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.
#
# See the manpage fstab(5) for more information.
#
# <fs> <mountpoint> <type> <opts> <dump/pass>
/dev/sda1 /boot ext2 noauto,noatime 1 2
/dev/sda2 none swap sw 0 0
/dev/sda3 / ext4 noatime 0 1
#/dev/cdrom /mnt/cdrom auto noauto,ro 0 0
Currently, our default /etc/fstab
file has the root filesystem as /dev/sda4
and the swap partition as /dev/sda3
. These will need to be changed to /dev/sda3
and /dev/sda2
, respectively.
If you're using UEFI to boot, change the /dev/sda1
line so that it says vfat
instead of ext2
. Similarly, make sure that the /dev/sda3
line specifies either xfs
or ext4
, depending on which filesystem you chose earlier on in the installation process when you created filesystems.
/etc/localtime
/etc/localtime
is used to specify the timezone that your machine is in, and defaults to UTC. If you would like your Funtoo Linux system to use local time, you should replace /etc/localtime
with a symbolic link to the timezone that you wish to use.
(chroot) # ln -sf /usr/share/zoneinfo/MST7MDT /etc/localtime
The above sets the timezone to Mountain Standard Time (with daylight savings). Type ls /usr/share/zoneinfo
to list available timezones. There are also sub-directories containing timezones described by location.
/etc/portage/make.conf
MAKEOPTS
can be used to define how many parallel compilations should occur when you compile a package, which can speed up compilation significantly. A rule of thumb is the number of CPUs (or CPU threads) in your system plus one. If, for example, you have a dual core processor without hyper-threading, then you would set MAKEOPTS
to 3:
MAKEOPTS="-j3"
If you are unsure about how many processors/threads you have, then use nproc
to help you.
(chroot) # nproc
16
Set MAKEOPTS
to this number plus one:
MAKEOPTS="-j17"
USE
flags define what functionality is enabled when packages are built. It is not recommended to add a lot of USE flags during installation; you should wait until you have a working, bootable system before changing your USE flags. A USE flag prefixed with a minus ("-
") sign tells Portage not to use the flag when compiling. A Funtoo guide to USE flags will be available in the future. For now, you can find out more information about USE flags in the Gentoo Handbook.
LINGUAS
tells Portage which local language to compile the system and applications in (those who use LINGUAS variable like OpenOffice). It is not usually necessary to set this if you use English. If you want another language such as French (fr) or German (de), set LINGUAS appropriately:
LINGUAS="fr"
/etc/conf.d/hwclock
If you dual-boot with Windows, you'll need to edit this file and change the value of clock from UTC to local, because Windows will set your hardware clock to local time every time you boot Windows. Otherwise you normally wouldn't need to edit this file.
(chroot) # nano -w /etc/conf.d/hwclock
Localization
By default, Funtoo Linux is configured with Unicode (UTF-8) enabled, and for the US English locale and keyboard. If you would like to configure your system to use a non-English locale or keyboard, see Funtoo Linux Localization.
Introducing Portage
Portage, the Funtoo Linux package manager has a command called emerge
which is used to build and install packages from source. It also takes care of installing all of the package's dependencies. You call emerge like this:
(chroot) # emerge packagename
When you install a package by specifying its name in the command-line, Portage records its name in the /var/lib/portage/world
file. It does so because it assumes that, since you have installed it by name, you want to consider it part of your system and want to keep the package updated in the future. This is a handy feature, since when packages are being added to the world
set, we can update our entire system by typing:
(chroot) # emerge --sync (chroot) # emerge -auDN @world
This is the "official" way to update your Funtoo Linux system. Above, we first update our Portage tree using git to grab the latest ebuilds (scripts), and then run an emerge command to update the world
set of packages. The options specified tell emerge
to:
a
- show us what will be emerged, and ask us if we want to proceedu
- update the packages we specify -- don't emerge them again if they are already emerged.D
- Consider the entire dependency tree of packages when looking for updates. In other words, do a deep update.N
- Update any packages that have changed (new) USE settings.
You should also consider passing --with-bdeps=y
when emerging @world, at least once in a while. This will update build dependencies as well.
Of course, sometimes we want to install a package but not add it to the world
file. This is often done because you only want the package installed temporarily or because you know the package in question is a dependnecy of another package. If this behavior is desired, you call emerge like this:
(chroot) # emerge -1 packagename
Advanced users may be interested in the Emerge wiki page.
Updating World
Now is actually a very good time to update the entire system and it can be a good idea to do so prior to first boot.
(chroot) # emerge --sync (chroot) # emerge -auDN @world
Make sure you read any post emerge messages and follow their instructions. This is especially true if you have upgraded perl or python.
Kernel
Starting mid-May 2015, Funtoo Linux stage3's include a pre-built debian-sources
kernel to make installation faster and easier. To see if debian-sources is installed, type:
(chroot) # emerge -s debian-sources Searching... [ Results for search key : debian-sources ] [ Applications found : 1 ] * sys-kernel/debian-sources Latest version available: 3.19.3 Latest version installed: 3.19.3 Size of files: 81,292 kB Homepage: http://www.debian.org Description: Debian Sources (and optional binary kernel) License: GPL-2
If a version is listed under Latest version installed
, then debian-sources is already pre-built for you and you can skip the rest of the Kernel section, and proceed to the Installing a Bootloader section.
Building the Kernel
If you need to build a kernel for Funtoo Linux, please follow these steps:
See Funtoo Linux Kernels for a full list of kernels supported in Funtoo Linux. We recommend debian-sources
for new users.
debian-sources
with binary
USE flag requires at least 14GB free in /var/tmp
and takes around 1 hour to build on a Intel Core i7 Processor.
Let's emerge our kernel:
(chroot) # emerge debian-sources
Once emerge
completes, you'll have a brand new kernel and initramfs installed to /boot
, plus kernel headers installed in /usr/src/linux
, and you'll be ready to configure the boot loader to load these to boot your Funtoo Linux system.
If you have a RAID in your machine, the kernel installation will pull in the mdadm
tool as a dependency. It is important to edit the /etc/mdadm.conf
file prior to rebooting the machine so the RAID is properly recognised and set up before the kernel attempts to mount it in the tree. Failing to do so can result in an unusable or even unbootable system! For specific details, consult the mdadm man page man mdadm
or the mdadm ebuild page.
NVIDIA card users: the binary
USE flag installs the Nouveau drivers which cannot be loaded at the same time as the proprietary drivers, and cannot be unloaded at runtime because of KMS. You need to blacklist it under /etc/modprobe.d/
.
For an overview of other kernel options for Funtoo Linux, see Funtoo Linux Kernels. There may be modules that the Debian kernel doesn't include, a situation where genkernel would be useful. Also be sure to see hardware compatibility information.
Installing a Bootloader
These install instructions show you how to use GRUB to boot using BIOS (old-school) or UEFI (new-school). As of boot-update-1.7.2, now in Portage, the steps are very similar.
First, emerge boot-update
. This will also cause grub-2
and efibootmgr
to be merged, since they are dependencies:
(chroot) # emerge boot-update
Then, edit /etc/boot.conf
using nano
and specify "Funtoo Linux genkernel
" as the default
setting at the top of the file, replacing "Funtoo Linux"
.
/etc/boot.conf
should now look like this:
/etc/boot.conf
boot {
generate grub
default "Funtoo Linux genkernel"
timeout 3
}
"Funtoo Linux" {
kernel bzImage[-v]
}
"Funtoo Linux genkernel" {
kernel kernel[-v]
initrd initramfs[-v]
params += real_root=auto
}
"Funtoo Linux better-initramfs" {
kernel vmlinuz[-v]
initrd /initramfs.cpio.gz
}
If you are booting a custom or non-default kernel, please read man boot.conf
for information on the various options available to you.
Old School (BIOS) MBR
When using "old school" BIOS booting, run the following command to install GRUB to your MBR, and generate the /boot/grub/grub.cfg
configuration file that GRUB will use for booting:
(chroot) # grub-install --target=i386-pc --no-floppy /dev/sda (chroot) # boot-update
New School (UEFI) Boot Entry
If you're using "new school" UEFI booting, run of the following sets of commands, depending on whether you are installing a 64-bit or 32-bit system. This will add GRUB as a UEFI boot entry.
For x86-64bit systems:
(chroot) # grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id="Funtoo Linux [GRUB]" --recheck /dev/sda (chroot) # boot-update
For x86-32bit systems:
(chroot) # grub-install --target=i386-efi --efi-directory=/boot --bootloader-id="Funtoo Linux [GRUB]" --recheck /dev/sda (chroot) # boot-update
First Boot, and in the future...
OK -- you are ready to boot!
You only need to run grub-install
when you first install Funtoo Linux, but you need to re-run boot-update
every time you modify your /etc/boot.conf
file or add new kernels to your system. This will regenerate /boot/grub/grub.cfg
so that you will have new kernels available in your GRUB boot menu, the next time you reboot.
Configuring your network
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
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:
(chroot) # emerge linux-firmware networkmanager (chroot) # 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 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:
root # nmtui
For more information about NetworkManager, see the NetworkManager package page.
wpa_supplicant is also a good choice for wireless network connections. See the net-wireless/wpa_supplicant package for steps involved in setting up wpa_supplicant.
Desktop (Wired DHCP)
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 dhcpcd
to the default runlevel:
(chroot) # rc-update add dhcpcd default
When you reboot, dhcpcd
will run in the background and manage all network interfaces and use DHCP to acquire network addresses from a DHCP server.
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)
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
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
(chroot) # nano /etc/conf.d/hostname
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.
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
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
Set your root password
It's imperative that you set your root password before rebooting so that you can log in.
(chroot) # passwd
Restart your system
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.
Leave the chroot, change directory to /mnt, unmount your Funtoo partitions, and reboot.
(chroot) # exit root # cd /mnt root # umount -lR funtoo root # reboot
System Rescue CD will gracefully unmount your new Funtoo filesystems as part of its normal shutdown sequence.
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 login:
prompt. Funtoo Linux has been successfully installed!
Profiles
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:
Sub-Profile Type | Description |
---|---|
arch | Typically x86-32bit or 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. |
build | Defines whether your system is a current , stable or experimental build. current systems will have newer packages unmasked than stable systems. This is defined when your stage is built and is typically not changed. |
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. |
flavor | Defines the general type of system, such as server or desktop , and will set default USE flags appropriate for your needs. |
mix-ins | Defines various optional settings that you may be interested in enabling. |
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 epro show
to view your current profile settings, in addition to any inheritance information:
(chroot) # epro show === Enabled Profiles: === arch: x86-64bit build: current subarch: intel64-haswell flavor: desktop mix-ins: gnome === All inherited flavors from desktop flavor: === workstation (from desktop flavor) core (from workstation flavor) minimal (from core flavor) === All inherited mix-ins from desktop flavor: === X (from workstation flavor) audio (from workstation flavor) dvd (from workstation flavor) media (from workstation flavor) mediadevice-audio-consumer (from media mix-in) mediadevice-base (from mediadevice-audio-consumer mix-in) mediadevice-video-consumer (from media mix-in) mediadevice-base (from mediadevice-video-consumer mix-in) mediaformat-audio-common (from media mix-in) mediaformat-gfx-common (from media mix-in) mediaformat-video-common (from media mix-in) console-extras (from workstation flavor) print (from desktop flavor)
Here are some basic examples of epro
usage:
Description | Command |
---|---|
View available profiles. Enabled profiles will be highlighted in cyan. Directly enabled profiles will be in bold and have a * appended. | (chroot) # epro list |
Change the system flavor. | (chroot) # epro flavor desktop |
Add a mix-in. | (chroot) # epro mix-in +gnome |
Next Steps
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. We also have a category for our official documentation, which includes all docs that we officially maintain for installation and operation of Funtoo Linux.
We also have a number of pages dedicated to setting up your system. See First Steps for a list of these pages.
If your system did not boot correctly, see Installation Troubleshooting for steps you can take to resolve the problem.