Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 11
Hello: On Mint 10 (x64), I have tried to build the kernel linux-2.6.38.3 this way. Note: Mint 10, is an Ubuntu derivative. 0) Modify the name suffix (as klass) in ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Apr 2011
    Posts
    2

    Thumbs down MINT 10: Build Kernel From Source?


    Hello:
    On Mint 10 (x64), I have tried to build the kernel linux-2.6.38.3 this way.
    Note: Mint 10, is an Ubuntu derivative.

    0) Modify the name suffix (as klass) in the makefile
    1) make defconfig (From the right place)
    2) make -j4 (I have a dual core CPU)
    3) sudo make install (this will create most files but th initrd lile on /boot)
    4 sudo mkinitramfs -o /boot/initrd/initrd-2.6.38.3-klass (same name as vmlinuz)
    5) Edit the /boot/grub.cfg file stanza as

    menuentry 'Linux Mint 10 64-bit, 2.6.38.3-klass (/dev/sda2)' --class linuxmint --class gnu-linux --class gnu --class os {
    recordfail
    insmod part_msdos
    insmod ext2
    set root='(hd0,msdos2)'
    search --no-floppy --fs-uuid --set f09a61cd-60a1-4a22-b972-73c0c87ff2ed
    linux /vmlinuz-2.6.38.3-klass root=/dev/sda3 ro quiet splash
    initrd /initrd-2.6.38.3-klass
    }

    Then the boot does not work!
    Get stucked somewhere...

    What would be the right way to build from the source, a kernel which really works?

    THANKS.
    ag.
    Last edited by agomp; 04-23-2011 at 10:42 PM. Reason: Forgot to reiterate the distro name, etc...

  2. #2
    Administrator MikeTbob's Avatar
    Join Date
    Apr 2006
    Location
    Texas
    Posts
    7,864
    Hello and Welcome.
    Rather than start over, show us the exact error messages and let's see if we can continue with what you have accomplished so far. Please, tell us the exact error message and or what you are seeing.
    I do not respond to private messages asking for Linux help, Please keep it on the forums only.
    All new users please read this.** Forum FAQS. ** Adopt an unanswered post.

    I'd rather be lost at the lake than found at home.

  3. #3
    Just Joined!
    Join Date
    Apr 2011
    Posts
    2

    not so easy...

    MikeTbob:

    I forgot to mention in the build:
    sudo make modules
    sudo make modules_install
    sudo make install

    No errors here, just a warning on locale...

    The:
    A message flashes very fast, and seems to say missing modules.dep

    Then it repeats continuously:

    unable to enumerate USB device port 5

    That is it.

  4. $spacer_open
    $spacer_close
  5. #4
    Administrator MikeTbob's Avatar
    Join Date
    Apr 2006
    Location
    Texas
    Posts
    7,864
    Do you have anything plugged into the USB ports that you do not need to boot? Remove them temporarily and try again. When you compiled your kernel, did you make any significant changes to the kernel itself? Can you post the link to where you are getting this info from? I know it's difficult to post links until you get 15 posts but you can remove the http://www. part and just post the rest of the link
    You can also remove the "quiet splash" options from grub so that you can see all the boot time messages.
    Last edited by MikeTbob; 04-24-2011 at 01:35 AM. Reason: editied the www
    I do not respond to private messages asking for Linux help, Please keep it on the forums only.
    All new users please read this.** Forum FAQS. ** Adopt an unanswered post.

    I'd rather be lost at the lake than found at home.

  6. #5
    Linux Newbie
    Join Date
    Jun 2004
    Location
    Halesowen, West Midlands, UK
    Posts
    107
    If you don't already have it installed, apt-get install kernel-package. After making the config, menuconfig or xconfig
    "make-kpkg --initrd linux_image linux_headers" will created .deb's of those which you can install with "dpkg -i".
    With Ubuntu 10:10 it even sets up grub and the initrd files. I can't remember if 10.04 does it for you or you have to use mkinitramfs to make the initrd files.

  7. #6
    Just Joined!
    Join Date
    Aug 2005
    Location
    India
    Posts
    6
    does the os boot with kernel shipped with the installation cd

  8. #7
    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 build kernels all the time, for RHEL 5 and 6, Ubuntu 9.04 and 10.10, Gentoo, and others. Once you have created the .config file at the top of the kernel source tree, you should only need to do this:

    make -j4
    make headers_install
    make modules_install
    make install

    It will do all the correct stuff, and you should not have to diddle around with stuff in /boot.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  9. #8
    Administrator MikeTbob's Avatar
    Join Date
    Apr 2006
    Location
    Texas
    Posts
    7,864
    Quote Originally Posted by Rubberman View Post
    I build kernels all the time, for RHEL 5 and 6, Ubuntu 9.04 and 10.10, Gentoo, and others. Once you have created the .config file at the top of the kernel source tree, you should only need to do this:

    make -j4
    make headers_install
    make modules_install
    make install

    It will do all the correct stuff, and you should not have to diddle around with stuff in /boot.
    Is that Ubuntu specific?
    I've not seen make headers_install before.
    @OP just FYI, you can issue all those commands in one:
    Code:
    make -j4 && make headers_install && make modules_install && make install
    I do not respond to private messages asking for Linux help, Please keep it on the forums only.
    All new users please read this.** Forum FAQS. ** Adopt an unanswered post.

    I'd rather be lost at the lake than found at home.

  10. #9
    Just Joined!
    Join Date
    Aug 2005
    Location
    India
    Posts
    6
    since you are completing the 'make' step
    there is problem with your .config file which resides in kernel build directory
    cd to the kernel build directory
    issue command make mrproper
    copy config file of working kernel residing in your boot directory by issuing command
    cp /boot/config--version /path/to/the /kernel/build directory/.config
    issue command make
    the kernel will examine the copied .config file if it is from kernel of higher version it will remove the extra features if it is from the kernel of the lower version it will run menuconfig or xconfig and present the extra features say no to all, the make will continue
    when make is over it should take at least 20 t0 25 minutes
    issue commands
    make modules_install
    cp -f arch/i386/boot/bzImage /boot/kernel-image-version
    cp -f System.map /boot/System.map-version
    cp -f .config /boot/config-version
    to find if you have build kernel properly
    navigate to lib/modules
    examine the module of the working kernel
    and also
    the module of the new kernel check the directory structure
    if both modules are alike
    the new kernel should work
    make necessary entries in the menu lst
    reboot with new kernel
    the new kernel should work
    once new kernel works you can repeat the above procedure
    enabling new features when xconfig runs
    when kernel is made from source tar ball the initrd is not normally required

  11. #10
    Linux Newbie
    Join Date
    Jun 2004
    Location
    Halesowen, West Midlands, UK
    Posts
    107
    Quote Originally Posted by MikeTbob View Post
    Is that Ubuntu specific?
    I've not seen make headers_install before.
    @OP just FYI, you can issue all those commands in one:
    Code:
    make -j4 && make headers_install && make modules_install && make install

    And bang goes your previous kernel, blown away.

Page 1 of 2 1 2 LastLast

Posting Permissions

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