Difference between pages "Hostname" and "Install/pt-br/Kernel"

(Difference between pages)
(Hosts case)
 
 
Line 1: Line 1:
w.i.p
+
<noinclude>
==Introduction==
+
{{InstallPart|Kernel Installation}}
A hostname is a unique name created to identify a machine on a network. In computer networking, a hostname is a label that is assigned to a device connected to a computer network and that is used to identify the device in various forms of electronic communication such as the World Wide Web, e-mail or Usenet. Hostnames may be simple names consisting of a single word or phrase, or they may be structured.
+
</noinclude>
==Configuration==
+
=== Kernel ===
In Funtoo Linux <code>/etc/conf.d/hostname</code> is the only configuration file for setting a hostname. In OpenRC framework <code>/etc/conf.d/foo</code> is the configuration file for a corresponding Init script <code>/etc/init.d/foo</code>.  With the case of hostname, default value in <code>/etc/conf.d/hostname</code> is set to ''localhost'', means when system boots and OpenRC's <code>/etc/init.d/hostname</code> script started a hostname getting only ''localhost'' name.  How it looks?  In your shell promt this will look in following way, an example for root:
+
 
 +
Starting mid-May 2015, Funtoo Linux stage3's include a pre-built {{c|debian-sources}} kernel to make installation faster and easier. To see if debian-sources is installed, type:
 +
 
 +
{{console|body=
 +
(chroot) # ##i##emerge -s debian-sources
 +
Searching...   
 +
[ Results for search key : ##b##debian-sources##!b## ]
 +
[ Applications found : ##b##1##!b## ]
 +
 
 +
* ##b##sys-kernel/debian-sources##!b##
 +
      ##g##Latest version available:##!g## 3.19.3
 +
      ##g##Latest version installed:##!g## 3.19.3
 +
      ##g##Size of files:##!g## 81,292 kB
 +
      ##g##Homepage:##!g##      http://www.debian.org
 +
      ##g##Description:##!g##  Debian Sources (and optional binary kernel)
 +
      ##g##License:##!g##      GPL-2
 +
}}
 +
 
 +
If a version is listed under {{c|Latest version installed}}, then debian-sources is already pre-built for you and you can skip the rest of the Kernel section, and proceed to the [[#Installing a Bootloader|Installing a Bootloader section]].
 +
 
 +
==== Building the Kernel ====
 +
 
 +
If you need to build a kernel for Funtoo Linux, please follow these steps:
 +
 
 +
{{Fancynote|1=
 +
See [[Funtoo Linux Kernels]] for a full list of kernels supported in Funtoo Linux. We recommend <code>debian-sources</code> for new users.}}
 +
 
 +
{{fancyimportant|1=
 +
<code>debian-sources</code> with <code>binary</code> USE flag requires at least 14GB free in <code>/var/tmp</code> and takes around 1 hour to build on a Intel Core i7 Processor.}}
 +
 
 +
Let's emerge our kernel:
 +
 
 
<console>
 
<console>
localhost ~ # ##i## Hello :)
+
(chroot) # ##i##emerge debian-sources
 
</console>
 
</console>
Let's play a bit with a configuration. Open <code>/etc/conf.d/hostname</code> with your favorite editor and set a hostname of your choice.  Below, I will use a real examples  from one of my working test boxes.
 
<console>
 
localhost ~ # ##i## nano /etc/conf.d/hostname
 
</console>
 
Let's set it to hostname="oleg-stable.host.funtoo.org". Save the file and restart  a hostname service:
 
<console>
 
localhost ~ # ##i## service hostname restart
 
</console>
 
Now, let's examine our changes, after a restarting a hostname
 
<console>
 
oleg-stable ~ # ##i## Hello :)
 
</console>
 
== Diving deeper==
 
Notice, that in above output we seeing a shortened hostname and not a FQDN (Fully Qualified Domain Name). Don't be frustrated. This is  how  default bash promt <code>PS1</code> set. To get nice promts, please, consult http://www.ibm.com/developerworks/library/l-tip-prompt/ <-- this one should be on Funtoo wiki :)
 
Another way to test our settings is using a '''hostname''' command. Here we will show only  some of it's features. Let's try to execute '''hostname''' command:
 
<console>
 
oleg-stable ~ # ##i## hostname
 
oleg-stable.host.funtoo.org
 
</console>
 
Now we see our fully qualified domain name hostname just how we configured it in <code>/etc/conf.d/hostname</code> in above paragraph. To get a short hostname we need to set '''-s ''' (short) argument to hostname command.
 
<console>
 
oleg-stable ~ # ##i## hostname -s
 
oleg-stable
 
</console>
 
Good! Hostname offers more then just displaying a system host name but can also set one. Let's try:
 
<console>
 
oleg-stable ~ # ##i## hostname foo.bar.baz
 
oleg-stable ~ # ##i## hostname
 
foo.bar.baz
 
</console>
 
As you can see, we changed a hostname on-the-fly. This is not recommended way.
 
{{fancywarning|Please, notice that using '''hostname''' command to configure will work temporary for a current session and will be reverted back to a value set in <code>/etc/conf.d/hostname</code> file with next system restart.}}
 
  
Now that we got a brief description of a hostname and basic configuration steps, its time to reflect another important case which is directly related to a Funtoo Linux hostname generation, a hosts.
+
Once <code>emerge</code> completes, you'll have a brand new kernel and initramfs installed to <code>/boot</code>, plus kernel headers installed in <code>/usr/src/linux</code>, and you'll be ready to configure the boot loader to load these to boot your Funtoo Linux system.
  
==Hosts case==
+
{{fancynote|NVIDIA card users: the <code>binary</code> USE flag installs the Nouveau drivers which cannot be loaded at the same time as the proprietary drivers, and cannot be unloaded at runtime because of KMS. You need to blacklist it under <code>/etc/modprobe.d/</code>.}}
As per man page <code>hosts</code> stands for static table lookup for hostnames and it's configuration file is <code>/etc/hosts</code>. Here is how it looks
+
 
{{file|name=/etc/hosts|body=
+
{{fancynote|For an overview of other kernel options for Funtoo Linux, see [[Funtoo Linux Kernels]]. There may be modules that the Debian kernel doesn't include, a situation where [http://www.funtoo.org/wiki/Funtoo_Linux_Kernels#Using_Debian-Sources_with_Genkernel genkernel] would be useful. Also be sure to see [[:Category:Hardware Compatibility|hardware compatibility]] information.}}
# Auto-generated hostname. Please do not remove this comment.
+
127.0.0.1      oleg-stable.host.funtoo.org oleg-stable localhost localhost.localdomain
+
::1            oleg-stable.host.funtoo.org oleg-stable localhost localhost.localdomain
+
}}
+

Revision as of 19:06, May 28, 2015


Note

This is a template that is used as part of the Installation instructions which covers: Kernel Installation. Templates are being used to allow multiple variant install guides that use most of the same re-usable parts.


Kernel

Starting mid-May 2015, Funtoo Linux stage3's include a pre-built debian-sources kernel to make installation faster and easier. To see if debian-sources is installed, type:

(chroot) # emerge -s debian-sources
Searching...    
[ Results for search key : debian-sources ]
[ Applications found : 1 ]

*  sys-kernel/debian-sources
      Latest version available: 3.19.3
      Latest version installed: 3.19.3
      Size of files: 81,292 kB
      Homepage:      http://www.debian.org
      Description:   Debian Sources (and optional binary kernel)
      License:       GPL-2


If a version is listed under Latest version installed, then debian-sources is already pre-built for you and you can skip the rest of the Kernel section, and proceed to the Installing a Bootloader section.

Building the Kernel

If you need to build a kernel for Funtoo Linux, please follow these steps:

Note

See Funtoo Linux Kernels for a full list of kernels supported in Funtoo Linux. We recommend debian-sources for new users.

Important

debian-sources with binary USE flag requires at least 14GB free in /var/tmp and takes around 1 hour to build on a Intel Core i7 Processor.

Let's emerge our kernel:

(chroot) # emerge debian-sources

Once emerge completes, you'll have a brand new kernel and initramfs installed to /boot, plus kernel headers installed in /usr/src/linux, and you'll be ready to configure the boot loader to load these to boot your Funtoo Linux system.

Note

NVIDIA card users: the binary USE flag installs the Nouveau drivers which cannot be loaded at the same time as the proprietary drivers, and cannot be unloaded at runtime because of KMS. You need to blacklist it under /etc/modprobe.d/.

Note

For an overview of other kernel options for Funtoo Linux, see Funtoo Linux Kernels. There may be modules that the Debian kernel doesn't include, a situation where genkernel would be useful. Also be sure to see hardware compatibility information.