Find the answer to your Linux question:
Results 1 to 7 of 7
How do you compile the linux kernel and what files do you need to compile in order for linux to run?...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Enthusiast
    Join Date
    Dec 2004
    Posts
    577

    Compile Linux Kernel


    How do you compile the linux kernel and what files do you need to compile in order for linux to run?

  2. #2
    Linux Newbie
    Join Date
    Dec 2004
    Location
    Barrie, Ontario
    Posts
    219
    Digital Hermit's Kernel Howto is a step by step guide for recompiling a kernel.
    Blog - KB5UMQ - Linux User #272983
    3 Rules:
    1) "It doesn't work..." is simply not useful information.
    2) Don't cross post!
    3) If you are asking for help, start by telling us your distro/os and version.

  3. #3
    Just Joined!
    Join Date
    Mar 2005
    Posts
    41

    compiling kernel

    Quote Originally Posted by Kode
    Digital Hermit's Kernel Howto is a step by step guide for recompiling a kernel.
    I've followed this HOW-TO but when I get down to the actual replacement of the bootable image I'm a little confused. The HOW-TO has information that's different than what I have.
    I'm using SLACKWARE 10, 2.4.9 kernel

    The confusion comes as to what files are the bootable files etc.
    The files I have in /boot are
    boot.0300
    boot0302
    oot.0303
    boot_message.txt
    config
    config-ide.2.4.29
    diag1.,img
    map
    system.map
    system.map-ide-2
    vmlinuz-ide-2.4.29
    vmlinuz


    in the source/boot directory after kernel build I have bzImage

    but here's what the HOW-TO says:
    $ cp arch/i386/boot/bzImage /boot/bzImage-KERNEL_VERSION
    $ cp System.map /boot/System.map-KERNEL_VERSION
    $ ln -s /boot/System.map-KERNEL_VERSION /boot/System.map

    it has a link to system.map which doesn't exist in the location specified.

    any help would be appreciated.
    Thanks
    -ej

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Newbie
    Join Date
    Dec 2004
    Location
    Barrie, Ontario
    Posts
    219
    Are you using 2.4.9 or 2.6.9 ?

    System.map is CASE sensitive...

    Do what the howto says, then you should have:

    Code:
    bzImage-2.4.9
    System.map -> System.map-2.4.9
    System.map-2.4.9
    (the other files don't matter)
    Blog - KB5UMQ - Linux User #272983
    3 Rules:
    1) "It doesn't work..." is simply not useful information.
    2) Don't cross post!
    3) If you are asking for help, start by telling us your distro/os and version.

  6. #5
    Just Joined!
    Join Date
    Mar 2005
    Posts
    41
    the confusion came between bzImage and vmlinuz.
    They are one in the same.
    I've now been through this enough times that it's like before.. it gets easier and easier.
    the first compile wasn't as flawless. The second was done from X, with xconfig which seemed to omit all my networking. The 3rd was good..but missed some modules. The 4th was great and now my wireless G network card works...sort of.
    10 minutes on.. 2 or 3 off.. non stop with nothing in the logs, not debug, syslog, messages etc.



    Quote Originally Posted by Kode
    Are you using 2.4.9 or 2.6.9 ?

    System.map is CASE sensitive...

    Do what the howto says, then you should have:

    Code:
    bzImage-2.4.9
    System.map -> System.map-2.4.9
    System.map-2.4.9
    (the other files don't matter)

  7. #6
    Just Joined!
    Join Date
    Mar 2005
    Posts
    41

    kernel panic

    I recompiled a couple of times with no problems.

    Then I realized I'd left something out. Since then I've not gotten anything good.
    the last time here's what I got after a recompile:

    Kmod failed to exec ide-disk errorno = 2
    VFS: Cannot open root device "303" or 03:03
    Please append a correct "root" option
    Kernel Panic: Unable to mount root fs on 03:03

    Does this have something to do with one of the boot.300 files in the boot directory?

    Slackware 10, kernel 2.4.29

    When I compile here's what I do:

    make mrproper
    make menuconfig
    make dep
    make clean
    make bzImage

    make modules
    make modules_install

    but I think I must be doing something wrong. When I make the install for the modules, the last time I saw a lot of "nothing to be done for make modules_install"

    It'e presently making modules as we speak, then I'll make the install...and lastly :
    cp Syatem.map /boot
    cp arch/i386/boot/bzImage /boot/vmlinuz

    then I run lilo and reboot
    -ej

  8. #7
    Linux Newbie
    Join Date
    Dec 2004
    Location
    Barrie, Ontario
    Posts
    219
    You can't rename bzImage to vmlinuz -- they are different file formats... After you do your kernel build, do:
    Code:
    cp System.map /boot/System.map-2.4.29
    cp arch/i386/boot/bzImage /boot/bzImage-2.4.29
    ln -fs /boot/System.map-2.4.29 /boot/System.map
    It's OK to see a lot of 'nothing to do make modules_install' if you didn't configure your kernel with module support and/or didn't select anything to be compiled as a module.

    You are getting the 'VFS: Cannot open root device "303" or 03:03' messages because you have an incorrect or missing 'root=' option in your lilo.conf.

    In case it helps, here is a copy of a working lilo.conf:
    Code:
    read-only
    lba32
    prompt
    timeout = 600
    menu-title = "My Linux Machine"
    default = 2.4.29
    image = /boot/bzImage-2.4.29
    	label = 2.4.29
    	boot = /dev/hda
    	root = /dev/hda1
    Blog - KB5UMQ - Linux User #272983
    3 Rules:
    1) "It doesn't work..." is simply not useful information.
    2) Don't cross post!
    3) If you are asking for help, start by telling us your distro/os and version.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •