View Poll Results: Was this helpful to you?

Voters
1159. You may not vote on this poll
Page 1 of 152 1231151101 ... LastLast
Results 1 to 10 of 1518

Thread: Master Kernel Thread

  1. #1
    Join Date
    Nov 2006
    Location
    United States
    Beans
    666
    Distro
    Ubuntu Development Release

    Post Master Kernel Thread

    Welcome to the Master Kernel Thread

    Kernel.org Information

    Current stable kernel: 3.0 | F P
    Current development kernel: None | F P

    This guide is for the current stable 3.0 kernel from kernel.org. It was last updated Sun 24 Jul 2011 19:47:30 EST.

    Author's Dedication
    You see many kernel compiling posts or blogs on the web. What makes this one any more special? In truth, just because this is the post linked to more than all the others, almost nothing is different from other kernel compiling methods. Sure, it might be a little easier, it might be more constantly updated, I'll give you that. Here comes the truth of what this thread is all about. I wanted to create a tutorial that could give something back to the Linux community as a whole, I wanted to help people stick with Linux without going through the pains of slow bootup time and slow desktop performance. I created this guide to do exactly that. A tutorial to optimize the kernel you are compiling can be found here. This tutorial is based on this thread here: http://www.ubuntuforums.org/showthread.php?t=157560. I give the credit for the content of this thread to xXx 0wn3d xXx and Klondikes. Thanks!

    FYI: KernelCheck (written by me, current version 1.2.5), a program that automatically compiles and installs the latest kernel, can be downloaded here. This script uses the instructions posted in this guide. The main forum thread for this project is here. Note that this program allows for automatic installation of nVidia non-legacy drivers.


    Dim Gray Text should be ignored.
    Green Text is recommended but not mandatory.
    Orange Text is instruction.
    Red Text is important.


    1. Install the utilities needed to configure the kernel
      Code:
      sudo apt-get install build-essential bin86 kernel-package libqt3-headers libqt3-mt-dev wget libncurses5 libncurses5-dev
    2. Move to the configuration directory
      Code:
      cd /usr/src
    3. Add yourself to the src group so you can write in /usr/src
      Code:
      sudo adduser $USER src
    4. Login to the shell with your new group privileges
      Code:
      su $USER
    5. Now we are going to download the kernel and unpack it
      Code:
      wget -c http://kernel.org/pub/linux/kernel/v3.0/linux-3.0.tar.bz2 && tar -xvjf linux-3.0.tar.bz2
    6. Copy the initramfs scripts so that you will actually be able to boot from the kernel:
      Code:
      sudo cp /usr/share/kernel-package/examples/etc/kernel/postinst.d/initramfs  /etc/kernel/postinst.d/ 
      sudo cp /usr/share/kernel-package/examples/etc/kernel/postrm.d/initramfs  /etc/kernel/postrm.d/
    7. Remove the link to the linux directory, make a new link to the new kernel, and move to the Linux directory:
      Code:
      rm -rf linux && ln -s /usr/src/linux-3.0 linux && cd /usr/src/linux
      Note: If you are applying a patch to the kernel, such as fbsplash, beyond, or emission, apply the patch now and skip to step 10.
    8. Now download the latest kernel patch: (Do NOT do this or the step below if you are using a different patch like beyond, emission, RT, etc.)
      Code:
      Unneeded step, skip to step 10
    9. Apply the new patch: (Do NOT do this if you are using a different patch like beyond, emission, etc.)
      Code:
      Unneeded step, skip to step 10
    10. Now import your current kernel configuration and get your current kernel options:
      Code:
      cp /boot/config-$(uname -r) .config && yes "" | make oldconfig
    11. Configure the kernel:
      Note: If you have a wireless internet device, you must enable your wireless drivers in the kernel. The easiest way to do this is to press Ctrl + F and search for your wireless device module name.
      Code:
      make xconfig
      Or for a terminal-based version:
      Code:
      make menuconfig
      Tip: You can significantly speed up the compile time of your kernel by using distcc. You can read the howto on this subject here.
    12. Finally, it's time to build the kernel: Make sure that you are in /usr/src/linux. This will build a debian file that you can install.

      Now in the terminal do this:

      Code:
      make-kpkg clean
      Then this:

      Code:
      INSTALL_MOD_STRIP=1 CONCURRENCY_LEVEL=3 fakeroot make-kpkg --initrd --append-to-version=-mk kernel_image kernel_headers modules_image
      Note: You can replace "mk" with anything you want. Like "k7" or "686". Make sure you leave the hyphen. The kernel will now compile for 1-3 hours, depending on the speed of your processor. The concurrency level should be set to one number above your number of CPU cores. (Leave it at the default if you don't know what this means).
    13. Install the .deb files in /usr/src. There should be 2. One should be an image .deb file and the other a header .deb file. In terminal do:
      Code:
      cd .. && sudo dpkg -i linux*3.0*.deb
      IMPORTANT: IF YOU HAVE AN NVIDIA OR ATI GRAPHICS CARD, YOU MAY HAVE TO REINSTALL THE DRIVERS FOR IT.
    14. Now reboot and profit!



    Troubleshooting:


    Q. Help! My suspend and hibernate buttons don't work!:

    A. The new SLUB allocator in the 2.6.22 and later kernels has a bug in it that does not allow some systems to suspend or hibernate. To fix this, just use the SLAB allocator instead of SLUB in the xconfig dialog.
    --------------------------------------------------------------
    Q. My High Definition sound (Azalia or Intel HD) does not work with the new kernel!:

    A. You have to enable the Intel HD module in Advanced Linux Sound Architecture.
    --------------------------------------------------------------
    Q.With the --revision and 64 bit processors:
    Concerning --append-to-version: My question is which is better kernel to use for my systems with a 64-bit computer? 686, k7 or something else?
    A. Note to everyone: The append-to-version option has absolutely nothing to do with the kernel at all. It is simply a short title for your kernel. 64 bit users can even put --append-to-version=64 or don't even include the append-to-version at all. 64-bit users can enable 64-bit options in the kernel under Processors.
    --------------------------------------------------------------
    Q. When I 'make xconfig', this error appears, but it doesn't seem to harm the installation.
    X Error: BadDevice, invalid or uninitialized input device 168
    Major opcode: 148
    Minor opcode: 3
    Resource id: 0x0
    Failed to open device
    X Error: BadDevice, invalid or uninitialized input device 168
    Major opcode: 148
    Minor opcode: 3
    Resource id: 0x0
    Failed to open device
    A. This is harmless. It simply appears because you have your wacom devices enabled in xorg.conf. If you don't want to see that error see here.
    --------------------------------------------------------------
    Q. After GRUB boots my kernel, all I see is this:
    Begin: Waiting for root file system...
    A. This may because you installed Ubuntu on a SATA hard drive. To fix this error, you must recompile the kernel with SATA options enabled.
    --------------------------------------------------------------
    Q. NVIDIA users compiling the 2.6.21 kernel should follow the directions below to compile the NVIDIA driver. [DEPRECATED]
    A.
    1. Go to your source location and run make xconfig
    2. Under "Processor type and features" turn "Paravirtualization Support" OFF
    3. Exit and save the config.
    4. Run make prepare
    5. Re-run the NVIDIA Installer
    6. Profit.
    --------------------------------------------------------------
    Q. Why isn't there any more troubleshooting?
    A. Because you need to help add some. You want more? Post your problems, PM me and help the Ubuntu community.


    † Post created by hand
    Last edited by master_kernel; July 25th, 2011 at 12:47 AM. Reason: Updates
    The one and only, Master Kernel Thread
    KernelCheck - Finally. A way to easily download, compile, and install the latest kernel. Release 1.2.5 available now.

  2. #2
    Join Date
    Jun 2006
    Beans
    2,310
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Master Kernel Thread

    That should read
    Code:
    sudo /etc/init.d/gdm stop
    NOT
    Code:
    sudo /etc/init.d/gdu stop

  3. #3
    Join Date
    Oct 2006
    Location
    Boston
    Beans
    26
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: Master Kernel Thread

    I was able to compile version 2.6.19 on my Dell Dimension at work, but after compiling, installing, and rebooting on my Precision M65 laptop, it just hangs at "Begin: Waiting for root file system... ..."

    Any ideas?

  4. #4
    Join Date
    May 2006
    Beans
    585

    Re: Master Kernel Thread

    Well this also allow selecting which kernel you want to boot up?

  5. #5
    Join Date
    Aug 2006
    Location
    tuesday
    Beans
    6,502
    Distro
    Kubuntu Development Release

    Re: Master Kernel Thread

    Quote Originally Posted by lime4x4 View Post
    Well this also allow selecting which kernel you want to boot up?
    Installing a new kernal from packages (after compiling) as described above should automagicly add them to your grub list. I've followed this method before with no problems.

  6. #6
    Join Date
    May 2006
    Beans
    585

    Re: Master Kernel Thread

    heres the error i'm getting

    make[1]: Entering directory `/usr/src/modules/fglrx'
    if [ -f /usr/src/modules/fglrx/debian/control.template ]; then \
    cat /usr/src/modules/fglrx/debian/control.template > /usr/src/modules/fglrx/debian/control; \
    fi
    if [ -f /usr/src/modules/fglrx/debian/postinst ]; then \
    mv /usr/src/modules/fglrx/debian/postinst /usr/src/modules/fglrx/debian/fglrx-kernel-2.6.19.postinst; \
    fi
    dh_testdir
    touch configure-stamp
    dh_testdir
    /usr/bin/make -C /usr/src/linux SUBDIRS=/usr/src/modules/fglrx modules
    make[2]: Entering directory `/usr/src/linux-2.6.19'
    CC [M] /usr/src/modules/fglrx/firegl_public.o
    /usr/src/modules/fglrx/firegl_public.c:89:26: error: linux/config.h: No such file or directory
    /usr/src/modules/fglrx/firegl_public.c:456: warning: initialization from incompatible pointer type
    /usr/src/modules/fglrx/firegl_public.c: In function ‘firegl_stub_open’:
    /usr/src/modules/fglrx/firegl_public.c:579: warning: assignment discards qualifiers from pointer target type
    /usr/src/modules/fglrx/firegl_public.c: In function ‘__ke_request_irq’:
    /usr/src/modules/fglrx/firegl_public.c:2510: warning: passing argument 2 of ‘request_irq’ from incompatible pointer type
    /usr/src/modules/fglrx/firegl_public.c: In function ‘__ke_smp_call_function’:
    /usr/src/modules/fglrx/firegl_public.c:3898: warning: passing argument 1 of ‘smp_call_function’ from incompatible pointer type
    make[3]: *** [/usr/src/modules/fglrx/firegl_public.o] Error 1
    make[2]: *** [_module_/usr/src/modules/fglrx] Error 2
    make[2]: Leaving directory `/usr/src/linux-2.6.19'
    make[1]: *** [build] Error 2
    make[1]: Leaving directory `/usr/src/modules/fglrx'
    Module /usr/src/modules/fglrx failed.
    Hit return to Continue

  7. #7
    Join Date
    Mar 2006
    Beans
    9

    Cool Re: Master Kernel Thread

    I'm unable to install libqt3-mt-dev, because it needs libxft-dev. libxft-dev needs libxft2 version 2.1.10-1ubuntu1.1, but I have libxft2 version 2.1.10-1ubuntu1.3. If I uninstall libxft2, I get a slew of programs and such that would also be uninstalled. Any ideas?

  8. #8
    Join Date
    Dec 2006
    Beans
    2

    Re: Master Kernel Thread

    I'm getting the same problem as whomever21, I'm a Compaq v3000z laptop. Tried multiple times with different kernel config options, but I still get the "Waiting for root filesystem..." message.

    @Descanguci
    You don't necessarily need qt3, thats just used in the 'make xconfig' step (I believe). Instead of running 'make xconfig', you could run 'make menuconfig' and that would give you a text based menu for changing kernel options.

  9. #9
    Join Date
    Dec 2006
    Beans
    2

    Re: Master Kernel Thread

    @lime4x4:
    The file it's trying to include is /usr/src/linux-headers-2.6.19/include/linux/config.h
    however, this file does not exist, at least in the versions I've been able to build. This file exists in my linux-headers-2.6.18 directory that I have from the last time I built my own kernel (using the previous guide), but not in the new (2.6.19) version.
    Seems like something is broken (or fragile) when building 2.6.19 on Ubuntu machines. Makes me wish I still had my Fedora Core 6 partition to try building a kernel on.

  10. #10
    Join Date
    Aug 2006
    Beans
    11

    Re: Master Kernel Thread

    I'm also getting the "Begin: Waiting for root file system... ..." message and the system just hangs. If I hit ctr+alt+del it reboots and I can repeat over and over, nothing. If I choose my old kernel from grub it boots just fine so I don't think there is anything wrong with the file system.

    Help?

Page 1 of 152 1231151101 ... LastLast

Tags for this Thread

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
  •