# Switching from genkernel to Manual Configuration?

## Thesniperofdeath

When I first installed gentoo I was didn't know what hardware I had and I manually configured the genkernel with initramfs and the drivers.

So is it as simple as unmerging genkernel then copying the kernel-config to the /usr/src/linux.Then use lsmod and sort out the drivers in /etc/modules.autoload.d/kernel-2.6 and then reconfiguring the boot loader?or I am missing something?

----------

## jburns

There is no need to unmerge genkernel.  genkernel has an option to edit the kernel config file that you could use, use man genkernel to see the options.  You could also just follow the procedure to manually compile the kernel.  See Pappy's Kernel Seeds in the Unsupported Software forum.

----------

## Thesniperofdeath

 *jburns wrote:*   

> There is no need to unmerge genkernel.  genkernel has an option to edit the kernel config file that you could use, use man genkernel to see the options.  You could also just follow the procedure to manually compile the kernel.  See Pappy's Kernel Seeds in the Unsupported Software forum.

 

Well I need it to go faster,I previously used Arch and Slackware.They booted to the login screen about under 12 secs and the genkernel is about  under 34 but everything else is extremely fast in gentoo.

----------

## Thesniperofdeath

I have a x86_64 machine.When I compiled the manual kernel and copied the bzImage in the arch x86_64, it was a linked to a x86 kernel.After rebooting it failed No file found. :/

----------

## Jaglover

 *Thesniperofdeath wrote:*   

> I have a x86_64 machine.When I compiled the manual kernel and copied the bzImage in the arch x86_64, it was a linked to a x86 kernel.After rebooting it failed No file found. :/

 

This is a GRUB error. Meaning you made a typo in grub.conf. Or the kernel image is not where it is supposed to be.

----------

## Thesniperofdeath

 *Jaglover wrote:*   

> This is a GRUB error. Meaning you made a typo in grub.conf. Or the kernel image is not where it is supposed to be.

 

Um.. also why does the kernel compile in x86? when I have a x86_64 machine?

```
CONFIG_64BIT=y

# CONFIG_X86_32 is not set

CONFIG_X86_64=y

CONFIG_X86=y

CONFIG_INSTRUCTION_DECODER=y

CONFIG_OUTPUT_FORMAT="elf64-x86-64"

CONFIG_ARCH_DEFCONFIG="arch/x86/configs/x86_64_defconfig"

CONFIG_GENERIC_CMOS_UPDATE=y

CONFIG_CLOCKSOURCE_WATCHDOG=y

CONFIG_GENERIC_CLOCKEVENTS=y

CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y

CONFIG_LOCKDEP_SUPPORT=y

CONFIG_STACKTRACE_SUPPORT=y

CONFIG_HAVE_LATENCYTOP_SUPPORT=y

CONFIG_MMU=y

CONFIG_ZONE_DMA=y

CONFIG_NEED_DMA_MAP_STATE=y

CONFIG_NEED_SG_DMA_LENGTH=y

CONFIG_GENERIC_ISA_DMA=y

CONFIG_GENERIC_IOMAP=y

CONFIG_GENERIC_BUG=y

CONFIG_GENERIC_BUG_RELATIVE_POINTERS=y

CONFIG_GENERIC_HWEIGHT=y

CONFIG_ARCH_MAY_HAVE_PC_FDC=y

# CONFIG_RWSEM_GENERIC_SPINLOCK is not set

CONFIG_RWSEM_XCHGADD_ALGORITHM=y

CONFIG_ARCH_HAS_CPU_IDLE_WAIT=y

CONFIG_GENERIC_CALIBRATE_DELAY=y

CONFIG_GENERIC_TIME_VSYSCALL=y

CONFIG_ARCH_HAS_CPU_RELAX=y

CONFIG_ARCH_HAS_DEFAULT_IDLE=y

CONFIG_ARCH_HAS_CACHE_LINE_SIZE=y

CONFIG_HAVE_SETUP_PER_CPU_AREA=y

CONFIG_NEED_PER_CPU_EMBED_FIRST_CHUNK=y

CONFIG_NEED_PER_CPU_PAGE_FIRST_CHUNK=y

CONFIG_HAVE_CPUMASK_OF_CPU_MAP=y

CONFIG_ARCH_HIBERNATION_POSSIBLE=y

CONFIG_ARCH_SUSPEND_POSSIBLE=y

CONFIG_ZONE_DMA32=y

CONFIG_ARCH_POPULATES_NODE_MAP=y

CONFIG_AUDIT_ARCH=y

CONFIG_ARCH_SUPPORTS_OPTIMIZED_INLINING=y

CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y

CONFIG_HAVE_EARLY_RES=y

CONFIG_GENERIC_HARDIRQS=y

CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y

CONFIG_GENERIC_IRQ_PROBE=y

CONFIG_GENERIC_PENDING_IRQ=y

CONFIG_USE_GENERIC_SMP_HELPERS=y

CONFIG_X86_64_SMP=y

CONFIG_X86_HT=y

CONFIG_X86_TRAMPOLINE=y

CONFIG_ARCH_HWEIGHT_CFLAGS="-fcall-saved-rdi -fcall-saved-rsi -fcall-saved-rdx -fcall-saved-rcx -fcall-saved-r8 -fcall-saved-r9 -fcall-saved-r10 -fcall-saved-r11"

# CONFIG_KTIME_SCALAR is not set

CONFIG_ARCH_CPU_PROBE_RELEASE=y

CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"

CONFIG_CONSTRUCTORS=y

```

----------

## Jaglover

That's OK, this is just the way kernel build works. For your convenience there is a symlink in arch/x86_64/boot pointing to the kernel image you can use if you feel like it.

----------

## Thesniperofdeath

BRUB

```

default 0

timeout 5

splashimage=(hd0,0)/boot/grub/splash.xpm.gz

title Gentoo Linux 2.6.36-r5

root (hd0,0)

kernel /boot/kernel-x86_64-2.6.36-gentoo-r5 root=/dev/sda3

```

Recompiled.. with some changes to the genkernel ..config

```
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,2)
```

----------

## Jaglover

You missed support for your HDD controller, it has to be built in, not as module. If you do not use initrd as it is not needed with a custom kernel.

----------

## Thesniperofdeath

 *Jaglover wrote:*   

> You missed support for your HDD controller, it has to be built in, not as module. If you do not use initrd as it is not needed with a custom kernel.

 

Could you tell me where it is in the KMS? Thank you.

----------

## Jaglover

This site will help to identify your hardware: http://kmuto.jp/debian/hcl/

There are many kernel configuration guides, we even have our own: http://www.gentoo.org/doc/en/kernel-config.xml

----------

