The Funtoo Linux project has transitioned to "Hobby Mode" and this wiki is now read-only.
Difference between revisions of "User:Vargux/Install"
Line 291: | Line 291: | ||
---- | |||
This article has been created [[Article description::for ''experienced'' users who desire a quick, less detailed installation guide. It doubles as a checklist so essential installation steps are not forgotten.]] | |||
{{Warning|This document is intended for '''experienced users only.''' It is '''not a replacement for the [[Handbook:Main Page|Gentoo Handbook]]''' and will '''not help you install Gentoo any faster.'''<br> | |||
'''Do not expect''' to receive '''any kind of support''' when following this checklist. Installing according to the [[Handbook:Main Page|Handbook]] is fully supported however.}} | |||
__TOC__ | |||
== Format drive == | |||
{{Note|If building within a QEMU or using a VirtIO driver, probably have to substitute the drive/partition name {{c|sda}} with {{c|vda}} throughout this article.}} | |||
=== BIOS/MBR === | |||
Create three partitions. 128MB for {{Path|/boot}}, 1024MB for swap, and the rest for {{Path|/}} | |||
{{RootCmd|cfdisk /dev/sda}} | |||
Format the partitions: | Format the partitions: | ||
{{RootCmd | |||
|mkfs.ext4 /dev/sda1 | |||
|mkfs.ext4 /dev/sda3 | |||
BIOS/GPT | |mkswap /dev/sda2 && swapon /dev/sda2 | ||
}} | |||
=== BIOS/GPT === | |||
Create four partitions. 128MB for {{Path|/boot}}, 2MB for BIOS Boot, 1024MB swap and the rest goes to {{Path|/}} | |||
{{RootCmd|gdisk /dev/sda|output=<pre> | |||
Create GPT partition table: | Create GPT partition table: | ||
Command: o ↵ | Command: o ↵ | ||
Line 343: | Line 359: | ||
Command: w ↵ | Command: w ↵ | ||
Do you want to proceed? (Y/N): Y ↵ | Do you want to proceed? (Y/N): Y ↵ | ||
</pre>}} | |||
Format the partitions: | Format the partitions: | ||
{{RootCmd | |||
|mkfs.ext4 /dev/sda1 | |||
|mkfs.ext4 /dev/sda4 | |||
UEFI/GPT | |mkswap /dev/sda3 && swapon /dev/sda3 | ||
Create four partitions. 128MB for /boot, 128MB for UEFI ESP, 1024MB swap and the rest goes to / | }} | ||
=== UEFI/GPT === | |||
Create four partitions. 128MB for {{Path|/boot}}, 128MB for UEFI ESP, 1024MB swap and the rest goes to {{Path|/}} | |||
{{RootCmd|gdisk /dev/sda|output=<pre> | |||
Create GPT partition table: | Create GPT partition table: | ||
Command: o ↵ | Command: o ↵ | ||
Line 388: | Line 410: | ||
Command: w ↵ | Command: w ↵ | ||
Do you want to proceed? (Y/N): Y ↵ | Do you want to proceed? (Y/N): Y ↵ | ||
</pre>}} | |||
Format the partitions: | Format the partitions: | ||
{{RootCmd | |||
|mkfs.ext4 /dev/sda1 | |||
|mkfs.ext4 /dev/sda4 | |||
|mkswap /dev/sda3 && swapon /dev/sda3 | |||
Mount partitions | |mkfs.vfat -F 32 /dev/sda2 | ||
BIOS/MBR | }} | ||
== Mount partitions == | |||
=== BIOS/MBR === | |||
BIOS/GPT | |||
{{RootCmd | |||
|mkdir -p /mnt/gentoo | |||
|mount /dev/sda3 /mnt/gentoo | |||
|mkdir /mnt/gentoo/boot | |||
UEFI/GPT | |mount /dev/sda1 /mnt/gentoo/boot | ||
}} | |||
=== BIOS/GPT === | |||
{{RootCmd | |||
|mkdir -p /mnt/gentoo | |||
Stage3 | |mount /dev/sda4 /mnt/gentoo | ||
Find nearest mirror from this list. | |mkdir /mnt/gentoo/boot | ||
|mount /dev/sda1 /mnt/gentoo/boot | |||
}} | |||
=== UEFI/GPT === | |||
{{RootCmd | |||
|mkdir -p /mnt/gentoo | |||
|mount /dev/sda4 /mnt/gentoo | |||
|mkdir /mnt/gentoo/boot | |||
|mount /dev/sda1 /mnt/gentoo/boot | |||
|mkdir /mnt/gentoo/boot/efi | |||
|mount /dev/sda2 /mnt/gentoo/boot/efi | |||
}} | |||
== Stage3 == | |||
Find nearest mirror from [https://www.gentoo.org/downloads/mirrors/ this list]. | |||
Navigate to the {{Path|/mnt/gentoo}} directory: | |||
{{RootCmd|cd /mnt/gentoo}} | |||
Download the [[Stage tarball|stage3 tarball]]. Be sure to replace the keyword ({{Keyword|amd64}} and date stamp in the example below) with the correct architecture and date: | |||
Download the stage3 tarball. Be sure to replace the keyword (amd64 and date stamp in the example below) with the correct architecture and date: | |||
{{RootCmd|wget https:<nowiki/>//distfiles.gentoo.org/releases/amd64/autobuilds/current-stage3-amd64-openrc/stage3-amd64-openrc-20220320T170531Z.tar.xz}} | |||
Unpack the stage3 file: | Unpack the stage3 file: | ||
{{RootCmd|tar xpf stage3*}} | |||
(or with xattrs): | (or with xattrs): | ||
{{RootCmd|tar --xattrs-include{{=}}'*.*' --numeric-owner -xpf stage3*}} | |||
Chroot | |||
== Chroot == | |||
Chroot into the extracted stage3: | Chroot into the extracted stage3: | ||
{{RootCmd | |||
|cd /mnt/gentoo | |||
|mount --types proc /proc /mnt/gentoo/proc|mount --rbind /sys /mnt/gentoo/sys|mount --make-rslave /mnt/gentoo/sys|mount --rbind /dev /mnt/gentoo/dev | |||
|mount --make-rslave /mnt/gentoo/dev | |||
|mount --bind /run /mnt/gentoo/run | |||
|mount --make-slave /mnt/gentoo/run | |||
|cp /etc/resolv.conf etc && chroot . /bin/bash | |||
|source /etc/profile}} | |||
== Portage == | |||
Portage | |||
Sync the Gentoo repository: | Sync the Gentoo repository: | ||
{{RootCmd|emerge-webrsync}} | |||
User accounts | |||
== User accounts == | |||
Change the root password: | Change the root password: | ||
{{RootCmd|passwd}} | |||
Create user(s): | Create user(s): | ||
{{RootCmd|useradd -g users -G wheel,portage,audio,video,usb,cdrom -m username | |||
|passwd username}} | |||
{{Note|Spaces are not allowed between groups.}} | |||
== Configure system == | |||
=== Install vi (optional) === | |||
{{Note|vi installation is optional, you can use {{c|nano}} as it is a default editor in stage3.}} | |||
{{RootCmd|emerge -vq vim}} | |||
=== /etc/fstab === | |||
Configure {{Path|/etc/fstab}} to match the actual partitioning performed in the step above: | |||
{{FileBox|filename=/etc/fstab|1= | |||
/dev/sda1 /boot vfat noauto,noatime 1 2 | |||
/dev/sda3 / ext4 noatime 0 1 | |||
/dev/sda2 none swap sw 0 0 | |||
/dev/cdrom /mnt/cdrom auto noauto,ro 0 0 | |||
}} | |||
=== /etc/portage/make.conf === | |||
Set preferred Portage options: | |||
{{FileBox|filename=[[:/etc/portage/make.conf]]|title=A x86_64 make.conf example|1= | |||
CFLAGS="-march=native -O2 -pipe" | |||
CXXFLAGS="${CFLAGS}" | |||
# Do NOT change CHOST setting | |||
CHOST="x86_64-pc-linux-gnu" | |||
# Choose desired USE flags | |||
USE="alsa usb" | |||
PORTDIR="/var/db/repos/gentoo" | |||
DISTDIR="/var/cache/distfiles" | |||
PKGDIR="/var/cache/binpkgs" | |||
}} | |||
=== Locale === | |||
Set system [[Localization/Guide#Setting_a_locale|locale]]: | |||
{{FileBox|filename=/etc/env.d/02locale|title=Example locale configuration|1= | |||
LANG="en_US.UTF-8" | |||
LC_COLLATE="C" | |||
}} | |||
Add the locale to {{Path|/etc/locale.gen}}: | |||
{{FileBox|filename=/etc/locale.gen|title=Example locale configuration|1= | |||
en_US.UTF-8 UTF-8 | |||
C.UTF8 UTF-8 | |||
}} | |||
then generate the locale: | |||
{{RootCmd|locale-gen}} | |||
=== Hostname === | |||
Edit {{Path|/etc/conf.d/hostname}} | |||
{{FileBox|filename=/etc/conf.d/net|title=Example FQDN configuration|1= | |||
dns_domain_lo="mynetwork.net" | |||
}} | |||
=== Keymap === | |||
Edit {{Path|/etc/conf.d/keymaps}} | |||
=== Clock === | |||
Edit {{Path|/etc/conf.d/hwclock}} | |||
=== Timezone === | |||
Set the appropriate timezone: | |||
{{RootCmd|ln -sf /usr/share/zoneinfo/Europe/Helsinki /etc/localtime}} | |||
== Kernel == | |||
=== Emerge === | |||
The {{Package|sys-kernel/gentoo-sources}} package is the vanilla kernel with the Gentoo patchset applied. Choose between kernel sources. The {{Package|sys-kernel/linux-firmware}} package contains binary blobs needed for some hardware (WLAN cards). | |||
If {{Package|sys-kernel/gentoo-sources}} has been selected: | |||
{{RootCmd | |||
|emerge -av sys-kernel/gentoo-sources sys-kernel/linux-firmware | |||
|cd /usr/src/linux | |||
}} | |||
=== Configure === | |||
==== Manual ==== | |||
Install {{Package|sys-apps/pciutils}} | |||
{{RootCmd|emerge -av pciutils}} | |||
Discover which modules are required for the system's hardware: | |||
{{RootCmd|lspci -nnk}} | |||
Shorter version: | |||
{{RootCmd|lspci -nnk {{!}} grep "Kernel driver in use:"}} | |||
Configure kernel by enabling each necessary module in the menuconfig interface. Search for specific module names by pressing {{Key|/}} in menuconfig. Navigate to the associated feature by pressing the corresponding number listed on the left of the search results. | |||
{{RootCmd|make menuconfig}} | |||
Once finished build kernel and modules: | |||
{{RootCmd|make -j2}} | |||
==== Automatic ==== | |||
If things are working nicely in the current install environment, it is possible to use <code>localyesconfig</code> to select all modules currently loaded by the LiveCD: | |||
{{RootCmd|make localyesconfig}} | |||
Build the kernel and modules: | |||
{{RootCmd|make -j2}} | |||
=== Install === | |||
Install the kernel and modules: | |||
{{RootCmd | |||
|make modules_install | |||
|make install | |||
}} | |||
== Bootloader == | |||
Specify the correct setting for the system's firmware. BIOS/MBR is <code>pc</code>, 64-bit UEFI is <code>efi-64</code>, 32-bit UEFI is <code>efi-32</code>: | |||
{{Note|32-bit UEFI is rare to find on PCs. Mostly older Apple hardware use this. It has nothing to do with the Gentoo architecture chosen.}} | |||
{{FileBox|filename=[[:/etc/portage/make.conf]]|title=PC BIOS settings for GRUB|1= | |||
GRUB_PLATFORMS="pc" | |||
}} | |||
{{FileBox|filename=[[:/etc/portage/make.conf]]|title=64-bit UEFI settings for GRUB|1= | |||
GRUB_PLATFORMS="efi-64" | |||
}} | |||
Emerge GRUB: | |||
{{Emerge|sys-boot/grub}} | |||
* Supposing the system has PC BIOS: | |||
{{RootCmd|grub-install /dev/sda}} | |||
* Supposing the system has UEFI firmware and the EFI partition is mounted in the {{Path|/boot/efi}} directory: | |||
{{RootCmd|grub-install --target{{=}}x86_64-efi --efi-directory{{=}}/boot/efi}} | |||
* Edit GRUB's configuration file: | |||
{{RootCmd|nano /boot/grub/grub.cfg}} | |||
Below is a simple [[GRUB]] configuration file: | |||
{{FileBox|filename=/boot/grub/grub.cfg|title=Example manual config|1= | |||
set default=0 | |||
set timeout=1 | |||
menuentry "Gentoo" { | |||
linux (hd0,1)/vmlinuz-3.14.4-gentoo root=/dev/sda3 rootfstype=ext4 net.ifnames=0 quiet ro | |||
} | |||
}} | |||
Alternatively use the {{C|grub-mkconfig}} command to generate the configuration file:: | |||
{{RootCmd|grub-mkconfig -o /boot/grub/grub.cfg|output=<pre> | |||
Found vmlinuz-3.14.4-gentoo | |||
</pre>}} | |||
== Network tools == | |||
Install tools needed for configuring the network interfaces: | |||
{{Emerge|sys-apps/iproute2 net-misc/dhcpcd net-wireless/wireless-tools net-wireless/iw net-wireless/wpa_supplicant}} | |||
== Clean up == | |||
Exit chroot, unmount partitions, and reboot: | |||
{{RootCmd | |||
|exit | |||
|cd /mnt | |||
|umount -R gentoo | |||
|reboot | |||
}} | |||
---- | |||
---- | ---- | ||
---- | |||
== Véase también == | |||
*[[Install|Installación de Funtoo]] | |||
<pre style="font: 11px/11px monospace; align=center; -ms-border-radius: 8px; -moz-border-radius: 8px; -webkit-border-radius: 8px; -khtml-border-radius: 8px; -moz-border-radius-topleft:8px; -webkit-border-top-left-radius:8px; border-top-left-radius:8px; -moz-border-radius-topright:8px; -webkit-border-top-right-radius:8px; border-top-right-radius:8px;"> | <pre style="font: 11px/11px monospace; align=center; -ms-border-radius: 8px; -moz-border-radius: 8px; -webkit-border-radius: 8px; -khtml-border-radius: 8px; -moz-border-radius-topleft:8px; -webkit-border-top-left-radius:8px; border-top-left-radius:8px; -moz-border-radius-topright:8px; -webkit-border-top-right-radius:8px; border-top-right-radius:8px;"> | ||
Revision as of 22:38, August 20, 2022
Familiarícese con la Cultura | Matriz de soporte de Funtoo |
Lista de Verificación Rápida de Instalación Funtoo
0.- Descargue y arranque el LiveCD
Descargar aquí https://build.funtoo.org/livecd | |||
Arranque | |||
Teclado |
|
| |
Acceder a la Red |
|
| |
Verificación de Red |
|
| |
|
|
/etc/init.d/sshd start passwd
|
|
|
|
|
|
1.-Prepare el disco.
3.-Particionado con MBR.
4.-Particionado con GPT.
5.-Crear y montar sistemas de archivos.
6.-Configurar la fecha.
7.-Instalar el Tarball de su elección.
8.-Ingresar con Chroot a nuestro sistema.
9.-Descargar nuestro árbol de Portage.
10.-Configurar el sistema.
11.-Introducción a Portage.
12.-Instalar un Kernel.
13.-Instalar un cargador de arranque.
14.-Configurar la red.
15.-Pasos finales.
16.-Configuración del perfil.
17.-¡Todo Listo! ¡A disfrutar!
1.-Descargar el Live CD
https://build.funtoo.org/livecd -Acceso a la Red loadkeys es (español españa) loadkeys la-latin1 (español latino)
-Acceder a la Red net-setup eth0
-Instalación Remota - /etc/init.d/sshd start passwd New password: ******** Retype new password: ******** passwd: password updated successfully
ifconfig ip addr show
En sistema remoto (cambiar según la ip de cada uno) : ssh root@TU-IP password: ******
2.-Prepare el disco
loadkeys es
lsblk
3.-Particionado MBR
4.-Particionado GPT
cfdisk /dev/sda
Particionamos usando cfdisk y elegimos GPT (equipos UEFI/EFI)
Esquema de prueba que creare:
sda1 1G EFI
sda2 8Gb swap
sda3 El resto de Gb
/dev/sda1, que se usará para almacenar el sistema de archivos /boot,
/dev/sda2, que se utilizará para el espacio de intercambio, y
/dev/sda3, que contendrá su sistema de archivos raíz.
5.-Crear el sistema de archivos
mkfs.ext2 /dev/sda1 (MBR) mkfs.vfat -F 32 /dev/sda1 (UEFI) mkswap /dev/sda2 swapon /dev/sda2 mkfs.ext4 /dev/sda3
6.-Montar sistema de archivos
mkdir /mnt/funtoo mount /dev/sda3 /mnt/funtoo mkdir /mnt/funtoo/boot/ mount /dev/sda1 /mnt/funtoo/boot/
Si tiene sistemas de archivos adicionales (como /home o /var), debería montarlos ahora, de esta manera cuando se descomprima el stage3 (cosa que haremos en un paso próximo) éste poblará a estos sistemas de archivos con los archivos necesarios. Esto puede hacerse de la siguiente manera:
root # mkdir /mnt/funtoo/var root # mount /dev/sdb1 /mnt/funtoo/var
7.-Configurar la fecha
date
date MMDDhhmmYYYY (MM mes... DD día... hhmm hora...YYYY año)
date 081819402022 -08 agosto, 18 días, 1940 hora 19:40, 2022 año
hwclock --systohc -Reloj del sistema
8.-Descargar y extraer el Stage3
Stage3 a usar wget -c https://buil.fundoo.org o https://www.funtoo.org/Subarches
cd /mnt/funtoo
tar xpvf stage3-*.tar.xz --xattrs-include='*.*' --numeric-owner
mount --t proc none /proc
mount --rbind /sys /sys
mount --rbind /dev /dev
Como saber cuantos cores tenemos de cpu disponibles?
grep processor /proc/cpuinfo
fchroot /mnt/funtoo /bin/bash --login
ping -c 5 google.com
ego sync
9.-Introducción a Portage
https://www.funtoo.org/Install/Introducing_Portage/es emerge NombreDelPaquete
10.-Actualizar World
ego sync emerge -auDN @world
12.-Instalar un Núcleo
-Para ver la versión del núcleo preistalado emerge -s debian-sources -Firmware emerge -av linux-firmware
==13.-Gestor de Arranque + Intel Microcode emerge -av grub intel-microcode iucode_tool
-Vieja Escuela (BIOS) MBR grub-install --target=i386-pc --no-floppy /dev/sda ego boot update
-Nueva Escuela (UEFI) Boot Entry mount -o remount,rw /sys/firmware/efi/efivars grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id="Funtoo Linux [GRUB]" --recheck /dev/sda ego boot update
REDES Cableada: rc-update add dhcpcd default
Wi-Fi: emerge linux-firmware networkmanager rc-update add NetworkManager default
nmtui
nano /etc/conf.d/hostname hostname="VargLinux"
passwd
useradd -m vargux usermod -G wheel,audio,video,plugdev,portage vargux passwd vargux
emerge haveged rc-update add haveged default
exit cd /mnt umount -lR funtoo reboot
14.-Redes
-Wi-Fi
This article has been created Article description::for ''experienced'' users who desire a quick, less detailed installation guide. It doubles as a checklist so essential installation steps are not forgotten.
This document is intended for experienced users only. It is not a replacement for the Gentoo Handbook and will not help you install Gentoo any faster.
Do not expect to receive any kind of support when following this checklist. Installing according to the Handbook is fully supported however.
Format drive
If building within a QEMU or using a VirtIO driver, probably have to substitute the drive/partition name sda
with vda
throughout this article.
BIOS/MBR
Create three partitions. 128MB for Template:Path, 1024MB for swap, and the rest for Template:Path
Format the partitions:
BIOS/GPT
Create four partitions. 128MB for Template:Path, 2MB for BIOS Boot, 1024MB swap and the rest goes to Template:Path
Format the partitions:
UEFI/GPT
Create four partitions. 128MB for Template:Path, 128MB for UEFI ESP, 1024MB swap and the rest goes to Template:Path
Format the partitions:
Mount partitions
BIOS/MBR
BIOS/GPT
UEFI/GPT
Stage3
Find nearest mirror from this list.
Navigate to the Template:Path directory:
Download the stage3 tarball. Be sure to replace the keyword (Template:Keyword and date stamp in the example below) with the correct architecture and date:
Unpack the stage3 file:
(or with xattrs):
Chroot
Chroot into the extracted stage3:
Portage
Sync the Gentoo repository:
User accounts
Change the root password:
Create user(s):
Spaces are not allowed between groups.
Configure system
Install vi (optional)
vi installation is optional, you can use nano
as it is a default editor in stage3.
/etc/fstab
Configure Template:Path to match the actual partitioning performed in the step above:
/etc/portage/make.conf
Set preferred Portage options:
Locale
Set system locale:
Add the locale to Template:Path:
then generate the locale:
Hostname
Edit Template:Path
Keymap
Edit Template:Path
Clock
Edit Template:Path
Timezone
Set the appropriate timezone:
Kernel
Emerge
The No results package is the vanilla kernel with the Gentoo patchset applied. Choose between kernel sources. The No results package contains binary blobs needed for some hardware (WLAN cards).
If No results has been selected:
Configure
Manual
Install No results
Discover which modules are required for the system's hardware:
Shorter version:
Configure kernel by enabling each necessary module in the menuconfig interface. Search for specific module names by pressing Template:Key in menuconfig. Navigate to the associated feature by pressing the corresponding number listed on the left of the search results.
Once finished build kernel and modules:
Automatic
If things are working nicely in the current install environment, it is possible to use localyesconfig
to select all modules currently loaded by the LiveCD:
Build the kernel and modules:
Install
Install the kernel and modules:
Bootloader
Specify the correct setting for the system's firmware. BIOS/MBR is pc
, 64-bit UEFI is efi-64
, 32-bit UEFI is efi-32
:
32-bit UEFI is rare to find on PCs. Mostly older Apple hardware use this. It has nothing to do with the Gentoo architecture chosen.
Emerge GRUB:
- Supposing the system has PC BIOS:
- Supposing the system has UEFI firmware and the EFI partition is mounted in the Template:Path directory:
- Edit GRUB's configuration file:
Below is a simple GRUB configuration file:
Alternatively use the grub-mkconfig
command to generate the configuration file::
Network tools
Install tools needed for configuring the network interfaces:
Clean up
Exit chroot, unmount partitions, and reboot:
Véase también
.`"""^' ."{z######; .. `t####cnv#{. .`;?t/. `c###}' .. ^####/. :####` ^####/. .i))1I. .l111>. .1\\r####t\\\>. `\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\f####u<~~~~u)' 'tr~x/' ')t. .u###########{. ^############################################*ccccc#!. .-#c#_. .>z. .'``!####1```,|||-````{#######c````#####+`````````````"]z#####/. .:x}~)j".,r)~1n, :####?. "###(. .-#######v. .#####l. .!####/. '`' '`' :####?. "###(. .-#######v. .#####l. `iiiiiiii' ^####/. :####?. "###(. .-#######v. .#####l. :########` ^####/. :####?. "###(. ."iiiiiiiI. .#####l. :########` ^####/. :####?. "###j` .#####l. :########` ^####t. :####?. "#####f!``````````````#####+```i########,```:####*i' .'". :####?. "###########################################(_######cu*#n. "////!. ^///////////////////////////////////////////+.^]u#######t. .`^^^`.