# Few questions, first time configuring the kernel...

## Dheath

I have used genkernel for kernel configuration. Do I have to do anything special when I choose to do it manually?

What should I remember when configuring kernel manually? How can I know which ones I need and which ones I dont? What is the difference between modules and <*>? Why some are selected as a module?

How to get the gpm starting automatically when booting to gentoo?

This comes when configuring with the genkernel:

```

* WARNING... WARNING... WARNING...

* Additional kernel cmdline arguments that *may* be required to boot properly...

* add "vga=791 splash=silent" if you use a bootsplash framebuffer

```

Will there be a problem? How can I fix it?

Is the starting text logged anywhere?

If I have many questions with large variety should I create one tread where I ask many questions or one tread per question?

----------

## jdmulloy

The one thread should be fine as long as we remain on Kernel Configuration. Once these problems have been solved please append "[SOLVED]" to your thread title so people know you solved your problem.

Are you switching between genkernel and manual. I've never used genkernel, always manual, it's not that hard as long as you know your hardware. I recomend doing it manualy as it's more predictable when you control everything. You'll need the output of lspci, it's availible on the live cd, if your already in an installed gentoo system do 

```
emerge pciutils
```

Follow the gentoo handbook ,I linked to the section on kernel configuration.

To make gpm and other services start on boot run the following

```
rc-update add <service name> default
```

run this for more info

```
rc-update --help
```

and read the manual.

some services need to be in the boot runlevel in which case default would become boot.

Don't worry about that error message. It's an extra feature to make the text mode pretty. For configuration details check out the gentoo-wiki entry on gensplash link.

http://www.gentoo-wiki.com/ is a good resource, it's unofficial user contributed documentation, it's a good supplement to the official documentation and fills some holes.

also check out http://www.gentoo-portage.com which allows you to search portage much faster than your local database and it can give you a great deal of information about availible packages.

----------

## FantomKnight

Definitely read the docs that jdmulloy mentioned before making further posts.  Also, in these forums, there is an FAQ section.  In there, you will find more info on manually compiling the kernel. You should have a good understanding of where the kernel file(s) are actually located. (HINT: /boot).  

For your first few times of manual kernel config, it's not a bad idea to give your newest kernel a different name than your existing one so you don't actually overwrite your existing kernel.  Just don't forget to properly modify your grub.conf to reflect the new name.  This way, if your system just totally doesn't boot for some reason, you can always boot from the LiveCD, mount the /boot partition and change your grub.conf back to the original settings so that you can boot from your old kernel.  That'll save you a couple of days of reinstalling.

Also, in addition to lspci, you might need the info from lsmod.  This will tell you which modules are currently loaded.  I look at this and determine which ones I will need all the time and which ones I only need infrequently.  If I need it all the time, I build it into the kernel (i.e., <*> in the kernel).  If I only need it loaded infrequently, then I make it a module (i.e., [M] in the kernel).

Good Luck!

----------

## jdmulloy

I don't know why the manual tells you to manualy copy the kernel and change grub/lilo everytime you recompile the kernel.

I let "make" move the kernel for me. It copies the kernel to /boot (make sure /boot is mounted first if it is a seprate partition) then makes vmlinuz a symbolic link to the current kernel and vmlinuz.old a symlink to the last kernel. THis way you have grub point to vmlinuz and also have a second entry for backup that points to vmlinuz.old

here's how I compile my kernel

```
#Configure Kernel#

make menuconfig

#Compile and Install Kernel#

make && make modules_install && make install

```

----------

## FantomKnight

Hey, jdmulloy, that's good to know.  I guess one of the reasons that the manual has you do it manually is so that you really learn what's going on.  I've learned more about linux in the past two years since I discovered Gentoo than I did in the previous seven years of working with Red Hat.  Basically, because Gentoo does very little "hand-holding".  That, and the fact that I never had to recompile a kernel under Red Hat because they were always either mail or DNS servers with no graphical desktop.  Once set up, we pretty much just left them alone except for changing things specific to mail or DNS.  I didn't really look at linux as a desktop OS until about two years ago.  Now, at work, I am MS free.  I can manage my entire Windows based network from my Gentoo desktop.  At home, the only reason I have a bual-boot with Windows is strictly for games that I can't make work with Gentoo.

----------

## Dheath

 *FantomKnight wrote:*   

> Definitely read the docs that jdmulloy mentioned before making further posts.  Also, in these forums, there is an FAQ section.  In there, you will find more info on manually compiling the kernel. You should have a good understanding of where the kernel file(s) are actually located. (HINT: /boot).  
> 
> 

 

Right now I have five manuals to read and every one of them is stuck at the kernel configuring part. So, I'll do my best.

When I bought this computer I never got anykind of list what chips I have inside it. Pciutils might really help but is there more these kind of programs, lists or something that would help choosing which ones I can safely remove from kernel and which ones I should add to the kernel?

I thought that I really should configure it manually but if there would have been any problems it would be much more easier to have atleast kernel working.

When working with Linux it is impossible to complain about missing manuals actually there is way too many of manuals for it.

Edit:

I think that I just have to start reading these...  :Sad: 

 *Dheath wrote:*   

> 
> 
> Is the starting text logged anywhere?
> 
> 

 

This would be nice to know.

The errors are starting to accumulate.

Where could I post it and ask how to fix things?

(Cant continue. Even the dhcp stopped working... And the best part is that I did not do anything that should have any effect at all with these kind of errors)

----------

## FantomKnight

By "starting text", if you are referring to what happens at bootup, then try issuing dmesg | less.

----------

## jdmulloy

Are you on the live cd or the installed system. FantomKnight's suggestion of 

```
dmesg | less
```

 will give you the kernel messages which is probably where the warning occures. this warning is not severe so Don't worry about it until everything else is working. 

About DHCP, if you are booting gentoo from the hard disk now and not the live cd you probably missed the part in the manual where it told you to do 

```
emerge dhcpcd
```

 if you have it configured manualy and working you need to run that command then dhcp should work. 

DHCP Client Deamon is the program that sends out DHCP packets to get you an ip address.

EDIT: "dmesg" was "dmseg"Last edited by jdmulloy on Thu Aug 10, 2006 3:23 pm; edited 1 time in total

----------

## Dheath

 *jdmulloy wrote:*   

> Are you on the live cd or the installed system. FantomKnight's suggestion of 
> 
> ```
> dmseg | less
> ```
> ...

 

I have already installed Gentoo. It is not the live cd. 

I know I forgot it but I emeged it with live cd. It worked the last time but now it just gives a nice error message when booting the system.

Btw. when I get the text where should I paste and ask about it?

----------

## jdmulloy

Post here I think I can help you. Or if you want post in "Networking & Security" and PM me the link. or link in this topic.

A nice feature that may help you is that the console has a scroolback buffer. Just hold down shift and use the up and down arrow keys or page up page dwow keys to scroll. if you install gpm then you can use your mouse to copy text and use links.

To copy text just higlight it then when your ready to pase click the middle button.

also post the out put of

```
less /etc/conf.d/net
```

you may need to adjust your network configuration.

----------

## bitwise

Just to answer your question about modules:

When you configure the kernel, you're telling it what you want to compile support for (such as device drivers, etc). The kernel has 1 of 2 ways it can include this functionality.

The first way is when it is marked <*>: This means it will be compiled directly into the kernel itself, leaving a self contained kernel for you to use

The second way is the <M> modular way. This means it will be compiled as a seperate module that will live with other modules in /lib/modules. These modules are then loaded into a running kernel with modprobe `modulename`

you can see the running modules by running lsmod.

An important note: notice that modules are loaded into a running kernel. A lot of beginners make the mistake of compiling things like their SATA controller drivers as a module. This means that when the bootloader tries to load the kernel, the kernel can't start because it doesn't know how to talk to the root partition!

as to why one or the other? beyond the above case of 'required to boot', it's a matter of convenience. Have a wireless nic you only sometimes use? load/unload the driver module as you need it. It's also a good idea when you are configuring for a machine that you don't know 100% what the hardware is, as you can go down the list of modules till you see which one works

----------

## Dheath

 *jdmulloy wrote:*   

> Post here I think I can help you. Or if you want post in "Networking & Security" and PM me the link. or link in this topic.
> 
> A nice feature that may help you is that the console has a scroolback buffer. Just hold down shift and use the up and down arrow keys or page up page dwow keys to scroll. if you install gpm then you can use your mouse to copy text and use links.
> 
> To copy text just higlight it then when your ready to pase click the middle button.
> ...

 

Yea...

I know the scroolback buffer feature...

1) Gpm doesnt start automatically so I have to start it always manually.

2) Usually when I try to scroll up to see the text (shift + arrows) it just doesnt move upwards. Login doesnt help. I have noticed that when I do some command that gives more text than can fit in the screen like ls in a folder that has a lot of files. I can do that scrolling but when I push enter (doesnt depend if there is a command or not) I can not go up to see the ls command any more.

/etc/conf.d/net

```

config_eth0=( "dhcp" )

```

+ comments

Ok, some text that might explain something:

```

# dhcpcd

Error, dhcpStart: ioctl SIOCGIFHWADDR: No such device

```

dmseg | less

```

-bash: dmseg: command not found

```

I put the "verpose mode"  on in /etc/conf.d/rc

```

# /etc/init.d/net.eth0 start

* Caching service dependencies ...

 : command not foundfont: line 2:

 : command not foundfont: line 9:

 : command not foundfont: line 11:

 : command not foundfont: line 15:                                         [ ok ] 

* Starting eth0

  *   Loading networking modules for eth0

   *     modules: iptunnel ifconfig dhcpcd apipa

    *       ifconfig provides interface

     *       dhcpcd provides dhcp

      *   Bringing up eth0

       *     dhcp

        *       eth0 does not exist                                              [ !! ]

```

And I did this but when booting it says some error about the fonts (sorry cant get it) and gives about 20 lines like this:

```

 : command not foundfont: line 2:

 : command not foundfont: line 9:

 : command not foundfont: line 11:

 : command not foundfont: line 15:     

```

So my ö, ä and å wont work. There just comes some weird characters.

I didnt mean "dmseg | less". You know when you boot there comes quite many "[ ok ]" messages meaning that the programs started correctly. Meanwhile, I have those "[ !! ]" plus one more. 

Im not sure if there is [ !! ]" sign but there certainly is 20-30 lines some uncolored dull text lines that says something about some error. I think it might be that I emerged links and it seemd like it got X with it and that complains something but Im not sure about that. It is impossible to read it if I dont get the boot up text from somewhere. It just goes just way too fast.

I have some knowledge how to use Linux but I have almost no knowledge of its errors and the way to fix them. I have installed one Linux before but after the install I almost stopped using it because I didnt have one program that time. Now I have it.

When I have X, FireFox, internet and Alsa working I think that I will stop bothering you.

But now I'm starting to think that this tread doesn't belong to this area.

And thanks for help!Last edited by Dheath on Thu Aug 10, 2006 3:33 pm; edited 3 times in total

----------

## sageman

 *bitwise wrote:*   

> 
> 
> as to why one or the other? beyond the above case of 'required to boot', it's a matter of convenience. Have a wireless nic you only sometimes use? load/unload the driver module as you need it. It's also a good idea when you are configuring for a machine that you don't know 100% what the hardware is, as you can go down the list of modules till you see which one works

 

Let me add a couple of reasons to use modules too. A good example I have is my video card. If it was built in, and the driver crashed (a succient possibility with some video cards), I would have to reboot the computer to get the video card to work again -- a la windoze. However, with a module, I can simply "rmmod nvidia; modprobe nvidia", boom, it works. I've actually had to do this before with my video card and sound card (just kept playing the last second of sound over and over, probably whatever was in it's buffer).

Additionally, some drivers actually only function (or fully function) as modules.

As a rule of thumb, if I need something which is fundamental (harddisk, filesystem, et cetera), I build it in. Almost everything else is a module. I certainly make sure that anything that is getting plugged-in/unplugged is a module.

----------

## jdmulloy

Looks like the driver for your networking card is missing.

eth0 is the network device. It can't find it. Check your kernel configuration.

emerge pciutils if you haven't, run

```
lspci | grep ethernet
```

 and post the result so we can help you configure the right driver. Is this your only computer or do you have another you can use for the forums.

----------

## Dheath

 *jdmulloy wrote:*   

> Looks like the driver for your networking card is missing.
> 
> eth0 is the network device. It can't find it. Check your kernel configuration.
> 
> emerge pciutils if you haven't, run
> ...

 

I have a computer next to this one but I dont generally use it and I dont like the idea that I copy the text by hand.

I have drivers for ext2/3 filesystems for XP (read and write). So, it just requires a damn meny times to boot this machine if there is a command that I should use and see what it says.

Edit: It really makes me wonder. I had the dhcp working but suddenly it stopped working.Last edited by Dheath on Thu Aug 10, 2006 7:40 pm; edited 1 time in total

----------

## jdmulloy

To get a framebuffer console follow this.

With a framebuffer splash the console is smoother and more importantly the resolution is higher so you see more lines on the screen, not just 80x25 charachters. This means you can see more of what happens before the login prompt.

----------

## Dheath

Well, this is odd...

```

# lspci | grep ethernet

#

```

I have network working well in this computer with XP and many live cds

```

# lspci

00:00.0 Host bridge: VIA Technologies, Inc. VT8385 [K8T800 AGP] Host Bridge (rev 01)

00:01.0 PCI bridge: VIA Technologies, Inc. VT8237 PCI bridge [K8T800/K8T890 South]

00:0b.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8169 Gigabit Ethernet (rev 10)

00:0f.0 RAID bus controller: VIA Technologies, Inc. VIA VT6420 SATA RAID Controller (rev 80)

00:0f.1 IDE interface: VIA Technologies, Inc. VT82C586A/B/VT82C686/A/B/VT823x/A/C PIPC Bus Master IDE (rev 06)

00:10.0 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 81)

00:10.1 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 81)

00:10.2 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 81)

00:10.3 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 81)

00:10.4 USB Controller: VIA Technologies, Inc. USB 2.0 (rev 86)

00:11.0 ISA bridge: VIA Technologies, Inc. VT8237 ISA bridge [KT600/K8T800/K8T890 South]

00:11.5 Multimedia audio controller: VIA Technologies, Inc. VT8233/A/8235/8237 AC97 Audio Controller (rev 60)

00:18.0 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] HyperTransport Technology Configuration

00:18.1 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Address Map

00:18.2 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] DRAM Controller

00:18.3 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Miscellaneous Control

01:00.0 VGA compatible controller: nVidia Corporation NV40 [GeForce 6800 GT] (rev a1)

```

At the start up there was a error about some clock thing "invalid module..." and more errors about "invalid pci drivers..."

I hope that framebuffer works...

Let see tomorrow.

----------

## FantomKnight

The machine sees your Ethernet card:

 *Quote:*   

> 00:0b.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8169 Gigabit Ethernet (rev 10)

 

So, you need to make certain that the drivers for Realtek is in your kernel:

make menuconfig

Device Drivers --->

Networking support --->

Ethernet (1000 MBit) --->

[*] Realtek 8169 gigabit ethernet support

----------

