where is uncompressed kernel - Mandrake

This is a discussion on where is uncompressed kernel - Mandrake ; I have never considered this before. Obviously sitting around and thinking is quite dangerous. vmlinuz is the compressed kernel, but where is when it's expanded and what is it called. An inspired search for "vmlinux" failed. -- faeychild...

+ Reply to Thread
Results 1 to 10 of 10

Thread: where is uncompressed kernel

  1. where is uncompressed kernel

    I have never considered this before. Obviously sitting around and thinking is
    quite dangerous.

    vmlinuz is the compressed kernel, but where is when it's expanded and what is
    it called. An inspired search for "vmlinux" failed.

    --
    faeychild

  2. Re: where is uncompressed kernel

    faeychild wrote:
    > I have never considered this before. Obviously sitting around and thinking is
    > quite dangerous.
    >
    > vmlinuz is the compressed kernel, but where is when it's expanded and what is
    > it called. An inspired search for "vmlinux" failed.


    It is buried in the lower reaches of your kernel
    source code, or in the top directory of the source
    code if you chose to disable the default and not
    allow make to compress the kernel built.

    Cheers!

    jim b.

    --
    UNIX is not user-unfriendly; it merely
    expects users to be computer-friendly.

  3. Re: where is uncompressed kernel

    On Thu, 05 Jun 2008 20:18:37 -0400, faeychild wrote:

    > vmlinuz is the compressed kernel, but where is when it's expanded and what is
    > it called. An inspired search for "vmlinux" failed.


    I'm not quite sure I understand the question. The compressed kernel is stored
    in /boot/vmlinuz.$kernelversion
    (note vmlinuz with a z on the end).

    It's read by the bootloader, and uncompressed into ram, for execution. The
    uncompressed version does not exist on disk, unless as Jim suggested you
    choose not to compress it, when configuring/making the kernel.

    Regards, Dave Hodgins

    --
    Change nomail.afraid.org to ody.ca to reply by email.
    (nomail.afraid.org has been set up specifically for
    use in usenet. Feel free to use it yourself.)

  4. Re: where is uncompressed kernel

    David W. Hodgins wrote:

    > On Thu, 05 Jun 2008 20:18:37 -0400, faeychild wrote:
    >
    >> vmlinuz is the compressed kernel, but where is when it's expanded and what
    >> is it called. An inspired search for "vmlinux" failed.

    >
    > I'm not quite sure I understand the question. The compressed kernel is
    > stored in /boot/vmlinuz.$kernelversion
    > (note vmlinuz with a z on the end).
    >
    > It's read by the bootloader, and uncompressed into ram, for execution.


    Of course it is. In RAM. I must be having a slow brain morning. More coffee may
    help.
    Thanks David
    --
    faeychild

  5. Re: where is uncompressed kernel

    David W. Hodgins wrote:

    > On Thu, 05 Jun 2008 20:18:37 -0400, faeychild
    > wrote:
    >
    >> vmlinuz is the compressed kernel, but where is when it's expanded and
    >> what is it called. An inspired search for "vmlinux" failed.

    >
    > I'm not quite sure I understand the question. The compressed kernel is
    > stored in /boot/vmlinuz.$kernelversion
    > (note vmlinuz with a z on the end).
    >
    > It's read by the bootloader, and uncompressed into ram, for execution.
    > The uncompressed version does not exist on disk, unless as Jim suggested
    > you choose not to compress it, when configuring/making the kernel.


    If you build your own kernel, then it does very well exist on disk, Dave.
    The name should then be /vmlinux./

    The uncompressed kernel image must be created either way before it can be
    compressed, and should - as Jim Beard put it - reside somewhere in
    *./*KERNEL_VERSION/arch/$ARCHITECTURE.*

    Also note that the /vmlinuz-$VERSION/ image is typically built as the
    file /bzImage/ and only renamed to the /vmlinuz-$VERSION/ name when you
    run...

    make install

    So basically, if you build your own kernel, then you end up with both
    a /vmlinux/ and a /bzImage,/ but if you decide to copy the kernel image to
    */boot* yourself rather than to use the /install/ option to /make,/
    then /bzImage/ is the file you need, and then you are free to name it
    whatever you want.

    You do of course then manually have to update the bootloader configuration
    and point it to the correct kernel image yourself, a step which is normally
    taken care of /automagically/ if you run...

    make install

    ;-)
    --
    *Aragorn*
    (registered GNU/Linux user #223157)

  6. Re: where is uncompressed kernel

    faeychild wrote:

    > I have never considered this before. Obviously sitting around and thinking
    > is quite dangerous.


    .... But very educational. :-)

    > vmlinuz is the compressed kernel, but where is when it's expanded and what
    > is it called. An inspired search for "vmlinux" failed.


    /vmlinuz-$KERNELVERSION/ is the compressed kernel image. It gets loaded
    into memory by the GRUB or LILO bootloader. At this stage, the boot
    processor is still in real mode.

    The compressed kernel image contains a realmode bootstrapper, which will
    then set up the proper registers in the boot CPU, switch the boot CPU into
    protected mode and subsequently decompress the actual kernel image. The
    actual kernel will then bring other CPU cores online and start initializing
    the hardware. In other words, in a normal GNU/Linux distribution, the
    decompressed kernel image only exists in RAM, in runtime.

    Most GNU/Linux distributions also come with a set of kernel headers, which
    is a reduced set of kernel sources, typically installed under
    */usr/src/linux-$VERSION,* with */usr/src/linux* being a symbolic link to
    this directory. This is done because if you install multiple kernel source
    trees under */usr/src,* the compiler needs to be able to find the kernel
    sources that the distribution was built against, and then even still, this
    is only important if you decide to build out-of-tree kernel modules - i.e.
    kernel modules not part of the official kernel sources - or /glibc,/ which
    runs in userspace but needs the correct kernel headers to know how to
    interface with the kernel properly during context switches.

    Now, /vmlinux/ is indeed the uncompressed kernel image, but this will only
    exist on your hard disk if you decide to build your own kernel. In other
    words, you'll need a complete set of kernel sources and you must
    compile/build a kernel from them before there will be a /vmlinux/ file.

    After all, apart from doing a "cold" debugging analysis of the kernel - by
    this I mean a debugging of the kernel image on disk instead of the runtime
    kernel in RAM - you do not need to have a /vmlinux/ on your hard disk.
    This file is only created during the kernel build process - see above - as
    another step in the build, i.e. it needs to be created in order to create a
    compressed version of it.

    And _if_ you decide to build your own kernel, this compressed version will
    be called /bzImage./ The renaming to /vmlinuz-$SOMETHING/ is done by
    the...

    make install

    .... step of the build process. Should you decide to forego this last step
    and manually copy the compressed kernel image to */boot,* then
    the /bzImage/ file is what you need, and then you get to call it whatever
    you want. Just make sure that you update the bootloader configuration as
    needed to allow this new compressed kernel image to appear among your
    bootmenu choices.

    Updating GRUB is just a matter of updating the */boot/grub/menu.lst* file -
    in FHS-compliant systems, */etc/grub.conf* will be a symbolic link to that
    file - but if you have LILO as your bootloader, you'll need to update
    */etc/lilo.conf* and then run */sbin/lilo* to write the information to the
    designated bootsector or the master boot record.

    Hope this was helpful. ;-)

    --
    *Aragorn*
    (registered GNU/Linux user #223157)

  7. Re: where is uncompressed kernel

    Aragorn wrote:

    > faeychild wrote:
    >
    >> I have never considered this before. Obviously sitting around and thinking
    >> is quite dangerous.

    >
    > ... But very educational. :-)
    >
    >> vmlinuz is the compressed kernel, but where is when it's expanded and what
    >> is it called. An inspired search for "vmlinux" failed.

    >
    > /vmlinuz-$KERNELVERSION/ is the compressed kernel image. It gets loaded
    > into memory by the GRUB or LILO bootloader. At this stage, the boot
    > processor is still in real mode.
    >
    > The compressed kernel image contains a realmode bootstrapper, which will
    > then set up the proper registers in the boot CPU, switch the boot CPU into
    > protected mode and subsequently decompress the actual kernel image. The
    > actual kernel will then bring other CPU cores online and start initializing
    > the hardware. In other words, in a normal GNU/Linux distribution, the
    > decompressed kernel image only exists in RAM, in runtime.


    Hi Aragorn
    I've seen you posting again, Welcome back

    I remember that I actually know this. I have no explanation for not knowing it
    the other day though.
    I think my brain must have fallen over. It's a pity that it can't be fsck'd.
    >
    > Most GNU/Linux distributions also come with a set of kernel headers, which
    > is a reduced set of kernel sources, typically installed under
    > */usr/src/linux-$VERSION,* with */usr/src/linux* being a symbolic link to
    > this directory. This is done because if you install multiple kernel source
    > trees under */usr/src,* the compiler needs to be able to find the kernel
    > sources that the distribution was built against, and then even still, this
    > is only important if you decide to build out-of-tree kernel modules - i.e.
    > kernel modules not part of the official kernel sources - or /glibc,/ which
    > runs in userspace but needs the correct kernel headers to know how to
    > interface with the kernel properly during context switches.
    >
    > Now, /vmlinux/ is indeed the uncompressed kernel image, but this will only
    > exist on your hard disk if you decide to build your own kernel. In other
    > words, you'll need a complete set of kernel sources and you must
    > compile/build a kernel from them before there will be a /vmlinux/ file.
    >
    > After all, apart from doing a "cold" debugging analysis of the kernel - by
    > this I mean a debugging of the kernel image on disk instead of the runtime
    > kernel in RAM - you do not need to have a /vmlinux/ on your hard disk.
    > This file is only created during the kernel build process - see above - as
    > another step in the build, i.e. it needs to be created in order to create a
    > compressed version of it.
    >
    > And _if_ you decide to build your own kernel, this compressed version will
    > be called /bzImage./ The renaming to /vmlinuz-$SOMETHING/ is done by
    > the...
    >
    > make install
    >
    > ... step of the build process. Should you decide to forego this last step
    > and manually copy the compressed kernel image to */boot,* then
    > the /bzImage/ file is what you need, and then you get to call it whatever
    > you want. Just make sure that you update the bootloader configuration as
    > needed to allow this new compressed kernel image to appear among your
    > bootmenu choices.
    >
    > Updating GRUB is just a matter of updating the */boot/grub/menu.lst* file -
    > in FHS-compliant systems, */etc/grub.conf* will be a symbolic link to that
    > file - but if you have LILO as your bootloader, you'll need to update
    > */etc/lilo.conf* and then run */sbin/lilo* to write the information to the
    > designated bootsector or the master boot record.
    >
    > Hope this was helpful. ;-)


    Always find your posts interesting


    --
    faeychild

  8. Re: where is uncompressed kernel

    faeychild wrote:

    > Aragorn wrote:
    >
    >> /vmlinuz-$KERNELVERSION/ is the compressed kernel image. It gets loaded
    >> into memory by the GRUB or LILO bootloader. At this stage, the boot
    >> processor is still in real mode.
    >>
    >> The compressed kernel image contains a realmode bootstrapper, which will
    >> then set up the proper registers in the boot CPU, switch the boot CPU
    >> into protected mode and subsequently decompress the actual kernel image.
    >> The actual kernel will then bring other CPU cores online and start
    >> initializing the hardware. In other words, in a normal GNU/Linux
    >> distribution, the decompressed kernel image only exists in RAM, in
    >> runtime.

    >
    > Hi Aragorn
    > I've seen you posting again, Welcome back


    Thank you very much, but just for the record, you've already welcomed me
    back a while ago...

    As a sidenote, even now still after all of these years of being here, as
    well as after all my timeouts from this group - three so far, I believe - I
    still appreciate "the human factor" of both Mandr* groups - something which
    I have also seen in the Gentoo group, albeit that it's got less traffic
    than the Mandr* groups - compared to the rather sterile nature of the
    groups in the /comp.os.linux.*/ hierarchy.

    > I remember that I actually know this. I have no explanation for not
    > knowing it the other day though.
    > I think my brain must have fallen over. It's a pity that it can't be
    > fsck'd.


    Oh well, there's no shame in that, since we all have such moments every once
    in a while. ;-) The brain can only handle so much, you know, and sometimes
    things around us get a little too much and we shortcircuit somehow. :-)

    >> [...]
    >> Hope this was helpful. ;-)

    >
    > Always find your posts interesting


    Thank you very much, again. It is always nice to know one is
    appreciated. :-)

    Being who I am, I cannot ascertain such things if they're not explicitly
    being worded, and I sure don't take anything for granted in that department
    either. ;-)

    --
    *Aragorn*
    (registered GNU/Linux user #223157)

  9. Re: where is uncompressed kernel

    Aragorn wrote:


    >>
    >> Hi Aragorn
    >> I've seen you posting again, Welcome back

    >
    > Thank you very much, but just for the record, you've already welcomed me
    > back a while ago...
    >


    Well that confirms that I'm definitely losing my grip.



    And I'm drifting off topic

    --
    faeychild

  10. Re: where is uncompressed kernel

    faeychild wrote:

    >>> Hi Aragorn
    >>> I've seen you posting again, Welcome back

    >>
    >> Thank you very much, but just for the record, you've already welcomed me
    >> back a while ago...

    >
    > Well that confirms that I'm definitely losing my grip.
    >
    > And I'm drifting off topic


    Life would be very boring if we all strictly stuck to the topic... We'd all
    be good little drones, but where's the fun in that? :-)

    --
    *Aragorn*
    (registered GNU/Linux user #223157)

+ Reply to Thread