Install/Bootloader/pt-br

From Funtoo
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
This page is a translated version of the page Install/Bootloader and the translation is 49% complete.
Outdated translations are marked like this.
Other languages:
English • ‎Türkçe • ‎español • ‎português do Brasil • ‎русский • ‎中文(中国大陆)‎

Guia de Instalação: Carregador de inicialização (Bootloader)

Install Guide, Chapter 14 < Prev Next >

How Booting Works

In order for Funtoo Linux to boot, it must detect the boot filesystem, root filesystem and swap. The most reliable way to do this is to use the UUID, or unique identifier, of the partitions holding these filesystems. We will use these UUID values in the /etc/fstab, which we will set up next.

The UUID allows Linux to find the right filesystem, even if it detects the disks differently or you move them around in your computer. Funtoo Linux uses a Linux kernel and initial RAM disk to boot, and to get everything set up, we need to set up /etc/fstab correctly, and then install the GRUB boot loader -- and there are two different commands for this, depending on whether you are using MBR or UEFI. Then, finally, we run ego boot update which is a Funtoo command that configures everything for us.

Label partitions

To see the UUIDs for your existing filesystems, type the following command:

root # ls -l /dev/disk/by-uuid/
total 0
lrwxrwxrwx 1 root root 10 Jan 27 13:42 6883428138129353569 -> ../../sdb1
lrwxrwxrwx 1 root root 15 Jan 27 13:42 CE4B-855D -> ../../nvme0n1p1
lrwxrwxrwx 1 root root 15 Jan 27 13:42 ac280eb5-1ea7-4742-9e71-9c7addd35c54 -> ../../nvme0n1p2
lrwxrwxrwx 1 root root 15 Jan 27 13:42 e5a76428-8b3f-4349-81af-cbe29c7f7d09 -> ../../nvme0n1p3

The UUIDs are listed to the left-hand side of the ->. Use these values for setting up the /etc/fstab file, below.

/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:

chroot # nano -w /etc/fstab
   /etc/fstab - An example fstab file
UUID=CE4B-855D                                  /boot         vfat    noauto,noatime  1 2
UUID=ac280eb5-1ea7-4742-9e71-9c7addd35c54       none          swap    sw              0 0
UUID=e5a76428-8b3f-4349-81af-cbe29c7f7d09       /             ext4    noatime         0 1
   Important

Be sure to use the actual UUIDs from your system, not the example values above!

   Note

If you mounted a /var or /home partition, add them to your fstab, or your system may not boot correctly.

boot.conf

/etc/boot.conf controla a configuração do carregador de inicialização no Funtoo. Aqui está como seu conteúdo deve se parecer por padrão:

Here is what is in the file by default:

   /etc/boot.conf
boot {
	generate grub
	default "Funtoo Linux"
	timeout 3
}

"Funtoo Linux" {
	kernel kernel[-v]
	initrd initramfs[-v]
	params += real_root=auto rootfstype=auto
}

"Funtoo Linux (nomodeset)" {
	kernel kernel[-v]
	initrd initramfs[-v]
	params += real_root=auto rootfstype=auto nomodeset
}

Se você está inicializando um kernel personalizado, por favor leia o manual de man boot.conf para informações sobre as várias opções disponíveis para você.

nomodeset

Após a inicialização, você notará que haverá uma opção de inicialização no menu GRUB para um modo "nomodeset". Não recomendamos que você use esse modo por padrão, mas ele está disponível por alguns bons motivos:

  • Para usuários com monitores HiDPI (4K +) : quando o kernel altera automaticamente os modos gráficos, a fonte do console pode se tornar pequena e ilegível.
  • Para usuários com placas gráficas incompatíveis : Algumas placas gráficas não manipulam a configuração do modo correto e isso pode resultar em uma tela em branco após a reinicialização. Utilize essa opção como uma solução temporária para contornar esse problema.

Para utilizar a opção nomodeset, simplesmente selecione a opção no menu do GRUB quando o sistema iniciar.

rootwait

Se você estiver usando uma partição raiz em um dispositivo nvme, adicione o parâmetro do kernel rootwait para forçar o kernel a esperar por uma inicialização assíncrona ou o kernel entrará em pânico em algum hardware.

Intel Microcódigo

ego boot garantirá que você tenha o microcódigo de CPU Intel mais recente instalado em seu sistema se você emergir os seguintes pacotes. Eles já serão mesclados para você se você está usando um estágio 3 da área de trabalho:

chroot # emerge -av intel-microcode iucode_tool

Isso não é necessários para sistemas que utilizam processadores da AMD.

A Moda Antiga (BIOS) MBR

Ao usar a inicialização do BIOS "a moda antiga", execute o seguinte comando para instalar o GRUB no seu MBR e gere o arquivo de configuração /boot/grub/grub.cfg que o GRUB usará para inicializar:

chroot # grub-install --target=i386-pc --no-floppy /dev/sdX
chroot # ego boot update

A Nova Moda (UEFI) Entrada de inicialização

Se você estiver usando a inicialização UEFI no estilo da "nova moda", execute os seguintes conjuntos de comandos, dependendo de estar instalando um sistema de 64 ou 32 bits. Isso adicionará o GRUB como uma entrada de inicialização UEFI.

Para sistemas x86-64bit:

chroot # mount -o remount,rw /sys/firmware/efi/efivars
chroot # grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id="Funtoo Linux [GRUB]" --recheck /dev/sda
chroot # ego boot update

Para sistemas x86-32 bits:

chroot # mount -o remount,rw /sys/firmware/efi/efivars
chroot # grub-install --target=i386-efi --efi-directory=/boot --bootloader-id="Funtoo Linux [GRUB]" --recheck /dev/sda
chroot # ego boot update

Ego!

Now, let's run Funtoo's ego boot update command to get everything configured. This will detect the current kernel(s) on your system and create the necessary GRUB boot entries to get your system booted:

chroot # ego boot update

Você só precisa executar o grub-install quando instalar o Funtoo Linux pela primeira vez, mas você precisa executar novamente o ego boot update toda vez que você modificar seu /etc/boot .conf. Quando você emergir kernels atualizados, o ego boot update será executado automaticamente como parte do processo de instalação. Isso irá regenerar /boot/grub/grub.cfg para que você tenha novos kernels disponíveis no menu de inicialização do GRUB na próxima reinicialização.

Resolução de problemas de UEFI pós-reinicialização

No caso de a entrada de inicialização UEFI NVRAM estar ausente no BIOS e o grub não iniciar, você pode tentar mover um executável GRUB EFI já instalado seguindo as instruções em :default/fallback path

chroot # mv -v '/boot/EFI/Funtoo Linux [GRUB]' /boot/EFI/BOOT
chroot # mv -v /boot/EFI/BOOT/grubx64.efi /boot/EFI/BOOT/BOOTX64.EFI

Primeira Inicialização, e no futuro...

OK -- Você está quase pronto para reiniciar o sistema!

Install Guide, Chapter 14 < Prev Next >