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.

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

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.

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!

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.