New kernel, init not found

Discussion in 'Linux, BSD and Other OS's' started by Addis, Feb 4, 2006.

  1. Addis

    Addis The King

    Likes Received:
    91
    Trophy Points:
    48
    I tried to compile my own kernel, because I was rather bored and felt like config my own kernel to suit my hardware. (I also needed the latest kernel source to build my hotkeys program for my wifi card) So, I got the latest source code, menuconfig worked and I left out the options which I knew I definately didn't need. So after that, I did make, and then make modules_install and both worked fine.

    Got my new kernel in the arch/i386 directory and popped it into /boot. Then I continued to /etc/lilo.conf and cloned my current kernel option, but changed the kernel and label to my new one (preserved my old kernel).

    Then I run lilo, installs the new options and reboot. On choosing my new kernel, it continues to load until I get a 'kernel panic- not syncing: No init found. Try passing init=option to kernel' error.

    Here's my current lilo.conf file aswell.
    Code:
    # File generated by DrakX/drakboot
    # WARNING: do not forget to run lilo after modifying this file
    
    default="linux"
    boot=/dev/hda
    map=/boot/map
    keytable=/boot/uk.klt
    menu-scheme=wb:bw:wb:bw
    prompt
    nowarn
    timeout=100
    message=/boot/message
    image=/boot/vmlinuz
    	label="linux"
    	root=/dev/hda8
    	initrd=/boot/initrd.img
    	append="noapic splash=silent"
    	vga=788
    image=/boot/vmlinuz-test
    	label="lintest"
    	root=/dev/hda8
    	initrd=/boot/initrd-2.6.12-12mdk.img
    	append="init=/boot/initrd.img noapic splash=silent"
    	vga=788
    image=/boot/vmlinuz
    	label="linux-nonfb"
    	root=/dev/hda8
    	initrd=/boot/initrd.img
    	append=" noapic"
    image=/boot/vmlinuz
    	label="failsafe"
    	root=/dev/hda8
    	initrd=/boot/initrd.img
    	append="failsafe"
    other=/dev/hda2
    	label="windows"
    	table=/dev/hda 
    
    The initrd-2.6.12-12mdk.img bit was actually initrd.img but I tried changing it to that still didn't work.

    Know where I went wrong? Should I just use a default rpm kernel?
     
  2. Anti-Trend

    Anti-Trend Nonconformist Geek

    Likes Received:
    118
    Trophy Points:
    63
    I compile my own kernels on my workstations, but I do it from vendor-supplied source code because they include patches and backported changes from later kernels as well as select 3rd party patches and modules. With Mandriva, the process goes something like this:
    1. urpmi kernel-source-2.6
    2. make mrproper
    3. make menuconfig
    4. Edit the Makefile, giving it a custom 'extraversion', such as: EXTRAVERSION = -15_k7_4gb_01 ...everything after the '-15' is my little description of my kernel, but really it could be anything that makes sense to you.
    5. make && make bzImage && make modules && make modules_install && make install

    Do's and Don'ts:
    • Do: use the '?' key a lot in menuconfig. It will give you important information on the kernel component you have highlighted. Often, the description provided will give you straight-forward information such as "If you don't know what this does, you don't need it."
    • Don't: go overboard -- it's nice to compile out features that do not suit your needs, as it lightens your kernel and allows it to potentially run much faster. However, you can easily compile out components you need by mistake, limiting the functionality of your system or even rendering your new kernel unbootable. Which brings me to my next point...
    • Don't: delete your old kernel either from the system or from the boot menu until you are positive your new kernel is working the way you expect it to. That way, if you accidentally mess up your new kernel during the learning process, you can always revert to your old kernel and try again.
    • Do: customize your processor family to match your CPU
    • Do: enable a preemptible kernel and 'Preempt The Big Kernel Lock' if you are compiling your kernel for a workstation and not a server or embedded device.
     
  3. Addis

    Addis The King

    Likes Received:
    91
    Trophy Points:
    48
    Thanks AT. I'll recompile using the points you suggested. Good thing I kept my old kernel.
     
  4. Anti-Trend

    Anti-Trend Nonconformist Geek

    Likes Received:
    118
    Trophy Points:
    63
    No problem. And oh yeah, I forgot to mention that you should compile out OSS altogether from the sound system, as OSS is depreciated. As long as you leave in ALSA with OSS compatibility, you will still be able to use older apps written to use OSS, but without needing OSS itself.
     
  5. Addis

    Addis The King

    Likes Received:
    91
    Trophy Points:
    48
    Jaaaaaa! Kernel's working now, it works with the extra make commands. Now to update KDE....
     

Share This Page