Find the answer to your Linux question:
Results 1 to 5 of 5
Ok. I will try to make myself as clear as possible. I just ventured into the land of compiling kernels. I have done this successfully and am currently running the ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jan 2009
    Posts
    5

    Important Kernel Files


    Ok. I will try to make myself as clear as possible.

    I just ventured into the land of compiling kernels. I have done this successfully and am currently running the most up to date one. The thing is that I have a lot of junk left over and I don't know what is safe to get rid of. Here is my take on things.

    /boot
    I need to keep vmlinuz, initrd, and System.map (unsure about config)
    /lib/modules
    I need to keep everything here.
    /usr/src
    I have no idea what I need to keep or discard here.

    If the kernel installation put files elsewhere, could anyone let me know the possible places.

    I tried searching for this question but never got a cut and dry answer. If someone could point me towards the right direction it would be greatly appreciated!

  2. #2
    Just Joined!
    Join Date
    May 2007
    Posts
    8
    The /usr/src directory contains the kernel source tree, which you must have if you also interested in building the loadable kernel modules.

  3. #3
    Just Joined!
    Join Date
    Jan 2009
    Posts
    5
    But after I have completed building the kernel and the modules, there is no further use for it, right? I just have some space contraints and need to know what I can keep or throw away.

    I did some further research and it is my belief that I really only need the files in /boot and /lib/modules. Can anyone verify this?

  4. $spacer_open
    $spacer_close
  5. #4
    Linux User
    Join Date
    Jan 2006
    Posts
    414
    That's right, you don't need anything in /usr/src/ once you've finished compiling everything. Generally a good idea to keep the .config though, so you can recompile the exact same kernel configuration another time if needed.

  6. #5
    Just Joined!
    Join Date
    May 2007
    Posts
    8
    If you want to use the linux system as a desktop OS, or for application programming then your thinking is correct.
    If you want to develop some code which you would like to run in kernel space (LKM), then you will require this directory.

Posting Permissions

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