617 lines
14 KiB
Markdown
617 lines
14 KiB
Markdown
|
|
## 🤖 Assistant
|
||
|
|
|
||
|
|
Perfecto, con tu esquema de almacenamiento definido, voy a guiarte en la instalación completa de Gentoo con GNOME y OpenRC. Aquí está el proceso paso a paso:
|
||
|
|
|
||
|
|
## **INSTALACIÓN COMPLETA GENTOO + GNOME + OPENRC**
|
||
|
|
|
||
|
|
### **FASE 1: PREPARACIÓN DEL MEDIO Y PARTICIONADO**
|
||
|
|
|
||
|
|
#### 1.1 Descargar y arrancar medio de instalación
|
||
|
|
```bash
|
||
|
|
# Desde un sistema Linux existente
|
||
|
|
wget https://distfiles.gentoo.org/releases/amd64/autobuilds/latest-install-amd64-minimal.iso
|
||
|
|
# Grabar a USB
|
||
|
|
sudo dd if=latest-install-amd64-minimal.iso of=/dev/sdX bs=4M status=progress oflag=sync
|
||
|
|
```
|
||
|
|
|
||
|
|
#### 1.2 Arrancar en modo UEFI
|
||
|
|
- Configurar BIOS para arranque UEFI desde USB
|
||
|
|
- Seleccionar opción de arranque UEFI en el menú
|
||
|
|
|
||
|
|
#### 1.3 Particionado según tu esquema
|
||
|
|
```bash
|
||
|
|
# Verificar disco
|
||
|
|
lsblk
|
||
|
|
|
||
|
|
# Crear tabla GPT
|
||
|
|
parted /dev/sda -- mklabel gpt
|
||
|
|
|
||
|
|
# 1. ESP (UEFI) - 1GB
|
||
|
|
parted /dev/sda -- mkpart primary fat32 1MiB 1025MiB
|
||
|
|
parted /dev/sda -- set 1 esp on
|
||
|
|
|
||
|
|
# 2. /boot - 1GB
|
||
|
|
parted /dev/sda -- mkpart primary ext4 1025MiB 3073MiB
|
||
|
|
|
||
|
|
# 3. swap - 8GB
|
||
|
|
parted /dev/sda -- mkpart primary linux-swap 3073MiB 11.4GiB
|
||
|
|
|
||
|
|
# 4. / - 220GB
|
||
|
|
parted /dev/sda -- mkpart primary ext4 11.4GiB 231.4GiB
|
||
|
|
|
||
|
|
# 5. /usr - 20GB
|
||
|
|
parted /dev/sda -- mkpart primary ext4 231.4GiB 251.4GiB
|
||
|
|
|
||
|
|
# 6. /var - 20GB
|
||
|
|
parted /dev/sda -- mkpart primary ext4 251.4GiB 271.4GiB
|
||
|
|
|
||
|
|
# 7. /opt - 20GB
|
||
|
|
parted /dev/sda -- mkpart primary ext4 271.4GiB 291.4GiB
|
||
|
|
|
||
|
|
# 8. /tmp - 10GB
|
||
|
|
parted /dev/sda -- mkpart primary ext4 291.4GiB 301.4GiB
|
||
|
|
|
||
|
|
# 9. /home - 700GB
|
||
|
|
parted /dev/sda -- mkpart primary ext4 301.4GiB 100%
|
||
|
|
|
||
|
|
# Verificar
|
||
|
|
parted /dev/sda -- print
|
||
|
|
```
|
||
|
|
|
||
|
|
#### 1.4 Formatear y montar
|
||
|
|
```bash
|
||
|
|
# Formatear
|
||
|
|
mkfs.fat -F 32 /dev/sda1
|
||
|
|
mkfs.ext4 /dev/sda2
|
||
|
|
mkswap /dev/sda3
|
||
|
|
swapon /dev/sda3
|
||
|
|
mkfs.ext4 /dev/sda4
|
||
|
|
mkfs.ext4 /dev/sda5
|
||
|
|
mkfs.ext4 /dev/sda6
|
||
|
|
mkfs.ext4 /dev/sda7
|
||
|
|
mkfs.ext4 /dev/sda8
|
||
|
|
mkfs.ext4 /dev/sda9
|
||
|
|
|
||
|
|
# Montar
|
||
|
|
mount /dev/sda4 /mnt/gentoo
|
||
|
|
mkdir -p /mnt/gentoo/boot/efi
|
||
|
|
mount /dev/sda1 /mnt/gentoo/boot/efi
|
||
|
|
mkdir -p /mnt/gentoo/boot
|
||
|
|
mount /dev/sda2 /mnt/gentoo/boot
|
||
|
|
mkdir -p /mnt/gentoo/usr
|
||
|
|
mount /dev/sda5 /mnt/gentoo/usr
|
||
|
|
mkdir -p /mnt/gentoo/var
|
||
|
|
mount /dev/sda6 /mnt/gentoo/var
|
||
|
|
mkdir -p /mnt/gentoo/opt
|
||
|
|
mount /dev/sda7 /mnt/gentoo/opt
|
||
|
|
mkdir -p /mnt/gentoo/tmp
|
||
|
|
mount /dev/sda8 /mnt/gentoo/tmp
|
||
|
|
mkdir -p /mnt/gentoo/home
|
||
|
|
mount /dev/sda9 /mnt/gentoo/home
|
||
|
|
```
|
||
|
|
|
||
|
|
### **FASE 2: INSTALACIÓN DEL SISTEMA BASE**
|
||
|
|
|
||
|
|
#### 2.1 Instalar stage3
|
||
|
|
```bash
|
||
|
|
cd /mnt/gentoo
|
||
|
|
wget https://distfiles.gentoo.org/releases/amd64/autobuilds/latest-stage3-amd64-openrc.txt
|
||
|
|
STAGE3_URL=$(grep -v "^#" latest-stage3-amd64-openrc.txt | awk '{print $1}')
|
||
|
|
wget "https://distfiles.gentoo.org/releases/amd64/autobuilds/${STAGE3_URL}"
|
||
|
|
tar xpvf stage3-*.tar.xz --xattrs-include='*.*' --numeric-owner
|
||
|
|
```
|
||
|
|
|
||
|
|
#### 2.2 Configurar make.conf optimizado para GNOME
|
||
|
|
```bash
|
||
|
|
nano /mnt/gentoo/etc/portage/make.conf
|
||
|
|
```
|
||
|
|
|
||
|
|
```bash
|
||
|
|
# make.conf optimizado para GNOME
|
||
|
|
COMMON_FLAGS="-march=native -O2 -pipe"
|
||
|
|
CFLAGS="${COMMON_FLAGS}"
|
||
|
|
CXXFLAGS="${COMMON_FLAGS}"
|
||
|
|
FCFLAGS="${COMMON_FLAGS}"
|
||
|
|
FFLAGS="${COMMON_FLAGS}"
|
||
|
|
|
||
|
|
MAKEOPTS="-j$(nproc)"
|
||
|
|
|
||
|
|
# USE flags para GNOME con OpenRC
|
||
|
|
USE="X acl alsa bluetooth dbus elogind gtk gnome gstreamer \
|
||
|
|
networkmanager pulseaudio systemd udisks upower usb \
|
||
|
|
-consolekit -kde -qt5"
|
||
|
|
|
||
|
|
# Para mejor rendimiento gráfico
|
||
|
|
VIDEO_CARDS="intel" # o "nvidia" o "amdgpu" según tu hardware
|
||
|
|
|
||
|
|
# Input devices
|
||
|
|
INPUT_DEVICES="libinput synaptics"
|
||
|
|
|
||
|
|
# Espejos rápidos
|
||
|
|
GENTOO_MIRRORS="https://gentoo.osuosl.org/ \
|
||
|
|
https://mirror.leaseweb.com/gentoo/ \
|
||
|
|
https://mirrors.mit.edu/gentoo-distfiles/"
|
||
|
|
|
||
|
|
# Características de Portage
|
||
|
|
FEATURES="buildpkg parallel-fetch parallel-install \
|
||
|
|
candy clean-logs compress-build-logs \
|
||
|
|
getbinpkg ipc-sandbox network-sandbox \
|
||
|
|
pid-sandbox sandbox userfetch usersync"
|
||
|
|
|
||
|
|
# Binhost para acelerar instalaciones
|
||
|
|
EMERGE_DEFAULT_OPTS="--jobs=$(nproc) --load-average=$(nproc)"
|
||
|
|
PORTAGE_ELOG_SYSTEM="save"
|
||
|
|
```
|
||
|
|
|
||
|
|
#### 2.3 Configurar repositorios
|
||
|
|
```bash
|
||
|
|
mkdir -p /mnt/gentoo/etc/portage/repos.conf
|
||
|
|
cp /mnt/gentoo/usr/share/portage/config/repos.conf /mnt/gentoo/etc/portage/repos.conf/gentoo.conf
|
||
|
|
|
||
|
|
# Copiar DNS
|
||
|
|
cp --dereference /etc/resolv.conf /mnt/gentoo/etc/
|
||
|
|
```
|
||
|
|
|
||
|
|
#### 2.4 Entrar en chroot
|
||
|
|
```bash
|
||
|
|
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
|
||
|
|
|
||
|
|
chroot /mnt/gentoo /bin/bash
|
||
|
|
source /etc/profile
|
||
|
|
export PS1="(chroot) ${PS1}"
|
||
|
|
```
|
||
|
|
|
||
|
|
### **FASE 3: CONFIGURACIÓN DEL SISTEMA**
|
||
|
|
|
||
|
|
#### 3.1 Sincronizar Portage
|
||
|
|
```bash
|
||
|
|
emerge-webrsync
|
||
|
|
emerge --sync
|
||
|
|
```
|
||
|
|
|
||
|
|
#### 3.2 Seleccionar perfil para GNOME + OpenRC
|
||
|
|
```bash
|
||
|
|
eselect profile list
|
||
|
|
# Buscar perfil con: desktop/gnome/openrc
|
||
|
|
# Ejemplo: default/linux/amd64/17.1/desktop/gnome (openrc)
|
||
|
|
eselect profile set <número-del-perfil>
|
||
|
|
```
|
||
|
|
|
||
|
|
#### 3.3 Actualizar @world
|
||
|
|
```bash
|
||
|
|
emerge --ask --verbose --update --deep --newuse @world
|
||
|
|
# Esto tomará varias horas
|
||
|
|
```
|
||
|
|
|
||
|
|
#### 3.4 Configurar zona horaria y locales
|
||
|
|
```bash
|
||
|
|
# Zona horaria
|
||
|
|
echo "America/New_York" > /etc/timezone # Ajusta a tu zona
|
||
|
|
emerge --config sys-libs/timezone-data
|
||
|
|
|
||
|
|
# Locales
|
||
|
|
nano /etc/locale.gen
|
||
|
|
# Descomentar: en_US.UTF-8 UTF-8 (y otros que necesites)
|
||
|
|
locale-gen
|
||
|
|
eselect locale list
|
||
|
|
eselect locale set en_US.utf8
|
||
|
|
env-update && source /etc/profile && export PS1="(chroot) $PS1"
|
||
|
|
```
|
||
|
|
|
||
|
|
#### 3.5 Instalar y configurar kernel
|
||
|
|
```bash
|
||
|
|
# Instalar fuentes
|
||
|
|
emerge --ask sys-kernel/gentoo-sources sys-kernel/linux-firmware
|
||
|
|
|
||
|
|
# Usar genkernel para simplificar (recomendado para principiantes)
|
||
|
|
emerge --ask sys-kernel/genkernel
|
||
|
|
|
||
|
|
# Configurar kernel para UEFI y GNOME
|
||
|
|
cd /usr/src/linux
|
||
|
|
|
||
|
|
# Opción A: Configuración manual
|
||
|
|
make menuconfig
|
||
|
|
# Habilitar:
|
||
|
|
# - Processor type -> EFI stub support
|
||
|
|
# - Device Drivers -> Graphics support -> Frame buffer Devices -> EFI-based Framebuffer Support
|
||
|
|
# - Device Drivers -> Input device support -> Touchscreens
|
||
|
|
# - Device Drivers -> Graphics support -> Direct Rendering Manager -> Intel/AMD/NVIDIA
|
||
|
|
# - File systems -> DOS/FAT/NT Filesystems -> VFAT (FAT32) support
|
||
|
|
# - Executable file formats -> Kernel support for ELF binaries
|
||
|
|
|
||
|
|
# Opción B: Usar genkernel (más fácil)
|
||
|
|
genkernel --menuconfig all
|
||
|
|
|
||
|
|
# Instalar kernel
|
||
|
|
make && make modules_install && make install
|
||
|
|
|
||
|
|
# Para UEFI, copiar kernel a ESP
|
||
|
|
cp /boot/vmlinuz-* /boot/efi/EFI/Gentoo/linux.efi
|
||
|
|
```
|
||
|
|
|
||
|
|
#### 3.6 Configurar fstab
|
||
|
|
```bash
|
||
|
|
nano /etc/fstab
|
||
|
|
```
|
||
|
|
|
||
|
|
```bash
|
||
|
|
# /etc/fstab para tu esquema de particiones
|
||
|
|
/dev/sda4 / ext4 defaults,noatime,errors=remount-ro 0 1
|
||
|
|
/dev/sda1 /boot/efi vfat defaults,umask=0077 0 2
|
||
|
|
/dev/sda2 /boot ext4 defaults,noatime 0 2
|
||
|
|
/dev/sda3 none swap sw 0 0
|
||
|
|
/dev/sda5 /usr ext4 defaults,noatime 0 2
|
||
|
|
/dev/sda6 /var ext4 defaults,noatime 0 2
|
||
|
|
/dev/sda7 /opt ext4 defaults,noatime 0 2
|
||
|
|
/dev/sda8 /tmp ext4 defaults,noatime,nodev,nosuid 0 2
|
||
|
|
/dev/sda9 /home ext4 defaults,noatime 0 2
|
||
|
|
|
||
|
|
# tmpfs para /tmp (opcional, mejor rendimiento)
|
||
|
|
#tmpfs /tmp tmpfs defaults,noatime,size=4G,mode=1777 0 0
|
||
|
|
```
|
||
|
|
|
||
|
|
### **FASE 4: INSTALACIÓN DE GNOME CON OPENRC**
|
||
|
|
|
||
|
|
#### 4.1 Instalar GNOME base
|
||
|
|
```bash
|
||
|
|
# Actualizar USE flags para GNOME
|
||
|
|
echo 'USE="${USE} gnome gtk"' >> /etc/portage/make.conf
|
||
|
|
|
||
|
|
# Instalar GNOME
|
||
|
|
emerge --ask gnome-base/gnome
|
||
|
|
|
||
|
|
# Instalar GDM (display manager)
|
||
|
|
emerge --ask gnome-base/gdm
|
||
|
|
|
||
|
|
# Instalar aplicaciones GNOME esenciales
|
||
|
|
emerge --ask \
|
||
|
|
gnome-extra/gnome-tweaks \
|
||
|
|
gnome-extra/gnome-shell-extensions \
|
||
|
|
gnome-extra/gnome-software \
|
||
|
|
gnome-extra/gnome-calculator \
|
||
|
|
gnome-extra/gnome-system-monitor \
|
||
|
|
gnome-extra/gnome-terminal \
|
||
|
|
gnome-extra/gnome-disk-utility
|
||
|
|
```
|
||
|
|
|
||
|
|
#### 4.2 Configurar OpenRC para GNOME
|
||
|
|
```bash
|
||
|
|
# Añadir servicios esenciales
|
||
|
|
rc-update add dbus default
|
||
|
|
rc-update add elogind boot
|
||
|
|
rc-update add gdm default
|
||
|
|
|
||
|
|
# NetworkManager para GNOME
|
||
|
|
emerge --ask net-misc/networkmanager
|
||
|
|
rc-update add NetworkManager default
|
||
|
|
|
||
|
|
# PulseAudio para audio
|
||
|
|
emerge --ask media-sound/pulseaudio
|
||
|
|
rc-update add pulseaudio default
|
||
|
|
|
||
|
|
# UPower para gestión de energía
|
||
|
|
emerge --ask sys-power/upower
|
||
|
|
rc-update add upower default
|
||
|
|
|
||
|
|
# Udisks para discos
|
||
|
|
emerge --ask sys-fs/udisks
|
||
|
|
```
|
||
|
|
|
||
|
|
#### 4.3 Configurar X11/Wayland
|
||
|
|
```bash
|
||
|
|
# Instalar Xorg (necesario para algunas aplicaciones)
|
||
|
|
emerge --ask x11-base/xorg-server
|
||
|
|
|
||
|
|
# Drivers de video según tu hardware
|
||
|
|
# Para Intel:
|
||
|
|
emerge --ask x11-drivers/xf86-video-intel
|
||
|
|
# Para NVIDIA:
|
||
|
|
emerge --ask x11-drivers/nvidia-drivers
|
||
|
|
# Para AMD:
|
||
|
|
emerge --ask x11-drivers/xf86-video-amdgpu
|
||
|
|
|
||
|
|
# Configurar GDM para Wayland (recomendado)
|
||
|
|
nano /etc/gdm/custom.conf
|
||
|
|
```
|
||
|
|
```ini
|
||
|
|
[daemon]
|
||
|
|
WaylandEnable=true
|
||
|
|
```
|
||
|
|
|
||
|
|
#### 4.4 Instalar herramientas de sistema
|
||
|
|
```bash
|
||
|
|
# Herramientas de administración
|
||
|
|
emerge --ask \
|
||
|
|
app-admin/sudo \
|
||
|
|
sys-process/cronie \
|
||
|
|
sys-apps/mlocate \
|
||
|
|
app-admin/sysklogd \
|
||
|
|
net-misc/dhcpcd \
|
||
|
|
net-misc/openssh
|
||
|
|
|
||
|
|
# Añadir servicios
|
||
|
|
rc-update add cronie default
|
||
|
|
rc-update add sysklogd default
|
||
|
|
rc-update add sshd default
|
||
|
|
|
||
|
|
# Navegador web
|
||
|
|
emerge --ask www-client/firefox
|
||
|
|
|
||
|
|
# Codecs multimedia
|
||
|
|
emerge --ask \
|
||
|
|
media-video/ffmpeg \
|
||
|
|
media-libs/gstreamer \
|
||
|
|
media-plugins/gst-plugins-libav \
|
||
|
|
media-plugins/gst-plugins-vaapi
|
||
|
|
```
|
||
|
|
|
||
|
|
### **FASE 5: CONFIGURACIÓN DE USUARIO Y BOOT**
|
||
|
|
|
||
|
|
#### 5.1 Configurar contraseña root y crear usuario
|
||
|
|
```bash
|
||
|
|
# Contraseña root
|
||
|
|
passwd
|
||
|
|
|
||
|
|
# Crear usuario
|
||
|
|
useradd -m -G users,wheel,audio,video,cdrom,portage,plugdev -s /bin/bash tuusuario
|
||
|
|
passwd tuusuario
|
||
|
|
|
||
|
|
# Configurar sudo
|
||
|
|
visudo
|
||
|
|
# Descomentar: %wheel ALL=(ALL) ALL
|
||
|
|
```
|
||
|
|
|
||
|
|
#### 5.2 Instalar y configurar GRUB para UEFI
|
||
|
|
```bash
|
||
|
|
# Instalar GRUB con soporte UEFI
|
||
|
|
emerge --ask sys-boot/grub:2
|
||
|
|
emerge --ask sys-boot/efibootmgr
|
||
|
|
|
||
|
|
# Instalar en ESP
|
||
|
|
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=Gentoo
|
||
|
|
|
||
|
|
# Configurar GRUB para mejor arranque
|
||
|
|
nano /etc/default/grub
|
||
|
|
```
|
||
|
|
```bash
|
||
|
|
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
|
||
|
|
GRUB_GFXMODE=1920x1080x32
|
||
|
|
GRUB_TERMINAL_OUTPUT="gfxterm"
|
||
|
|
GRUB_DISABLE_OS_PROBER=false # Para detectar otros SO
|
||
|
|
```
|
||
|
|
|
||
|
|
```bash
|
||
|
|
# Generar configuración
|
||
|
|
grub-mkconfig -o /boot/grub/grub.cfg
|
||
|
|
|
||
|
|
# Verificar instalación UEFI
|
||
|
|
efibootmgr -v
|
||
|
|
```
|
||
|
|
|
||
|
|
#### 5.3 Configurar red
|
||
|
|
```bash
|
||
|
|
# Configurar hostname
|
||
|
|
echo "gentoo-pc" > /etc/hostname
|
||
|
|
|
||
|
|
# Configurar hosts
|
||
|
|
nano /etc/hosts
|
||
|
|
```
|
||
|
|
```bash
|
||
|
|
127.0.0.1 localhost
|
||
|
|
::1 localhost
|
||
|
|
127.0.1.1 gentoo-pc.localdomain gentoo-pc
|
||
|
|
```
|
||
|
|
|
||
|
|
### **FASE 6: OPTIMIZACIONES PARA GENTOO**
|
||
|
|
|
||
|
|
#### 6.1 Configurar Portage para mejor rendimiento
|
||
|
|
```bash
|
||
|
|
# Configurar binhost para paquetes precompilados
|
||
|
|
mkdir -p /etc/portage/binrepos.conf
|
||
|
|
nano /etc/portage/binrepos.conf/gentoo.conf
|
||
|
|
```
|
||
|
|
```bash
|
||
|
|
[gentoo]
|
||
|
|
priority = 9999
|
||
|
|
sync-uri = https://gentoo.osuosl.org/experimental/amd64/binpkg/default/linux/17.1/x86-64/
|
||
|
|
```
|
||
|
|
|
||
|
|
#### 6.2 Configurar tmpfs para /tmp (opcional)
|
||
|
|
```bash
|
||
|
|
# Mejor rendimiento usando RAM
|
||
|
|
nano /etc/fstab
|
||
|
|
# Añadir:
|
||
|
|
tmpfs /tmp tmpfs defaults,noatime,size=4G,mode=1777 0 0
|
||
|
|
|
||
|
|
# O mantener en disco pero con optimizaciones
|
||
|
|
mount -o remount,noatime,nodev,nosuid /tmp
|
||
|
|
```
|
||
|
|
|
||
|
|
#### 6.3 Configurar swapiness
|
||
|
|
```bash
|
||
|
|
# Optimizar uso de swap
|
||
|
|
echo "vm.swappiness=10" >> /etc/sysctl.conf
|
||
|
|
echo "vm.vfs_cache_pressure=50" >> /etc/sysctl.conf
|
||
|
|
```
|
||
|
|
|
||
|
|
#### 6.4 Configurar sistema de logs
|
||
|
|
```bash
|
||
|
|
# Instalar y configurar logrotate
|
||
|
|
emerge --ask app-admin/logrotate
|
||
|
|
nano /etc/logrotate.conf
|
||
|
|
```
|
||
|
|
|
||
|
|
### **FASE 7: FINALIZACIÓN**
|
||
|
|
|
||
|
|
#### 7.1 Actualizar sistema completo
|
||
|
|
```bash
|
||
|
|
# Última actualización
|
||
|
|
emerge --ask --update --deep --newuse @world
|
||
|
|
|
||
|
|
# Reconstruir dependencias
|
||
|
|
emerge --ask @preserved-rebuild
|
||
|
|
|
||
|
|
# Limpiar paquetes innecesarios
|
||
|
|
emerge --depclean
|
||
|
|
```
|
||
|
|
|
||
|
|
#### 7.2 Configurar servicios finales
|
||
|
|
```bash
|
||
|
|
# Verificar servicios activos
|
||
|
|
rc-update show
|
||
|
|
|
||
|
|
# Añadir servicios recomendados
|
||
|
|
rc-update add syslog-ng default
|
||
|
|
rc-update add cronie default
|
||
|
|
rc-update add metalog default # alternativo a syslog
|
||
|
|
```
|
||
|
|
|
||
|
|
#### 7.3 Crear script de mantenimiento
|
||
|
|
```bash
|
||
|
|
nano /usr/local/bin/gentoo-maintenance.sh
|
||
|
|
```
|
||
|
|
```bash
|
||
|
|
#!/bin/bash
|
||
|
|
# Script de mantenimiento para Gentoo
|
||
|
|
|
||
|
|
echo "=== Mantenimiento Gentoo ==="
|
||
|
|
|
||
|
|
# Sincronizar repositorios
|
||
|
|
echo "Sincronizando Portage..."
|
||
|
|
emerge --sync
|
||
|
|
|
||
|
|
# Actualizar sistema
|
||
|
|
echo "Actualizando sistema..."
|
||
|
|
emerge --ask --update --deep --newuse @world
|
||
|
|
|
||
|
|
# Reconstruir dependencias
|
||
|
|
echo "Reconstruyendo dependencias..."
|
||
|
|
emerge --ask @preserved-rebuild
|
||
|
|
|
||
|
|
# Limpiar
|
||
|
|
echo "Limpiando paquetes..."
|
||
|
|
emerge --depclean
|
||
|
|
eclean-dist --deep
|
||
|
|
eclean-pkg --deep
|
||
|
|
|
||
|
|
# Actualizar configuraciones
|
||
|
|
echo "Actualizando configuraciones..."
|
||
|
|
etc-update
|
||
|
|
|
||
|
|
echo "¡Mantenimiento completado!"
|
||
|
|
```
|
||
|
|
|
||
|
|
```bash
|
||
|
|
chmod +x /usr/local/bin/gentoo-maintenance.sh
|
||
|
|
```
|
||
|
|
|
||
|
|
#### 7.4 Salir de chroot y reiniciar
|
||
|
|
```bash
|
||
|
|
# Salir de chroot
|
||
|
|
exit
|
||
|
|
|
||
|
|
# Desmontar todo
|
||
|
|
cd /
|
||
|
|
umount -l /mnt/gentoo/dev{/shm,/pts,}
|
||
|
|
umount -R /mnt/gentoo
|
||
|
|
|
||
|
|
# Reiniciar
|
||
|
|
reboot
|
||
|
|
```
|
||
|
|
|
||
|
|
### **FASE 8: POST-INSTALACIÓN**
|
||
|
|
|
||
|
|
#### 8.1 Primer arranque
|
||
|
|
1. Arrancar desde disco duro
|
||
|
|
2. Iniciar sesión en GDM con tu usuario
|
||
|
|
3. Configurar GNOME a tu gusto
|
||
|
|
|
||
|
|
#### 8.2 Comandos de verificación
|
||
|
|
```bash
|
||
|
|
# Verificar sistema
|
||
|
|
uname -a
|
||
|
|
cat /etc/gentoo-release
|
||
|
|
|
||
|
|
# Verificar espacio
|
||
|
|
df -h
|
||
|
|
|
||
|
|
# Verificar servicios
|
||
|
|
rc-status
|
||
|
|
|
||
|
|
# Verificar GNOME
|
||
|
|
gnome-shell --version
|
||
|
|
```
|
||
|
|
|
||
|
|
#### 8.3 Solución de problemas comunes
|
||
|
|
|
||
|
|
**Problema: GNOME no inicia**
|
||
|
|
```bash
|
||
|
|
# Verificar logs
|
||
|
|
journalctl -u gdm
|
||
|
|
|
||
|
|
# Probar sin Wayland
|
||
|
|
sudo nano /etc/gdm/custom.conf
|
||
|
|
# Cambiar: WaylandEnable=false
|
||
|
|
```
|
||
|
|
|
||
|
|
**Problema: Sin sonido**
|
||
|
|
```bash
|
||
|
|
# Verificar PulseAudio
|
||
|
|
pactl info
|
||
|
|
|
||
|
|
# Añadir usuario a grupos de audio
|
||
|
|
sudo gpasswd -a $USER audio
|
||
|
|
sudo gpasswd -a $USER pulse
|
||
|
|
sudo gpasswd -a $USER pulse-access
|
||
|
|
```
|
||
|
|
|
||
|
|
**Problema: WiFi no funciona**
|
||
|
|
```bash
|
||
|
|
# Instalar firmware
|
||
|
|
sudo emerge --ask net-wireless/iw net-wireless/wpa_supplicant
|
||
|
|
|
||
|
|
# Configurar NetworkManager
|
||
|
|
sudo systemctl enable NetworkManager
|
||
|
|
sudo systemctl start NetworkManager
|
||
|
|
```
|
||
|
|
|
||
|
|
### **CONSIDERACIONES ESPECIALES PARA TU ESQUEMA**
|
||
|
|
|
||
|
|
#### Gestión de espacio en particiones pequeñas:
|
||
|
|
```bash
|
||
|
|
# Monitorear /usr (20GB)
|
||
|
|
watch df -h /usr
|
||
|
|
|
||
|
|
# Limpiar distfiles periódicamente
|
||
|
|
eclean-dist
|
||
|
|
|
||
|
|
# Configurar PORTAGE_TMPDIR en /var/tmp (50GB disponible)
|
||
|
|
echo 'PORTAGE_TMPDIR="/var/tmp"' >> /etc/portage/make.conf
|
||
|
|
```
|
||
|
|
|
||
|
|
#### Backup de configuración:
|
||
|
|
```bash
|
||
|
|
# Backup de make.conf
|
||
|
|
cp /etc/portage/make.conf /etc/portage/make.conf.backup
|
||
|
|
|
||
|
|
# Backup de world file
|
||
|
|
cp /var/lib/portage/world /var/lib/portage/world.backup
|
||
|
|
```
|
||
|
|
|
||
|
|
### **TIEMPOS ESTIMADOS**
|
||
|
|
- **Compilación inicial (@world):** 4-8 horas
|
||
|
|
- **GNOME completo:** 2-4 horas adicionales
|
||
|
|
- **Total instalación:** 6-12 horas
|
||
|
|
|
||
|
|
### **RECOMENDACIONES FINALES**
|
||
|
|
1. **Primera actualización:** Espera 24 horas después de instalar
|
||
|
|
2. **Kernels:** Mantén al menos 2 kernels en /boot
|
||
|
|
3. **Backup:** Haz backup de /etc/portage regularmente
|
||
|
|
4. **Documentación:** Consulta https://wiki.gentoo.org
|
||
|
|
|
||
|
|
¿Necesitas ayuda con algún paso específico o tienes algún problema durante la instalación?
|