Results 1 to 7 of 7

Thread: Kernel Compile Question

  1. #1

    Kernel Compile Question

    Hello everyone. Well, I need help with compiling my first kernel.

    Let me give a bit of info:
    Using RH 7.2, kernel 2.4.9 and trying to compile kernel 2.4.18, latest stable kernel. Also using LILO bootloader.

    Here we go:

    I download the source tarball to /usr/src. While in the /usr/src directory, I see the current Linux directory that has my current kernel (2.4.9). From what i've read, I rename the Linux directory to linux-2.4.9.

    Once that is renamed, I then untar the tarball in the /usr/src directory. This creates the new Linux directory.
    (If i've goofed at any part here, let me know)

    Then: cd /usr/src/linux
    Now I make menuconfig (I like this version best)
    Setup my kernel. Once that is done:

    make dep ; make modules ; make modules_install

    then make bzImage

    Hows that so far?

    This is where im confused and read so many different articles, its made my head spin.

    What exactly do I do next? Do I manually move the bzImage to the /boot directory? What about the system.map file? This is where I need help.

    Also, what do I do with the current kernel in the /boot directory? Do I rename it? I'm lost after the make bzImage command.

    Then, once I have the kernel in the correct directory and my old kernel backed up, I need just a little push on the lilo.conf configuration.

    Thanks for everyones input. Great to be aboard here at these forums.

    Tarballed

  2. #2

    Re: Kernel Compile Question

    hello,
    Did you read the PET -> http://www.linuxjunior.org/cgi-bin/p...splay&id=9

    I know from personel experinace it works great with RH 7.2

  3. #3
    Moderator
    Good Guru
    Schotty's Avatar
    Join Date
    Jul 2001
    Location
    Milwaukee, WI
    Posts
    5,760

    Re: Kernel Compile Question


    What exactly do I do next? Do I manually move the bzImage to the /boot directory? What about the system.map file? This is where I need help.
    Yes you can copy the bzImage over into your /boot directory. I usually copy and rename it something like linux-2.4.18. Then go and edit your /etc/lilo.conf as root and add in like the entry in there your new kernel. Dont copy and replace the one that is already there, cuz if something went wrong youre screwed then. This way you can always reboot and go back to your old kernel and fix it. After the file is saved run lilo at a command prompt as root. Reboot and try it out

    If you are like me, and use grub, edit /boot/grub.con (I think its the right path) as root and just save and reboot. The syntax again is simple and you can just copy the section that applies to your kernel still in use and make another line with a few changes.

    Jsut remember that having a working kernel is a very nice thing to have. DOnt delete your old kernel for a while. Test your new on out and make sure it works befrore deleting the old one.

  4. #4

    Re: Kernel Compile Question

    Jsut remember that having a working kernel is a very nice thing to have. DOnt delete your old kernel for a while. Test your new on out and make sure it works befrore deleting the old one.

    I could not agree with you more. Thats why I want to make sure i do the steps correctly

    I did read the plain english tutorial. It appears to be very informative. I just have a coule of questions. Let me see if I can run through this.

    Download the source tarball to /usr/src.
    Rename the current Linux directory to the current kernel version running on the puter. (2.4.9)
    Untar the source tarball in the /usr/src directory and it will create a new Linux directory.

    CD into the /usr/src/linux and issue the make menuconfig (or should i issue the make mrproper command?)
    Then issue the make menuconfig, followed by make dep.
    I was told I did not need to issue make clean command. Should I?

    Then, make bzImage.

    What about this one: make bzlilo <--- should I execute this command?

    Then, make modules ; make modules_install.

    QUESTION:

    Since my current kernel is in the /boot directory, should I just rename the kernel (for example to 2.4.9) or should I move it to another directory as suggested in the plain english tutorial?

    Then, should I copy over the new bzImage to the /boot directory? These last coulple of parts is where I'm confused and need help.

    Hope this helps more. Thanks for the input.

    Tarballed


  5. #5

    Re: Kernel Compile Question

    hello,
    i was always told to issue the make clean - else extra stuff can wind up in the kernel making it too large. Doing the make mrproper command does a couple of extra cleaning ops if i remember correctly.
    I am also thinking that the make bzlilo is needed, but may not longer be needed because lilo is not needed anymore for a bootloader, i won't hurt to run it though [b]if[/b] you don't have lilo installed. if you have lilo installed but are using another bootloader such as grub then you may have problems.

    You can copy the new kernel to the /boot directory and more than one person has ask me why I say create a new boot directory, well I have clobbered orginal kernel redering them useless and the new one did not work well either. If I do this stuff in a new directory that does not happen.


  6. #6

    Re: Kernel Compile Question

    I appreciate everyones reply to my questions. Let me see if I have this correct.

    Once i've finished making the new kernel, make bzImage, let me know if this is correct:

    In the /boot directory, rename the current kernel and systemmap to the old kernel version. For example, 2.4.9.

    With that complete, copy over the new bzImage and the systemmap to the /boot directory. (While I do this, I can issue a command like so: cp /pathwherenewkernelis /boot/vmlinuz2.4.18 and same thing for the systemmap so I can rename them as I copy them...this will put the files in the /boot directory renamed).

    With that in place, do I just update the lilo.conf file? Just a bit more information and I think i have it.

    THanks again everyone. Looking forward to replies.

    Tar

  7. #7

    Re: Kernel Compile Question

    hello,
    i always move vmlinux, vmlinuz and System.map. If you ae using LILO then running the make bzlilo command is defineatley a good idea.

    but ya - it looks like that is about it.

Similar Threads

  1. kernel compile error
    By Compunuts in forum Linux - General Topics
    Replies: 4
    Last Post: 12-24-2003, 03:49 AM
  2. Kernel Compile
    By vwgtiturbo in forum Linux - General Topics
    Replies: 4
    Last Post: 09-16-2003, 03:36 AM
  3. Lucyjean, up for a kernel compile ?
    By redhead in forum General Chat
    Replies: 2
    Last Post: 08-08-2002, 11:59 AM
  4. Kernel Compile WOES
    By tarballed in forum Linux - General Topics
    Replies: 6
    Last Post: 05-11-2002, 06:32 PM
  5. kernel compile
    By johnqpublic in forum Linux Distros
    Replies: 38
    Last Post: 08-09-2001, 12:27 AM

Bookmarks

Posting Permissions

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