Difference between pages "Pure UEFI Boot Guide" and "Funtoo Linux Localization/pt-br"

From Funtoo
(Difference between pages)
Jump to navigation Jump to search
 
 
Line 1: Line 1:
This tutorial will show you how to install Funtoo on a UEFI system. UEFI, also known as the [[Wikipedia:Unified Extensible Firmware Interface|Unified Extensible Firmware Interface]], is a new firmware interface that is used on some newer computers as a replacement for the traditional PC BIOS. It has an integrated boot loader, so setting up booting is different. The recommended approach is to follow the. Many have reported that they are now unable to boot their system using the other, older method.
== Definir Idioma Padrão ==


This tutorial is meant to be an "overlay" over the Regular Funtoo Installation. Follow the normal installation and only follow steps in this tutorial when dealing with partitioning and configuring the boot loader (GRUB). All steps are otherwise identical to the regular installation process.
No Funtoo, há dois arquivos de configuração responsáveis suas configurações de idioma: <code>/etc/locale.gen</code> e <code>/etc/env.d/00basic</code>. O primeiro arquivo contém somente en_US.UTF-8 locale habilitado. O ultimo é um arquivo padrão embarcado que vem a partir do stage3 e responsável pelo en_US.UTF-8 locale system-wide. não recomendado editar.
Os passos a seguir lhe guiarão através do processo de editar o idioma padrão do sistema (default system language), utilizando o francês canadense como um exemplo.
Primeiro você terá que editar <code>/etc/locale.gen</code>:
<console>
# ##i##nano -w /etc/locale.gen
</console>
Especifique sua localidade preferida com o formato de caracter acompanhante (Você vai preferir principalmente UTF-8):
{{fancynote|É recomendado manter o en_US.UTF-8 locale pré-configurado com um fallback.}}
{{file|name=/etc/locale.gen|body=
en_US.UTF-8 UTF-8
fr_CA.UTF-8 UTF-8
}}
Para determinar uma localidade apropriada para o seu sistema, você deve dar uma olha em <code>/usr/share/i18n/SUPPORTED</code> para a lidta padrão de combinações suportadas  ou verifique o diretório <code>/usr/share/i18n/locales/</code> para uma lista de valores válidos.
{{fancywarning|Lhe é altamente aconcelhado usar ''ao menos uma'' localidade UTF-8 desde que algumas aplicações possam exigi-la.}}


== What Are We Doing? ==
Agora, essas localidade precisam ser geradas:
<console>
# ##i##locale-gen
##g##*##!g## Generating 2 locales (this might take a while) with 1 jobs
*  (1/2) Generating en_US.UTF-8 ... [ ok ]
*  (2/2) Generating fr_CA.UTF-8 ... [ ok ]
##g##*##!g## Generation complete
</console>


This guide will show you how to set up your UEFI system to load the GRUB boot loader, which will then load your Funtoo Linux kernel and initramfs. This is the "UEFI + GRUB" method as described on the [[Boot Methods]] page.
Uma vez feito, você pode aplicar suas configurações de localidade do system (locale settings system-wide). Primeiro exiba todas as opções disponíveis:
<console>
$ ##i##eselect locale list
##b####g##Available targets for the LANG variable:
  ##b##[1]##!b##  C
  ##b##[2]##!b##  POSIX
  ##b##[3]##!b##  fr_CA.utf8
  ##b##[4]##!b##  en_US.utf8 ##bl##*
  ##b##[ ]##!b##  (free form)
</console>
The blue star indicates the current default system locale. You can now change it according your wishes:
<console>
# ##i##eselect locale set 3
Setting LANG to fr_CA.utf8 ...
Run ". /etc/profile" to update the variable in your shell.
</console>
Alternatively, you can set the default locale manually. This file should be created first with your prefered editor:
{{file|name=/etc/env.d/02locale|body=LANG="fr_CA.utf8"}}
You can verify your actions using:
<console>
$ ##i##eselect locale show
##b####g##LANG variable in profile:
  ##b##fr_CA.utf8
</console>


== First Steps ==
For an immediate effect it is required to reload the environment:
<console>
# ##i##env-update && source /etc/profile
>>> Regenerating /etc/ld.so.cache...
</console>
Congratulations! You have successfully set up your default language on Funtoo.


To install Funtoo Linux on a UEFI system, first you need to boot SysRescueCD in UEFI mode. To do this, enable UEFI in your BIOS, and if necessary disable legacy booting. After some fiddling, you should be able to boot SysRescueCD and get a black and white text menu instead of the traditional aqua/cyan-colored menu. The black and white menu indicates that you booted SysRescueCD in UEFI mode. Once you've accomplished this, you're ready to continue with your Funtoo Linux installation and partition your drive. See below for details.
== Portage Settings ==


{{fancynote|If the <tt>/sys/firmware/efi</tt> directory exists, then you have successfully booted in EFI mode and will be able to configure your Funtoo system to boot in EFI mode. If the directory doesn't exist, fix this first. It is a requirement for setting up EFI booting.}}
Portage uses a special variable <code>LINGUAS</code> that defines what localizations/translations get installed by default. By default, <code>LINGUAS</code> in unset, which will result in ''all'' available localizations being installed by Portage.


== Partitioning ==
It is possible to customize the setting of <code>LINGUAS</code> by setting it in <code>/etc/make.conf</code>:
 
To set up your partitions for UEFI booting, you will create a ~500MB FAT32 partition on <tt>/dev/sda1</tt>, and set it to type <tt>EF00</tt> using <tt>gdisk</tt>.


<console>
<console>
Command: ##i##n ↵
# ##i##LINGUAS="en_US zh_CN"
Partition Number: ##i##1 ↵
First sector: ##i##↵
Last sector: ##i##+500M ↵
Hex Code: ##i##EF00
</console>
</console>


This partition will serve as your Funtoo <tt>/boot</tt> filesystem as well as the partition that the UEFI firmware can read to load GRUB. Then you will set up swap on <tt>/dev/sda2</tt> and your root filesystem on <tt>/dev/sda3</tt>. To create the FAT32 filesystem, type:
The <code>LINGUAS</code> variable should use spaces between each localization name.
== Read Your Language ==
 
A newly installed Funtoo Linux does not able to read all the languages. You want to read the stuff, say, in Mozilla Firefox. You need to install fonts - A good sign that you have not installed the proper fonts is that the following characters appear as boxes with numbers inside: 日本語フォント
 
Check if you have your language installed (Chinese) by using the <tt>fc-list</tt> command from the <tt>media-libs/fontconfig</tt> ebuild:


<console>
<console>
# ##i##mkfs.vfat -F 32 /dev/sda1
# ##i##fc-list :lang=zh
</console>
</console>


Your <tt>/etc/fstab</tt> entry for this filesystem will also differ, and will look like this:
If you are lucky, the right font will be installed, and your apps will also be able to use Chinese as the default language. But in case you not have the right font installed in this way, you need to install them manually.


<pre>
For Japanese:
/dev/sda1 /boot vfat noatime 1 2
</pre>


== Kernel ==
<console>
# ##i##emerge media-fonts/kochi-substitute
</console>


=== VFAT ===
For Chinese:
<console>
# ##i##emerge media-fonts/arphicfonts
</console>


Make sure you add VFAT support to your kernel if you are building it manually.
For Korean:


=== EFI Framebuffer ===
<console>
# ##i##emerge media-fonts/baekmuk-fonts
</console>
== Keymap ==


If you have the following option enabled in your kernel, then uvesafb and efifb will not be able to detect the framebuffer:
Funtoo Linux defaults to a US English keyboard. If you are using another type of keyboard, edit <tt>/etc/conf.d/keymaps</tt> and set keymap to your keyboard model. For example, cf for French Canadian keyboard, fr for French Azerty.


{{kernelop|title=Bus options (PCI etc.)|desc=
<console>
    [*] Mark VGA/VBE/EFI FB as generic system framebuffer (NEW)
# ##i##nano -w /etc/conf.d/keymaps
}}
</console>
== Input Method ==


If you have that option enabled, ''you must also enable'':
ibus is an Intelligent Input Bus for Linux.


{{kernelop|title=Device Drivers,Graphics support,Frame buffer Devices|desc=
<console>
    [*]  Simple framebuffer support
# ##i##emerge -av ibus
}}
</console>
 
This is the preferred method of using the EFI framebuffer, the efifb and uvesafb drivers will be used as a fallback if the above is not compatible.


== Boot Loader ==
You also need to install language table for ibus (Chinese)
=== EFI Stub method ===
Instead of bothering with the installation of GRUB and the risk that your system will not boot, you should consider using the UEFI firmware of your computer to boot your kernel. not only does this method reduce boot times slightly, it also removes the hassel of dealing with and configuring a bootloader.


==== Kernel Configuration ====
To prepare your kernel to boot with EFI stub, make sure that the following options are built in to your kernel:
{{kernelop|title=Processor type and features|desc=
[*] EFI runtime service support
[*]    EFI stub support
[ ]        EFI mixed-mode support
[*] Built-in kernel command line
(kernel options that you want to pass go here)
}}
{{note|Commands that you would normally pass, such as, <code>video{{=}}uvesafb:1920x1080-32,mtrr:3,ywrap</code>, should be put here. In other words, anything that you would normally add to <code>/etc/boot.conf</code> after <code>params +{{=}}</code> should be added to the built-in kernel command line as well.}}
{{important|You should specifiy the position of your rootfs here. For example: <code>root{{=}}/dev/sdb1</code>.}}
If your system requires an initramfs to boot, do not worry, you can build that in to the kernel. One thing that you should know, however, is that the kernel only takes plaintext and <code>.cpio</code> files for initramfs source files. Therefore, if you use an application to generate an initramfs for you, make sure that it does not use gzip compression. To build better-initramfs-bin without gzip compression, disable the gzip use flag for the package:
{{file|name=/etc/portage/package.use|desc= |body=
sys-kernel/better-initramfs-bin -gzip
}}
then emerge better-initramfs:
<console>
<console>
###i## emerge better-initramfs-bin
# ##i##emerge -av ibus-table-chinese
</console>
</console>
If you check in your <code>/boot</code> directory, you should see a file called <code>initramfs.cpio</code>. See below to include this file in your kernel.
{{kernelop|title=General setup|desc=
[*] Initial RAM filesystem and RAM disk (initramfs/initrd) support
(/path/to/initramfs/file.cpio)
For better-initramfs-bin:
(/boot/initramfs.cpio)
}}


==== Building and installing the kernel ====
[[Category:Install|Localization]]
After you have configured your kernel, build it, install it to <code>/boot</code>, and then create a copy of the image to store in the EFI boot directory:
<console>
###i## pwd
/usr/src/linux
###i## make -jn
###i## make -jn install modules_install
###i## mkdir -vp /boot/EFI/Boot
###i## cp -v /boot/vmlinuz-x.x.x /boot/EFI/Boot/bootx64.efi
</console>
When you have finished all of this, you should be able to reboot and enjoy yor new Funtoo system!

Revision as of 13:39, February 4, 2015

Definir Idioma Padrão

No Funtoo, há dois arquivos de configuração responsáveis suas configurações de idioma: /etc/locale.gen e /etc/env.d/00basic. O primeiro arquivo contém somente en_US.UTF-8 locale habilitado. O ultimo é um arquivo padrão embarcado que vem a partir do stage3 e responsável pelo en_US.UTF-8 locale system-wide. não recomendado editar. Os passos a seguir lhe guiarão através do processo de editar o idioma padrão do sistema (default system language), utilizando o francês canadense como um exemplo. Primeiro você terá que editar /etc/locale.gen:

root # nano -w /etc/locale.gen

Especifique sua localidade preferida com o formato de caracter acompanhante (Você vai preferir principalmente UTF-8):

   Note

É recomendado manter o en_US.UTF-8 locale pré-configurado com um fallback.

   /etc/locale.gen
en_US.UTF-8 UTF-8
fr_CA.UTF-8 UTF-8

Para determinar uma localidade apropriada para o seu sistema, você deve dar uma olha em /usr/share/i18n/SUPPORTED para a lidta padrão de combinações suportadas ou verifique o diretório /usr/share/i18n/locales/ para uma lista de valores válidos.

   Warning

Lhe é altamente aconcelhado usar ao menos uma localidade UTF-8 desde que algumas aplicações possam exigi-la.

Agora, essas localidade precisam ser geradas:

root # locale-gen
 * Generating 2 locales (this might take a while) with 1 jobs
 *  (1/2) Generating en_US.UTF-8 ... [ ok ]
 *  (2/2) Generating fr_CA.UTF-8 ... [ ok ]
 * Generation complete

Uma vez feito, você pode aplicar suas configurações de localidade do system (locale settings system-wide). Primeiro exiba todas as opções disponíveis:

user $ eselect locale list
root ##b##Available targets for the LANG variable:
  [1]   C
  [2]   POSIX
  [3]   fr_CA.utf8
  [4]   en_US.utf8 *
  [ ]   (free form)

The blue star indicates the current default system locale. You can now change it according your wishes:

root # eselect locale set 3
Setting LANG to fr_CA.utf8 ...
Run ". /etc/profile" to update the variable in your shell.

Alternatively, you can set the default locale manually. This file should be created first with your prefered editor:

   /etc/env.d/02locale
LANG="fr_CA.utf8"

You can verify your actions using:

user $ eselect locale show
root ##b##LANG variable in profile:
  fr_CA.utf8

For an immediate effect it is required to reload the environment:

root # env-update && source /etc/profile
>>> Regenerating /etc/ld.so.cache...

Congratulations! You have successfully set up your default language on Funtoo.

Portage Settings

Portage uses a special variable LINGUAS that defines what localizations/translations get installed by default. By default, LINGUAS in unset, which will result in all available localizations being installed by Portage.

It is possible to customize the setting of LINGUAS by setting it in /etc/make.conf:

root # LINGUAS="en_US zh_CN"

The LINGUAS variable should use spaces between each localization name.

Read Your Language

A newly installed Funtoo Linux does not able to read all the languages. You want to read the stuff, say, in Mozilla Firefox. You need to install fonts - A good sign that you have not installed the proper fonts is that the following characters appear as boxes with numbers inside: 日本語フォント

Check if you have your language installed (Chinese) by using the fc-list command from the media-libs/fontconfig ebuild:

root # fc-list :lang=zh

If you are lucky, the right font will be installed, and your apps will also be able to use Chinese as the default language. But in case you not have the right font installed in this way, you need to install them manually.

For Japanese:

root # emerge media-fonts/kochi-substitute

For Chinese:

root # emerge media-fonts/arphicfonts

For Korean:

root # emerge media-fonts/baekmuk-fonts

Keymap

Funtoo Linux defaults to a US English keyboard. If you are using another type of keyboard, edit /etc/conf.d/keymaps and set keymap to your keyboard model. For example, cf for French Canadian keyboard, fr for French Azerty.

root # nano -w /etc/conf.d/keymaps

Input Method

ibus is an Intelligent Input Bus for Linux.

root # emerge -av ibus

You also need to install language table for ibus (Chinese)

root # emerge -av ibus-table-chinese