Difference between revisions of "Install/Bootloader/pt-br"

From Funtoo
Jump to navigation Jump to search
(Updating to match new version of source page)
 
(7 intermediate revisions by 3 users not shown)
Line 2: Line 2:
== Bootloader ==
== Bootloader ==
</includeonly><noinclude><languages/>
</includeonly><noinclude><languages/>
= Guia de Instalação: Gerenciador de Boot =
= Guia de Instalação: Carregador de inicialização (Bootloader) =


{{InstallNavigation|num=14|prev=Kernel|next=Network}}</noinclude>
{{InstallNavigation|num=14|prev=Kernel|next=Network}}</noinclude>


=== Configuração de boot.conf ===
<div lang="en" dir="ltr" class="mw-content-ltr">
==== How Booting Works ====
</div>


Estas instruções de instalação mostram como usar o GRUB para inicializar usando BIOS (legado) ou UEFI.
<div lang="en" dir="ltr" class="mw-content-ltr">
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 {{c|/etc/fstab}}, which we will set up next.
</div>


Observe que ({{c|ego boot}}) é instalado por padrão, mas o GRUB não é, já que ele não é necessário para todos os sistemas Funtoo Linux (como contêineres, por exemplo). Mas para inicializar em "bare metal", GRUB é o gerenciador de inicialização recomendado e melhor suportado, então você precisa fazer sua instalação:
<div lang="en" dir="ltr" class="mw-content-ltr">
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 {{c|/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 {{c|ego boot update}}
which is a Funtoo command that configures everything for us.
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
==== Label partitions ====
</div>
<div lang="en" dir="ltr" class="mw-content-ltr">
To see the UUIDs for your existing filesystems, type the following command:
</div>
<div lang="en" dir="ltr" class="mw-content-ltr">
{{console|body=
# ##i##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
}}
</div>
<div lang="en" dir="ltr" class="mw-content-ltr">
The UUIDs are listed to the left-hand side of the {{c|->}}. Use these values for setting up the {{f|/etc/fstab}} file, below.
</div>
<div lang="en" dir="ltr" class="mw-content-ltr">
==== /etc/fstab ====
</div>
<div lang="en" dir="ltr" class="mw-content-ltr">
{{f|/etc/fstab}} is used by the {{c|mount}} command which is run when your system boots. Lines in this file inform {{c|mount}} about filesystems to be mounted and how they should be mounted. In order for the system to boot properly, you must edit {{f|/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:
</div>
<div lang="en" dir="ltr" class="mw-content-ltr">
{{console|body=
{{console|body=
%chroot% ##i##emerge -av grub
%chroot% ##i##nano -w /etc/fstab
}}
</div>
 
<div lang="en" dir="ltr" class="mw-content-ltr">
{{file|name=/etc/fstab|desc=An example fstab file|body=
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
}}
}}
</div>
<div lang="en" dir="ltr" class="mw-content-ltr">
{{Important|Be sure to use the actual UUIDs from your system, not the example values above!}}
</div>
<div lang="en" dir="ltr" class="mw-content-ltr">
{{Note|If you mounted a /var or /home partition, add them to your fstab, or your system may not boot correctly.}}
</div>


==== boot.conf ====
==== boot.conf ====


<div class="mw-translate-fuzzy">
{{c|/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:
{{c|/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:
</div>
<div lang="en" dir="ltr" class="mw-content-ltr">
Here is what is in the file by default:
</div>


{{file|name=/etc/boot.conf|body=
{{file|name=/etc/boot.conf|body=
Line 52: Line 117:


=== rootwait ===
=== rootwait ===
If you are using a root partition on an {{c|nvme}} device, add the {{c|rootwait}} kernel parameter to force the kernel to wait for it to asynchronously initialize or the kernel will panic on some hardware.
Se você estiver usando uma partição raiz em um dispositivo {{c | nvme}}, adicione o parâmetro do kernel {{c | rootwait}} para forçar o kernel a esperar por uma inicialização assíncrona ou o kernel entrará em pânico em algum hardware.


<div class="mw-translate-fuzzy">
=== Intel Microcódigo ===
=== Intel Microcódigo ===
</div>


Se você possui um processador da  Intel, então {{c|ego boot}} garantirá que você tenha o microcódigo mais recente para sua CPU. Você DEVE emergir os seguintes pacotes para instalar esses microcódigos atualizados:
{{c|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:


{{console|body=
{{console|body=
%chroot% ##i##emerge intel-microcode iucode_tool
%chroot% ##i##emerge -av intel-microcode iucode_tool
}}
}}


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


<div class="mw-translate-fuzzy">
==== A Moda Antiga (BIOS) MBR ====
==== A Moda Antiga (BIOS) MBR ====
</div>


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 {{c | /boot/grub/grub.cfg}} que o GRUB usará para inicializar:
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 {{c | /boot/grub/grub.cfg}} que o GRUB usará para inicializar:


<div class="mw-translate-fuzzy">
{{console|body=
{{console|body=
%chroot% ##i##grub-install --target=i386-pc --no-floppy /dev/sdX
%chroot% ##i##grub-install --target=i386-pc --no-floppy /dev/sdX
%chroot% ##i##ego boot update
%chroot% ##i##ego boot update
}}
}}
</div>


==== A Nova Moda (UEFI) Entrada de inicialização ====  
<div class="mw-translate-fuzzy">
==== A Nova Moda (UEFI) Entrada de inicialização ====
</div>


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.
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.
Line 79: Line 153:
Para sistemas x86-64bit:
Para sistemas x86-64bit:


<div class="mw-translate-fuzzy">
{{console|body=
{{console|body=
%chroot% ##i##mount -o remount,rw /sys/firmware/efi/efivars
%chroot% ##i##mount -o remount,rw /sys/firmware/efi/efivars
Line 84: Line 159:
%chroot% ##i##ego boot update
%chroot% ##i##ego boot update
}}
}}
</div>


Para sistemas x86-32 bits:
Para sistemas x86-32 bits:


<div class="mw-translate-fuzzy">
{{console|body=
{{console|body=
%chroot% ##i##mount -o remount,rw /sys/firmware/efi/efivars
%chroot% ##i##mount -o remount,rw /sys/firmware/efi/efivars
Line 92: Line 169:
%chroot% ##i##ego boot update
%chroot% ##i##ego boot update
}}
}}
</div>


==== Primeira Inicialização, e no futuro... ====  
<div lang="en" dir="ltr" class="mw-content-ltr">
==== Ego! ====
</div>
 
<div lang="en" dir="ltr" class="mw-content-ltr">
Now, let's run Funtoo's {{c|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:
</div>


OK -- Você está quase pronto para reiniciar o sistema!
<div lang="en" dir="ltr" class="mw-content-ltr">
{{console|body=
%chroot% ##i##ego boot update
}}
</div>


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


==== Resolução de problemas de UEFI pós-reinicialização ====
==== Resolução de problemas de UEFI pós-reinicialização ====
Line 106: Line 193:
%chroot% ##i##mv -v /boot/EFI/BOOT/grubx64.efi /boot/EFI/BOOT/BOOTX64.EFI
%chroot% ##i##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!


<noinclude>{{InstallNavigation|num=14|prev=Kernel|next=Network|align=right}}</noinclude>
<noinclude>{{InstallNavigation|num=14|prev=Kernel|next=Network|align=right}}</noinclude>

Latest revision as of 16:54, March 21, 2024

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 >