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

(Difference between pages)
 
(Definir Idioma Padrão)
 
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>
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.
+
# ##i##locale-gen
 
+
##g##*##!g## Generating 2 locales (this might take a while) with 1 jobs
== First Steps ==
+
*  (1/2) Generating en_US.UTF-8 ... [ ok ]
 
+
*  (2/2) Generating fr_CA.UTF-8 ... [ ok ]
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.
+
##g##*##!g## Generation complete
 
+
</console>
{{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.}}
+
 
+
== Partitioning ==
+
 
+
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>.
+
  
 +
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>
 
<console>
Command: ##i##n ↵
+
$ ##i##eselect locale list
Partition Number: ##i##1
+
##b####g##Available targets for the LANG variable:
First sector: ##i##
+
  ##b##[1]##!b##  C
Last sector: ##i##+500M ↵
+
  ##b##[2]##!b##  POSIX
Hex Code: ##i##EF00
+
  ##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>
 
</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:
+
For an immediate effect it is required to reload the environment:
 
+
 
<console>
 
<console>
# ##i##mkfs.vfat -F 32 /dev/sda1
+
# ##i##env-update && source /etc/profile
 +
>>> Regenerating /etc/ld.so.cache...
 
</console>
 
</console>
 +
Congratulations! You have successfully set up your default language on Funtoo.
  
Your <tt>/etc/fstab</tt> entry for this filesystem will also differ, and will look like this:
+
== Portage Settings ==
  
<pre>
+
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.
/dev/sda1 /boot vfat noatime 1 2
+
</pre>
+
  
== Kernel ==
+
It is possible to customize the setting of <code>LINGUAS</code> by setting it in <code>/etc/make.conf</code>:
  
=== VFAT ===
+
<console>
 +
# ##i##LINGUAS="en_US zh_CN"
 +
</console>
  
Make sure you add VFAT support to your kernel if you are building it manually.
+
The <code>LINGUAS</code> variable should use spaces between each localization name.
 +
== Read Your Language ==
  
=== EFI Framebuffer ===
+
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: 日本語フォント
  
If you have the following option enabled in your kernel, then uvesafb and efifb will not be able to detect the framebuffer:
+
Check if you have your language installed (Chinese) by using the <tt>fc-list</tt> command from the <tt>media-libs/fontconfig</tt> ebuild:
  
{{kernelop|title=Bus options (PCI etc.)|desc=
+
<console>
    [*] Mark VGA/VBE/EFI FB as generic system framebuffer (NEW)
+
# ##i##fc-list :lang=zh
}}
+
</console>
  
If you have that option enabled, ''you must also enable'':
+
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.
  
{{kernelop|title=Device Drivers,Graphics support,Frame buffer Devices|desc=
+
For Japanese:
    [*]  Simple framebuffer support
+
}}
+
  
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.
+
<console>
 +
# ##i##emerge media-fonts/kochi-substitute
 +
</console>
  
== Boot Loader ==
+
For Chinese:
=== EFI Stub method ===
+
<console>
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.
+
# ##i##emerge media-fonts/arphicfonts
 +
</console>
  
==== Kernel Configuration ====
+
For Korean:
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
+
<console>
(kernel options that you want to pass go here)
+
# ##i##emerge media-fonts/baekmuk-fonts
}}
+
</console>
{{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.}}
+
== Keymap ==
  
{{important|You should specifiy the position of your rootfs here. For example: <code>root{{=}}/dev/sdb1</code>.}}
+
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.
  
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##nano -w /etc/conf.d/keymaps
 
</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.
+
== Input Method ==
{{kernelop|title=General setup|desc=
+
 
[*] Initial RAM filesystem and RAM disk (initramfs/initrd) support
+
ibus is an Intelligent Input Bus for Linux.
(/path/to/initramfs/file.cpio)
+
For better-initramfs-bin:
+
(/boot/initramfs.cpio)
+
}}
+
  
==== Building and installing the kernel ====
 
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>
 
<console>
###i## pwd
+
# ##i##emerge -av ibus
/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>
 
</console>
When you have finished all of this, you should be able to reboot and enjoy yor new Funtoo system!
+
 
 +
You also need to install language table for ibus (Chinese)
 +
 
 +
<console>
 +
# ##i##emerge -av ibus-table-chinese
 +
</console>
 +
 
 +
[[Category:Install|Localization]]

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:

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

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

$ eselect locale list
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:

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

$ eselect locale show
LANG variable in profile:
  fr_CA.utf8

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

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

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

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

# emerge media-fonts/kochi-substitute

For Chinese:

# emerge media-fonts/arphicfonts

For Korean:

# 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.

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

Input Method

ibus is an Intelligent Input Bus for Linux.

# emerge -av ibus

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

# emerge -av ibus-table-chinese