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

(Difference between pages)
(Configuring GRUB)
 
(Portage Settings)
 
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.
+
== 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 lista 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 localidades 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>
'''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>
 +
O asterisco azul indica a localidade atual padrão do sistema. Você pode agora alterá-lo de acordo com o que desejar:
 +
<console>
 +
# ##i##eselect locale set 3
 +
Setting LANG to fr_CA.utf8 ...
 +
Run ". /etc/profile" to update the variable in your shell.
 +
</console>
 +
Alternativamente, você pode definir a localidade padrão manualmente. Esse arquivo deve primeiro ser criado com o seu editor preferido:
 +
{{file|name=/etc/env.d/02locale|body=LANG="fr_CA.utf8"}}
 +
Você pode verificar suas ações utilizando:
 +
<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:
+
Para um efeito imediato é necessário recarregar o ambiente:
 
+
 
<console>
 
<console>
# ##i##mkfs.vfat -F 32 /dev/sda1
+
# ##i##env-update && source /etc/profile
 +
>>> Regenerating /etc/ld.so.cache...
 
</console>
 
</console>
 +
Parabéns! Você definiu com sucesso seu idioma padrão no Funtoo.
  
Your <tt>/etc/fstab</tt> entry for this filesystem will also differ, and will look like this:
+
== Configurações do Portage ==
  
<pre>
+
Portage utiliza uma variável especial <code>LINGUAS</code> que define quais localizações/traduções são instaladas por padrão. Por padrão, <code>LINGUAS</code> em unset, a qual resultará em ''todas'' localizações disponíveis sendo instaladas pelo Portage.
/dev/sda1 /boot vfat noatime 1 2
+
</pre>
+
  
== Kernel ==
+
É possível personalizar as configurações de <code>LINGUAS</code> ao configurá-la em <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.
  
=== EFI Framebuffer ===
+
== Read Your Language ==
  
If you have the following option enabled in your kernel, then uvesafb and efifb will not be able to detect the 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: 日本語フォント
  
{{kernelop|title=Bus options (PCI etc.)|desc=
+
Check if you have your language installed (Chinese) by using the <tt>fc-list</tt> command from the <tt>media-libs/fontconfig</tt> ebuild:
    [*] Mark VGA/VBE/EFI FB as generic system framebuffer (NEW)
+
}}
+
  
If you have that option enabled, ''you must also enable'':
+
<console>
 +
# ##i##fc-list :lang=zh
 +
</console>
  
{{kernelop|title=Device Drivers,Graphics support,Frame buffer Devices,Support for frame buffer devices|desc=
+
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.
    [*]  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.
+
For Japanese:
  
== Boot Loader ==
+
<console>
 +
# ##i##emerge media-fonts/kochi-substitute
 +
</console>
  
=== Emerging GRUB ===
+
For Chinese:
 +
<console>
 +
# ##i##emerge media-fonts/arphicfonts
 +
</console>
  
You will still use GRUB as a boot loader, but before emerging grub, you will need to enable EFI booting. To do this,
+
For Korean:
add the following line to <tt>/etc/portage/make.conf</tt>:
+
  
<pre>
+
<console>
GRUB_PLATFORMS="efi-64"
+
# ##i##emerge media-fonts/baekmuk-fonts
</pre>
+
</console>
 +
== Keymap ==
  
Then, <tt>emerge grub</tt>. You will notice <tt>efibootmgr</tt> getting pulled in as a dependency. This is expected and good.
+
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.
  
=== Installing GRUB ===
+
<console>
 +
# ##i##nano -w /etc/conf.d/keymaps
 +
</console>
 +
== Input Method ==
  
Now, for the magic of getting everything in place for booting. You should copy your kernel and initramfs (if you have one -- you will if you are following the default install) to <tt>/boot</tt>. GRUB will boot those. But how do we get UEFI to boot GRUB? Well, we need to run the following command:
+
ibus is an Intelligent Input Bus for Linux.
  
 
<console>
 
<console>
# ##i##grub-install --target=x86_64-efi --efi-directory=/boot /dev/sda
+
# ##i##emerge -av ibus
 
</console>
 
</console>
This command will simply install all the stuff to <tt>/boot/EFI</tt> and <tt>/boot/grub</tt> that your system needs to boot. In particular, the <tt>/boot/EFI/grub/grubx64.efi</tt> file will be created. This is the GRUB boot image that UEFI will load and start.
 
=== Configuring GRUB ===
 
  
OK, now UEFI has the GRUB image it needs to boot. But we still need to configure GRUB itself so it finds and boots your kernel and initramfs. This is done by performing the following steps. Since boot-update doesn't yet support UEFI, we will not use boot-update directly and will create a <tt>/boot/grub/grub.cfg</tt> file manually that looks like this:
+
You also need to install language table for ibus (Chinese)
  
{{file|name=/boot/grub/grub.cfg|desc= |body=
+
<console>
set timeout=3
+
# ##i##emerge -av ibus-table-chinese
set gfxmode=auto
+
</console>
insmod efi_gop
+
insmod efi_uga
+
 
+
menuentry "Funtoo Linux genkernel - kernel-debian-sources-x86_64-3.2.35-2" { 
+
    insmod part_gpt
+
    insmod fat 
+
    set root=(hostdisk//dev/sda,gpt1) 
+
    search --no-floppy --fs-uuid --set __REPLACE_UUID_OF_SDA1__
+
    linux /kernel-debian-sources-x86_64-3.2.35-2 real_root=/dev/sda3
+
    initrd /initramfs-debian-sources-x86_64-3.2.35-2 
+
    set gfxpayload=keep
+
}
+
set default=0
+
}}
+
 
+
Note the <tt>search</tt> line where it says '''<tt>__REPLACE_UUID_OF_SDA1__</tt>''' above. You will need to run '''<tt>blkid /dev/sda1</tt>''' and use the UUID value that is displayed. For example, on my system, I need to use '''<tt>C34B-19CF</tt>'''. You can also change the <tt>menuentry</tt> line text in quotes to say whatever you want, and the <tt>linux</tt> and <tt>initrd</tt> lines should reference your kernel versions in <tt>/boot</tt>. As above, use the path <tt>/</tt> instead of <tt>/boot</tt> as the path should be relative to the root of the VFAT filesystem.
+
 
+
== Known Issues ==
+
With pure UEFI boot mode, with legacy mode disabled, following error expected:
+
* video driver not supported, boot hangs, hard reboot required.
+
Choose UEFI first, next legacy driver. It depends on motherboard vendor and efi bios version.
+
In UEFI bios choose grub option, if your succeeded with above guide, additional menu should appear in Boot Menu, otherwise it boots into EFI shell:
+
* grub:NAME of you hard drive
+
 
+
=== Done! ===
+
 
+
Remember to follow all other steps in the regular Funtoo Install Guide. Assuming you did everything correctly, your system should now boot via UEFI! We will be adding UEFI support to boot-update soon to make this process easier.
+
  
[[Category:HOWTO]]
+
[[Category:Install|Localization]]

Revision as of 21:43, February 5, 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 lista 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 localidades 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)

O asterisco azul indica a localidade atual padrão do sistema. Você pode agora alterá-lo de acordo com o que desejar:

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

Alternativamente, você pode definir a localidade padrão manualmente. Esse arquivo deve primeiro ser criado com o seu editor preferido:

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

Você pode verificar suas ações utilizando:

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

Para um efeito imediato é necessário recarregar o ambiente:

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

Parabéns! Você definiu com sucesso seu idioma padrão no Funtoo.

Configurações do Portage

Portage utiliza uma variável especial LINGUAS que define quais localizações/traduções são instaladas por padrão. Por padrão, LINGUAS em unset, a qual resultará em todas localizações disponíveis sendo instaladas pelo Portage.

É possível personalizar as configurações de LINGUAS ao configurá-la em /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