Difference between pages "Welcome" and "Pt-br/Genkernel Quick Start Tutorial"

(Difference between pages)
(Resources)
 
(Recompiling the Gentoo kernel sources from a SystemRescue CD chroot)
 
Line 1: Line 1:
'''Welcome to Funtoo Linux!''' Funtoo Linux is a Linux-based operating system that is a variant of [http://www.gentoo.org Gentoo Linux]. Funtoo Linux is:
+
== Conceitos ==
* ...'''fun!''' Our priority is to create a ''great, supportive and responsive'' user community.
+
* ...'''user-centric and collaborative'''. Everyone is considered a '''user''' of Funtoo, first and foremost. You don't need any special privileges to collaborate with us.
+
* ...'''production-oriented''': Our goal is to have Funtoo be useful for ''real-world tasks''. We use Funtoo to do stuff, like host our infrastructure. It needs to work.__NOTOC__
+
* ...'''creative''': We seek creative, elegant and maintainable solutions to problems of all kinds.
+
  
=== Getting Started ===
+
TBC
  
We encourage you to [[Funtoo Linux Installation|install Funtoo Linux]], and get involved in our user community. Get to know fellow Funtoo Linux users on our [http://forums.funtoo.org forums]. If you have any improvements or find any bugs in Funtoo Linux, you are strongly encouraged to report them on our [http://bugs.funtoo.org bug tracker]. This isn't just a formality -- we take all bugs seriously, and all work performed on Funtoo Linux is tracked on our bug tracker, for purposes of transparency (and to help everyone, including BDFL, from having to remember too much!)
+
== Recompilando os códigos fonte do kernel Gentoo a partir do SystemRescue CD chroot ==
  
Funtoo Linux has a very active [http://en.wikipedia.org/wiki/IRC IRC] community on Freenode, in the <code>#funtoo</code> channel, and you are encouraged to hang out online with our community.
+
Um segundo caso que muitos usuários de Funtoo users encararão é recompilar seu próprio kernel quando instalar um um Funtoo novinho a partir de um stage 3 archive (o cenário mais comum é inicializar a maquina com o SystemRescue CD).
+
=== Distinctives ===
+
  
Funtoo Linux is led by [http://en.wikipedia.org/wiki/Daniel_Robbins_(computer_programmer) Daniel Robbins], the creator and former Chief Architect of [http://en.wikipedia.org/wiki/Gentoo_Linux Gentoo Linux], who serves as benevolent dictator for life (BDFL) of the project. Our organizational structure consists of BDFL and a small number of support staff, as well as members of our user community who are involved in improving Funtoo Linux. Developement efforts are driven by the BDFL as well as our users, and efforts are under way to implement various mechanisms to allow supporters of Funtoo Linux to chart the future direction of the project.
+
{{Fancynote| Se quiser utilizar o System rescue CD sources fornecido pelo Funtoo {{Package|sys-kernel/sysrescue-std-sources}}, a filosofia permanece exatamente a mesma.}}
  
Funtoo Linux packages are installed from source code, automatically, thanks to the [http://en.wikipedia.org/wiki/Portage_(software) Portage ports system.] Funtoo Linux has its own distinct ports tree (repository of packages), which is based on Gentoo's. Every several hours, the Funtoo Linux Portage tree is updated using an automated merge process, to include the latest changes from Gentoo Linux, Funtoo Linux developers and contributors, as well as other independent developers.
+
== First step emerging the required packages ==
  
We use [http://en.wikipedia.org/wiki/Git_(software) Git] for all our development, and we also use Git to deliver our Portage tree to you.
+
The first step is to emerge:
  
=== Help Document Ebuilds! ===
+
# The Gentoo kernel sources: {{Package|sys-kernel/gentoo-sources}}
 +
# Genkernel itself: {{Package|sys-kernel/genkernel}}
  
We need help adding documentation for ebuilds to our wiki. See below for a list of pages:
+
This is achieved by running the following:
 +
<console>
 +
###i## emerge sys-kernel/gentoo-sources sys-kernel/genkernel
 +
</console>
  
This page lists all ebuilds with pages on the Funtoo Linux wiki.
+
Once the Gentoo kernel sources are deployed, you should find a directory named '''linux-''version''-gentoo''' (e.g. linux-2.6.39-gentoo) under ''<code>/usr/src</code>''. Update the ''<code>linux</code>'' symlink to point to this directory:
 +
<console>
 +
###i## cd /usr/src
 +
###i## rm linux
 +
###i## ln -s linux-2.6.39-gentoo linux
 +
</console>
 +
== Second step: Grabbing and tweaking a configuration file ==
  
{{#ask:[[Category:Ebuilds]] [[CatPkg::+]]
+
How to start your kernel configuration? Simply by using the same configuration template the running System Rescue CD kernel had been built with! Before chrooting in your Funtoo instance, you did something like:
|?CatPkg=CatPkg
+
|?Repository
+
|?Summary
+
|format=listwidget
+
|link=all
+
|headers=show
+
|searchlabel=… further results
+
|class=sortable wikitable smwtable
+
}}
+
  
'''Add an Ebuild page:''' (see [[Adding an Ebuild to the Wiki]] for instructions)
+
<console>
 +
###i## mount -o bind /proc /mnt/gentoo/proc
 +
</console>
 +
Or:
 +
<console>
 +
###i## mount -t proc none /mnt/gentoo/proc
 +
</console>
  
{{#forminput:form=Ebuild|size=|default value=|button text=Add Package|autocomplete on namespace=Package|remote autocompletion|placeholder=Descriptive name|popup}}
+
In your chroot environment (or from a System Rescue CD virtual terminal) if you look what ''<code>/proc</code>'' contains you will notice a file named ''<code>config.gz</code>'':
=== Resources ===
+
  
Our community has a number of excellent resources for communication and collaboration:
+
<console>
 +
###i## ls /proc
  
* {{CreateAccount}} to log in to the wiki, forums and bug tracker. See [[Funtoo Authentication FAQ]].
+
...
* [http://forums.funtoo.org forums.funtoo.org] - our new forums!
+
dr-xr-xr-x  7 root      root                    0 May 23 03:13 952
* [https://groups.google.com/forum/#!forum/funtoo-dev funtoo-dev] mailing list
+
dr-xr-xr-x  7 root      root                    0 May 23 03:13 953
* [http://bugs.funtoo.org bugs.funtoo.org], our bug tracker.
+
dr-xr-xr-x  7 root      root                    0 May 23 18:42 9834
* [http://larrythecow.org larrythecow.org], our Gentoo blog aggregation service.
+
...
* [http://kernel-seeds.org kernel-seeds.org], resources for building your kernel from scratch.
+
-r--r--r--  1 root      root                16024 May 23 22:27 config.gz
* [http://git.funtoo.org git.funtoo.org], our cgit repository browser.
+
-r--r--r--  1 root      root                    0 May 23 22:27 consoles
 +
-r--r--r--  1 root      root                    0 May 23 22:27 cpuinfo
 +
...
 +
</console>
  
=== Funtoo Containers ===
+
''<code>config.gz</code>'' holds the running kernel (System Rescue CD) configuration, just copy the unziped content into the Gentoo sources directory:
 +
<console>
 +
###i## cd /usr/src/linux
 +
###i## zcat /proc/config.gz > .config
 +
</console>
  
We want to give our supporters the opportunity to use Funtoo Linux online, as a virtual container. Financial supporters of the project are able to request a Funtoo Linux virtual container, based upon their level of support:
+
Next, run ''<code>make oldconfig</code>'' to set all newly added options:
 +
<console>
 +
###i## make oldconfig
 +
</console>
  
* $10/mo : '''3GB''' RAM, '''4''' CPU threads, 50GB disk
+
Next, tweak the kernel configuration in the way you prefer (manually edition of the .config file, make nconfig, make menuconfig....) if you wish. You are not ready yet! A final step is required: '''you ''must'' either set CONFIG_INITRAMFS_SOURCE to a blank value (CONFIG_INITRAMFS_SOURCE="") either delete the statement in the .config file'''. Forgotting to do that will make Genkernel abort the compilation process with a message like:
* $15/mo : '''6GB''' RAM, '''8''' CPU threads, 100GB disk
+
<console>
* $30/mo : '''12GB''' RAM, '''12''' CPU threads, 200GB disk
+
/usr/src/linux-2.6.39-gentoo/scripts/gen_initramfs_list.sh: Cannot open '/var/tmp/genkernel/initramfs-2.6.32.14-std155-i386.cpio.gz'
* $45/mo : '''48GB''' RAM, '''24''' CPU threads, 300GB disk
+
make[1]: *** [usr/initramfs_data.cpio.lzma] Error 1
 +
</console>
 +
== Third step: Building and installing the kernel ==
  
Find out more details on the [[Funtoo Hosting]] page.
+
This is simply achieved by:
 +
<console>
 +
###i## genkernel --no-mrproper all
 +
</console>
  
=== Support Our Work ===
+
The same remarks written in the [[Genkernel_Quick_Start_Tutorial#Third_step:_Building_and_installing_the_kernel|third paragraph]] of the first use case are still valid here.
  
We encourage all Funtoo Linux users to support our project via a comfortable recurring monthly support payment. Support at levels $10/mo and above grant you the ability to utilize Funtoo Containers. '''Subscribe by selecting a monthly amount below, and this click ''Subscribe''''':  
+
[[Category:Kernel]]
 
+
==== Monthly Recurring Support via Credit Card ====
+
 
+
{{#Widget:FuntooSupport}}
+
 
+
==== Monthly Recurring Support via PayPal ====
+
 
+
{{#Widget:FuntooSupportPayPal}}
+

Revision as of 01:51, April 3, 2015

Conceitos

TBC

Recompilando os códigos fonte do kernel Gentoo a partir do SystemRescue CD chroot

Um segundo caso que muitos usuários de Funtoo users encararão é recompilar seu próprio kernel quando instalar um um Funtoo novinho a partir de um stage 3 archive (o cenário mais comum é inicializar a maquina com o SystemRescue CD).

Note
Se quiser utilizar o System rescue CD sources fornecido pelo Funtoo sys-kernel/sysrescue-std-sources (package not on wiki - please add), a filosofia permanece exatamente a mesma.

First step emerging the required packages

The first step is to emerge:

  1. The Gentoo kernel sources: sys-kernel/gentoo-sources (package not on wiki - please add)
  2. Genkernel itself: sys-kernel/genkernel (package not on wiki - please add)

This is achieved by running the following:

# emerge sys-kernel/gentoo-sources sys-kernel/genkernel

Once the Gentoo kernel sources are deployed, you should find a directory named linux-version-gentoo (e.g. linux-2.6.39-gentoo) under /usr/src. Update the linux symlink to point to this directory:

# cd /usr/src
# rm linux
# ln -s linux-2.6.39-gentoo linux

Second step: Grabbing and tweaking a configuration file

How to start your kernel configuration? Simply by using the same configuration template the running System Rescue CD kernel had been built with! Before chrooting in your Funtoo instance, you did something like:

# mount -o bind /proc /mnt/gentoo/proc

Or:

# mount -t proc none /mnt/gentoo/proc

In your chroot environment (or from a System Rescue CD virtual terminal) if you look what /proc contains you will notice a file named config.gz:

# ls /proc

...
dr-xr-xr-x  7 root       root                     0 May 23 03:13 952
dr-xr-xr-x  7 root       root                     0 May 23 03:13 953
dr-xr-xr-x  7 root       root                     0 May 23 18:42 9834
...
-r--r--r--  1 root       root                 16024 May 23 22:27 config.gz
-r--r--r--  1 root       root                     0 May 23 22:27 consoles
-r--r--r--  1 root       root                     0 May 23 22:27 cpuinfo
...

config.gz holds the running kernel (System Rescue CD) configuration, just copy the unziped content into the Gentoo sources directory:

# cd /usr/src/linux
# zcat /proc/config.gz > .config

Next, run make oldconfig to set all newly added options:

# make oldconfig

Next, tweak the kernel configuration in the way you prefer (manually edition of the .config file, make nconfig, make menuconfig....) if you wish. You are not ready yet! A final step is required: you must either set CONFIG_INITRAMFS_SOURCE to a blank value (CONFIG_INITRAMFS_SOURCE="") either delete the statement in the .config file. Forgotting to do that will make Genkernel abort the compilation process with a message like:

/usr/src/linux-2.6.39-gentoo/scripts/gen_initramfs_list.sh: Cannot open '/var/tmp/genkernel/initramfs-2.6.32.14-std155-i386.cpio.gz'
make[1]: *** [usr/initramfs_data.cpio.lzma] Error 1

Third step: Building and installing the kernel

This is simply achieved by:

# genkernel --no-mrproper all

The same remarks written in the third paragraph of the first use case are still valid here.