This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
user:tgalpin2:portfolio:kernel [2012/03/06 20:49] – [Manual Kernel Installation] tgalpin2 | user:tgalpin2:portfolio:kernel [2012/05/10 05:33] (current) – [Conclusion and Reflection] tgalpin2 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ======Project: | ||
+ | This is a project for Matt Haas' HPC II class in the Spring 2012 Semester. | ||
+ | |||
+ | This project will explore the many ways that a user can update the kernel of a Linux system. The solutions for this task range from simply checking the repository that the system has added, to manually downloading and installing the kernel. As is such, this will serve as a guide to completing this task. | ||
+ | |||
+ | =====Basic Methods to Try===== | ||
+ | |||
+ | Before you go about updating your kernel, you should check what version your kernel is at, and whether or not an update is necessary. Following these basic steps could also save a lot of time by making a manual install unnecessary. | ||
+ | |||
+ | First, check what version your kernel is at. This is done with the following command: | ||
+ | |||
+ | <cli> | ||
+ | tyler@aleron ~ $ uname -r | ||
+ | 3.0.0-1-amd64 | ||
+ | tyler@aleron ~ $ | ||
+ | </ | ||
+ | |||
+ | Now, check to see whether or not you are at the latest version for your kernel using the command used below. Note that being at the latest revision for your added repositories does not mean that you have the latest stable kernel, and it does not mean that you can't install an earlier version. | ||
+ | |||
+ | <cli> | ||
+ | tyler@aleron ~ $ apt-cache search linux-image | ||
+ | alsa-base - ALSA driver configuration files | ||
+ | linux-headers-3.0.0-1-amd64 - Header files for Linux 3.0.0-1-amd64 | ||
+ | linux-headers-3.0.0-1-rt-amd64 - Header files for Linux 3.0.0-1-rt-amd64 | ||
+ | linux-image-3.0.0-1-amd64 - Linux 3.0.0 for 64-bit PCs | ||
+ | linux-image-3.0.0-1-amd64-dbg - Debugging infos for Linux 3.0.0-1-amd64 | ||
+ | linux-image-3.0.0-1-rt-amd64 - Linux 3.0.0 for 64-bit PCs, PREEMPT_RT | ||
+ | linux-image-3.0.0-1-rt-amd64-dbg - Debugging infos for Linux 3.0.0-1-rt-amd64 | ||
+ | linux-image-2.6-amd64 - Linux for 64-bit PCs (dummy package) | ||
+ | linux-image-2.6-rt-amd64 - Linux for 64-bit PCs (dummy package) | ||
+ | linux-image-amd64 - Linux for 64-bit PCs (meta-package) | ||
+ | linux-image-rt-amd64 - Linux for 64-bit PCs (meta-package), | ||
+ | linux-headers-2.6.32-5-amd64 - Header files for Linux 2.6.32-5-amd64 | ||
+ | linux-headers-2.6.32-5-openvz-amd64 - Header files for Linux 2.6.32-5-openvz-amd64 | ||
+ | linux-headers-2.6.32-5-vserver-amd64 - Header files for Linux 2.6.32-5-vserver-amd64 | ||
+ | linux-headers-2.6.32-5-xen-amd64 - Header files for Linux 2.6.32-5-xen-amd64 | ||
+ | linux-image-2.6.32-5-amd64-dbg - Debugging infos for Linux 2.6.32-5-amd64 | ||
+ | linux-image-2.6.32-5-amd64 - Linux 2.6.32 for 64-bit PCs | ||
+ | linux-image-2.6.32-5-openvz-amd64-dbg - Debugging infos for Linux 2.6.32-5-openvz-amd64 | ||
+ | linux-image-2.6.32-5-openvz-amd64 - Linux 2.6.32 for 64-bit PCs, OpenVZ support | ||
+ | linux-image-2.6.32-5-vserver-amd64-dbg - Debugging infos for Linux 2.6.32-5-vserver-amd64 | ||
+ | linux-image-2.6.32-5-vserver-amd64 - Linux 2.6.32 for 64-bit PCs, Linux-VServer support | ||
+ | linux-image-2.6.32-5-xen-amd64-dbg - Debugging infos for Linux 2.6.32-5-xen-amd64 | ||
+ | linux-image-2.6.32-5-xen-amd64 - Linux 2.6.32 for 64-bit PCs, Xen dom0 support | ||
+ | linux-image-2.6-openvz-amd64 - Linux 2.6 for 64-bit PCs (meta-package), | ||
+ | linux-image-2.6-vserver-amd64 - Linux 2.6 for 64-bit PCs (meta-package), | ||
+ | linux-image-2.6-xen-amd64 - Linux 2.6 for 64-bit PCs (meta-package), | ||
+ | linux-image-openvz-amd64 - Linux for 64-bit PCs (meta-package), | ||
+ | linux-image-vserver-amd64 - Linux for 64-bit PCs (meta-package), | ||
+ | linux-image-xen-amd64 - Linux for 64-bit PCs (meta-package), | ||
+ | nvidia-kernel-2.6.32-5-amd64 - NVIDIA binary kernel module for Linux 2.6.32-5-amd64 | ||
+ | nvidia-kernel-2.6.32-5-vserver-amd64 - NVIDIA binary kernel module for Linux 2.6.32-5-vserver-amd64 | ||
+ | linux-headers-2.6.39-2-amd64 - Header files for Linux 2.6.39-2-amd64 | ||
+ | linux-image-2.6.39-2-amd64 - Linux 2.6.39 for 64-bit PCs | ||
+ | </ | ||
+ | |||
+ | From the above command line output, we see that I am at the latest version for my repositories. Unfortunately, | ||
+ | |||
+ | * [[http:// | ||
+ | |||
+ | Here, you can check for stable versions and unstable release candidates. You can also download the various kernels if you wish to install them manually. However, at this point in the guide, we are working to see if we can avoid that for your system. | ||
+ | |||
+ | That being said, if the kernel you wish to install is listed after using the previous command, install it by using the following command: | ||
+ | |||
+ | <cli> | ||
+ | tyler@aleron ~ $ sudo apt-get install [name of kernel image] | ||
+ | </ | ||
+ | |||
+ | For example, the kernel I want to install is linux-image-3.2.0-1-amd64. Hypothetically, | ||
+ | |||
+ | <cli> | ||
+ | tyler@aleron ~ $ sudo apt-get install linux-image-3.2.0-1-amd64 | ||
+ | </ | ||
+ | |||
+ | Now, as I've mentioned, what do we do if updating the kernel isn't as easy as this? What if our repository does not include the kernel we want, and we < | ||
+ | =====Manual Kernel Installation===== | ||
+ | |||
+ | Here's where the fun begins! We're going to get our hands dirty in our terminals. | ||
+ | |||
+ | |||
+ | ====Downloading==== | ||
+ | |||
+ | First, we need the kernel itself. You can download it from [[http:// | ||
+ | |||
+ | <cli> | ||
+ | tyler@aleron ~ $ wget http:// | ||
+ | </ | ||
+ | |||
+ | This command downloads the latest kernel as of this writing. Check to see which is the latest kernel. | ||
+ | |||
+ | Now, extract the files from the tarball. This can be done with a graphical archive manager, or you can use the following command: | ||
+ | |||
+ | <cli> | ||
+ | tyler@aleron ~ $ tar zxvf linux-3.2.9.tar.bz2 | ||
+ | </ | ||
+ | |||
+ | Either way, this will make a directory with the name of the kernel to be installed (linux-3.2.9 in this case). Change to this directory. | ||
+ | |||
+ | <cli> | ||
+ | tyler@aleron ~ $ cd linux-3.2.9 | ||
+ | tyler@aleron ~/ | ||
+ | </ | ||
+ | |||
+ | ====Configuring with make==== | ||
+ | |||
+ | We must configure the options we want for the kernel, which will determine its functionality. This is done like so-- | ||
+ | |||
+ | <cli> | ||
+ | tyler@aleron ~/ | ||
+ | </ | ||
+ | |||
+ | This will take you to a menu in which you can manage your .config file for the kernel. | ||
+ | |||
+ | Aftwards, build the dependencies for this configuration (if necessary) and build the kernel, as shown below. | ||
+ | |||
+ | <cli> | ||
+ | tyler@aleron ~/ | ||
+ | tyler@aleron ~/ | ||
+ | </ | ||
+ | |||
+ | The output for these two commands are not listed. Note that these two will take some time to complete. | ||
+ | |||
+ | Next, make the modules, then install them. | ||
+ | |||
+ | <cli> | ||
+ | tyler@aleron ~/ | ||
+ | tyler@aleron ~/ | ||
+ | </ | ||
+ | |||
+ | Now, we move the kernel to /boot. We just need to give it a unique name. Also copy System.map to /boot. | ||
+ | |||
+ | Now just edit / | ||
+ | |||
+ | < | ||
+ | image = /boot/[name of kernel you gave when copying] | ||
+ | label = " | ||
+ | </ | ||
+ | |||
+ | Finally, run "lilo -v" and reboot. | ||
+ | |||
+ | |||
+ | |||
+ | =====Conclusion and Reflection===== | ||
+ | |||
+ | Unfortunately, | ||
+ | =====References===== | ||
+ | * Readme text file from kernel archive from kernel.org | ||
+ | * [[http:// | ||
+ | * [[http:// |