LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Gentoo (https://www.linuxquestions.org/questions/gentoo-87/)
-   -   kernel install question (https://www.linuxquestions.org/questions/gentoo-87/kernel-install-question-826353/)

charlie_lab 08-15-2010 10:42 AM

kernel install question
 
Hello,

After working with several linux distro's I'm coming back to gentoo always.
But when I install gentoo I have to make my own config so the kernel works.
I have asked several times help on the kernel subforum.
But my question is :

how can I learn to build my own kernel ?

Roelof

indienick 08-15-2010 11:02 AM

What would you like to learn? I'm no guru of the kernel-building world, but I have compiled many a kernel, successfully. :)

charlie_lab 08-15-2010 11:05 AM

Hello Indienic.

How to compile a kernel on my computer.

I also compiled several kernel but always a kernel panic because of not finding the root partition.

Roelof

MrChilly0 08-15-2010 12:15 PM

2 things...
1. how do you have your partitions set up
2. did you have the file system type built into the kernel or as a module?

IF you have a ext4 partition as / and it's not built into the kernel, the kernel can't read it and you get that error...(substitute ext4 for any other partition)

alunduil 08-15-2010 12:23 PM

If you're uncomfortable configuring your own kernel I recommend starting with a seed: http://kernel-seeds.org/ and then just keep trying until you get one that works the way you like. Building kernels is one of those things that you learn best by simply doing it. Don't be afraid if you box doesn't boot on the first attempt. Just remount, rechroot, and rebuild the kernel to try again.

Regards,

Alunduil

monsm 08-16-2010 07:56 AM

Quote:

Originally Posted by alunduil (Post 4066971)
If you're uncomfortable configuring your own kernel I recommend starting with a seed: http://kernel-seeds.org/ and then just keep trying until you get one that works the way you like. Building kernels is one of those things that you learn best by simply doing it. Don't be afraid if you box doesn't boot on the first attempt. Just remount, rechroot, and rebuild the kernel to try again.

Regards,

Alunduil

Yes, completely agree. Kernel-seeds are great for learning about the kernel (and to install). Pappy McFae (the man behind the seeds) is also responding to specific kernel questions on the kernel seed threads on the gentoo forums on gentoo.org.

Mons

indienick 08-16-2010 11:06 AM

Whenever I build a kernel from source, after the initial downloading and unpacking of the archive the kernel source came in, I run "make oldconfig" to mimic the currently-running kernel.

After that, I just whittle down the things I don't need. :)

charlie_lab 08-16-2010 11:25 AM

Oke

Thanks for the tips.

Roelof

i92guboj 08-17-2010 02:05 AM

The errors about not being able to find the root device are common and they can occur for one of many causes.

The truly important pieces that you will need in your kernel are the modules that will give you access to your root file system. That's basically the driver for your IDE or SATA chipset and the driver for the fs itself (ext3, reiserfs or whatever else). These need to remain accessible to your kernel while the fs can't still be seen at boot time, that means that you either link those statically into the kernel ('*' option in menuconfig) or you put them inside an initrd if you use that kind of thing.

Provided you have that sorted out, all you need is to configure your bootloader correctly, usually by editing /boot/grub/grub.conf

konsolebox 08-17-2010 02:12 AM

I think everything's well documented in Gentoo:

Gentoo Linux Documentation -- Configuring the Kernel
Gentoo Linux Documentation -- Compiling the Linux kernel
Gentoo Linux Documentation -- Gentoo Linux Kernel Upgrade Guide

CiScOh4x0r 08-17-2010 09:58 AM

Gentoo linux is a very well documented distribution. You should read the Gentoo Handbook. Anyway, you just should learns your computer hardware, and you will know how to configure your Gentoo kernel.

Regards,


All times are GMT -5. The time now is 10:05 AM.