Find the answer to your Linux question:
Results 1 to 7 of 7
Hi, I have some doubts regarding kernel compilation. I read all the 10 posts for 'compiling kernel' search. None really helped in clearing this doubt. As I understand, a) bzImage ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux User saivin's Avatar
    Join Date
    Dec 2008
    Location
    Bengaluru, India
    Posts
    305

    [SOLVED] bzImage or vmlinuz? kernel compilation doubts


    Hi,
    I have some doubts regarding kernel compilation. I read all the 10 posts for 'compiling kernel' search. None really helped in clearing this doubt.

    As I understand,
    a) bzImage is the output of 'make',
    b) entries in /lib/modules are the output of 'make modules_install' and
    c) vmlinuz, config and System.map are outputs of 'make install'.

    I understand initrd.img and config. One is minimal set of drivers or such to boot system and then pass the control to actual kernel and the second is the configuration file for kernel compilation (Correct me if I'm wrong).

    I however did not understand bzImage vs vmlinuz. Most distros use vmlinuz, but Gentoo is happy running from bzImage.

    Also, I did not understand what exactly is System.map. Peter at dirac.org (and wikipedia) says, its like symbol table for the kernel. I'm not clear about it. Why does Slackware, if I'm correct, use System.map instead of initrd.img. Totally confused.

    Can any of you explain it in more newbie-friendly way?
    Last edited by saivin; 06-11-2009 at 04:03 PM. Reason: typo
    A candle looses nothing by lighting other candles. - Khalil Zibran.
    Registered Linux User #490076

  2. #2
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,748
    I'm not much up-to-speed on this, but I did notice in the notes for the 2.6.30 kernel (just being released this week) that bzImage support is being removed from the kernel, so my guess is that vmlinux is the (current) preferred technique for bootstrapping the kernel.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  3. #3
    Linux Guru Lakshmipathi's Avatar
    Join Date
    Sep 2006
    Location
    3rd rock from sun - Often seen near moon
    Posts
    1,769

    Smile

    however did not understand bzImage vs vmlinuz. Most distros use vmlinuz, but Gentoo is happy running from bzImage.
    bzImage stands for big compressed kernel image,while it found under
    directory like somepath/arch/i386/boot/bzImage moved to /boot and renamed as vmlinuz.

    You can also the use bzImage instead of vmlinuz.

    So both are same.

    Also, I did not understand what exactly is System.map.
    System.map will be used when the kernel detects fatal errors.
    So during normal bootup it's won't be used.
    First they ignore you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
    -----
    FOSS India Award winning ext3fs Undelete tool www.giis.co.in. Online Linux Terminal http://www.webminal.org

  4. $spacer_open
    $spacer_close
  5. #4
    Linux User saivin's Avatar
    Join Date
    Dec 2008
    Location
    Bengaluru, India
    Posts
    305
    Quote Originally Posted by Lakshmipathi View Post
    bzImage stands for big compressed kernel image,while it found under
    directory like somepath/arch/i386/boot/bzImage moved to /boot and renamed as vmlinuz.

    You can also the use bzImage instead of vmlinuz.

    So both are same.
    Then why do we do 'make install' the output of which is three files vmlinuz, config and system.map?

    Is it just like difference between useradd and adduser? (as I understand 'adduser' not very different from 'useradd'; it just does some extra tweaking like creating homedirectory, creating group by same name, assigning a default shell etc.)

    Quote Originally Posted by Lakshmipathi View Post
    System.map will be used when the kernel detects fatal errors.
    So during normal bootup it's won't be used.
    But Slackware uses 'System.map' instead of 'initrd.img'?
    A candle looses nothing by lighting other candles. - Khalil Zibran.
    Registered Linux User #490076

  6. #5
    Just Joined!
    Join Date
    Apr 2009
    Posts
    33
    Quote Originally Posted by saivin View Post
    Hi,
    I have some doubts regarding kernel compilation. I read all the 10 posts for 'compiling kernel' search. None really helped in clearing this doubt.


    I however did not understand bzImage vs vmlinuz. Most distros use vmlinuz, but Gentoo is happy running from bzImage.
    bzImage and vmlinuz are exactly the same file
    when I build a new kernel I don't use make install
    I use only make install_modules and I copy manually
    System.map, .config, bzImage (located in arch/x86/boot/bzImage)
    to /boot
    and I rename bzImage vmlinuz-$version
    (where $version is the version of the kernel I just built) and
    I make a symbolic link to it that I name vmlinuz
    but it's just a convention
    I could name it bzImage if I wanted to, provided that I also
    use the same name in the boot loader (lilo or grub)

  7. #6
    Linux Guru Lakshmipathi's Avatar
    Join Date
    Sep 2006
    Location
    3rd rock from sun - Often seen near moon
    Posts
    1,769
    But Slackware uses 'System.map' instead of 'initrd.img'?
    vmlinuz - Nothing but bzImage file.
    config - Config file used for kernel compliation
    system.map - Used by kernel ,if it needs to recover from fatal errors.
    initrd - Used to mount real root file system


    initrd.img is completely different from System.map.

    While System.map is used for debugging.
    initrd.img stands for initial ram disk,provides initial temporary file system which
    allows kernel to mount the real root file system,while booting.

    If you have real file system (ext3) build inside your kernel ,rather than using it as an
    loadable module,you won't need initrd.
    First they ignore you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
    -----
    FOSS India Award winning ext3fs Undelete tool www.giis.co.in. Online Linux Terminal http://www.webminal.org

  8. #7
    Linux User saivin's Avatar
    Join Date
    Dec 2008
    Location
    Bengaluru, India
    Posts
    305
    Thanks guys, things are getting little clearer now. Ofcourse, I got to do lot of reading. But I'm feeling better now.
    A candle looses nothing by lighting other candles. - Khalil Zibran.
    Registered Linux User #490076

Posting Permissions

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