- Ubuntu Documentation
- Kernel
- Types
- Versions
- HowTo Upgrade or Recompile Kernel
- How to Remove unwanted Kernels from your system
- Experimental Kernel Options
- See also
- Ubuntu kernels from Canonical
- Identifying a kernel
- Kernel and OS releases
- Kernel security
- General Availability (GA) and variant Ubuntu kernels
- Custom kernels
- 3 Ways to Check Linux Kernel Version in Command Line
- How to find Linux kernel version
- 1. Find Linux kernel using uname command
- 2. Find Linux kernel using /proc/version file
- 3. Find Linux kernel version using dmesg commad
- How do you check your Linux kernel version and other information?
- Ubuntu Wiki
- MainlineBuilds
- Introduction
- How do I install an upstream kernel?
- Prepare OS to install an upstream kernel
- Choose the proper upstream kernel files
- Download upstream kernel files from the Ubuntu archive
- Install all upstream kernel files
- Problems installing upstream kernels
- Virtualbox
- Unsatisfied dependencies
- Other install errors
- Uninstalling upstream kernels
- Mainline kernel build toolchain
- Mainline kernel mapping to Ubuntu kernel
- Support (BEWARE: there is none)
- Kernel source code trees
- Verifying mainline build binaries
- Upstream kernel details
- Can I install and use a mainline kernel in a live environment?
Ubuntu Documentation
Kernel
What is the kernel ?
The kernel is the software that directly manages your hardware, allowing application libraries and software like GNOME and Firefox to run on many types of hardware without much difficulty. Because the Linux kernel is the core component of a GNU/Linux system, a full restart is required to complete the kernel update.
Types
Ubuntu packages the Linux kernel for a variety of architectures, including several variants of the x86 architecture. These include a 386 version, a 686 version, and versions for the AMD k6 and k7 processors. While most software for x86 processors in Ubuntu is compiled for 386 or better instruction sets, the kernel and a few other packages are specifically compiled for certain processors for speed reasons. Check the package documentation to determine what type of kernel will perform best for your processor.
Versions
Ubuntu currently packages the 3.8 kernel for optimal desktop speed and features.
Some motherboards have more than one processor on them, and some processors have multiple cores. If your computer is like this, then the SMP kernel is for you. Non-SMP kernels will not be able to take advantage of your multiple processors. However, if you do not have multiple processors, the additional code in an SMP kernel will only slow you down. Naturally, Ubuntu provides both SMP and non-SMP kernels for all supported architectures.
PAE (Physical Address Extension) allows the 32 bit version of Ubuntu to access up to 64 Gb of memory and is the standard for all members of the Ubuntu family from release 12.10 and beyond, as the non-PAE version has been dropped. For more on this please see here.
If your hardware does not support PAE, refer to the PAE pages with topics like installing, upgrading and enabling (with) PAE.
HowTo Upgrade or Recompile Kernel
The precompiled kernels that are supplied with your distro should be fine however if you wish to update or optimise (or standardise) for your platform :
From easier (1) to the more difficult (3):
1) You can Kernel/Upgrade easily using Ubuntu.
3) Run the following Terminal commands to install a new Ubuntu kernel from http://kernel.ubuntu.com/
Just press instead of a number if you get stuck on a certain question in the python script.
The script by default filters out (i.e. does not show) the release candidates. If you want the latest release candidates, please use: python kmpd.py -d
How to Remove unwanted Kernels from your system
Open the Synaptic package manager from the System->Administration menu. Click the “Search” button on the tool bar and search for «linux-image-2». The results should show every available and installed kernel. A green box on the left indicates that the package is installed. The only linux-image you want installed is the latest one. Find the package corresponding to the kernel to you running currently (this is the kernel you found in the terminal window). Make sure you keep that one. Now you can uninstall the old kernels from the list by clicking their boxes and selecting “Mark for Removal”.
Or you can uninstall kernels using the ubuntu-tweak Ubuntu PPA package.
Instructions are here:
Experimental Kernel Options
As per the Ubuntu Kernel Team, their typical Kernel configuration policy is that options marked EXPERIMENTAL are disabled by default, until a request has been made to justify enabling it. For example, one may find out if an option is marked this way via:
See also
Kernel (последним исправлял пользователь ckimes 2017-09-26 21:10:21)
The material on this wiki is available under a free license, see Copyright / License for details
You can contribute to this wiki, see Wiki Guide for details
Источник
Ubuntu kernels from Canonical
At the core of the Ubuntu operating system is the Linux kernel, which manages and controls the hardware resources like I/O (networking, storage, graphics and various user interface devices, etc.), memory and CPU for your device or computer. It is one of the first software programs a booting device loads and runs on the central processing unit (CPU). The Linux kernel manages the system’s hardware environment so other programs like the operating system’s user space programs and application software programs can run well without modification on a variety of different platforms and without needing to know very much about that underlying system.
Identifying a kernel
The easiest way to determine the kernel you’re running is to type cat /proc/version_signature on the terminal. For example:
Ubuntu 5.4.0-12.15-generic 5.4.8
This output provides important information about the kernel:
- Canonical adds » Ubuntu «
- Ubuntu kernel-release = 5.4.0-12.15-generic
- kernel version is 5.4 , which is identical to upstream stable kernel version
- .0 is an obsolete parameter left over from older upstream kernel version naming practices
- -12 application binary interface (ABI) bump for this kernel
- .15 upload number for this kernel
- -generic is kernel flavour parameter, where -generic is the default Ubuntu kernel flavour
- Mainline kernel-version = 5.4.8
Kernel and OS releases
Canonical provides long-term support (LTS) kernels for Ubuntu LTS releases. Canonical also provides interim operating system releases with updated kernels every 6 months.
For customers and business partners that don’t have specialised bleeding-edge workloads or latest hardware needs, the latest LTS release «-generic» kernel is the best option for them such as the 4.15 default kernel in Ubuntu 18.04 LTS. Customers who need the latest hardware support capability can install the latest HWE kernel such as the ones contained in interim releases, keeping in mind the shorter support lifespan associated with these kernels (9 months). HWE kernel customers are recommended to upgrade to a newer LTS release that supports their hardware and/or software needs as soon as it is available. Another option for customers is to use point releases. For example, there is an 18.04.4 point release as of February 2020, which includes an updated 5.3.x kernel but is also considered LTS, exactly like the original GA 4.15 kernel in 18.04.
Kernel security
The Canonical Kernel Team’s primary focus is the careful maintenance of kernels and their variants for regular delivery via the Ubuntu SRU process and the Canonical livepatch service. This includes rigorous management of all Linux kernel Common Vulnerabilities and Exposures (CVE) lists (with a focus on patching all high and critical CVEs) review and application of all relevant patches for all critical and serious kernel defects in the mailing lists and then rigorously testing newly updated kernels end-to-end each SRU cycle.
General Availability (GA) and variant Ubuntu kernels
The complete functionality of any given kernel is determined by the included modules and the kernel configuration for both hardware and the expected workloads that are run on it.
Kernel modules are binary programs that extend a kernel’s ability to control the computing system’s hardware or add additional system capabilities like high-performance networking or non-standard graphics, etc. The GA kernel that is shipped by default, with the Canonical Ubuntu Long Term Support (LTS) and Hardware Enablement (HWE) releases, are tuned for stable, reliable, secure, high-performance operation over a wide variety of hardware platforms and workloads.
A kernel variant is a kernel that deviates from the generic GA kernel by changes to its configuration, and/or by having modules added and/or removed.
Custom kernels
Canonical advocates for customers to use the GA kernel shipped with Ubuntu as the best and most cost-effective option in their business environment. We also offer the option for customers to customize their own Ubuntu kernels. Several of our enterprise, Telco and cloud provider customers have systems and workload needs, which justify both the time investment to optimise their kernels and the pay to develop and maintain those custom kernels over time.
© 2021 Canonical Ltd. Ubuntu and Canonical are registered trademarks of Canonical Ltd.
Источник
3 Ways to Check Linux Kernel Version in Command Line
Last updated October 29, 2020 By Abhishek Prakash 25 Comments
Brief: Wondering which Linux kernel version your system uses? Here are several ways to check your kernel version in the Linux terminal.
You may find yourself in a situation where you need to know the exact Linux kernel version being used on your system. Thanks to the powerful Linux command line, you can easily find that out.
Quick way to check Linux kernel version
You can use the following command to get the Linux kernel version:
uname -r
There are other ways to get even more detailed information about kernel. Read the rest of the article to learn it in detail.
In this article, I’ll show you various methods for finding out your kernel version and tell you what those numbers actually mean. If you prefer videos, here’s a quick one. Don’t forget to subscribe to our YouTube channel for more Linux tips.
How to find Linux kernel version
I am using Ubuntu while writing this article. But these commands are generic and can be used on Fedora, Debian, CentOS, SUSE Linux or any other Linux distribution.
1. Find Linux kernel using uname command
uname is the Linux command for getting system information. You can also use it to find out whether you’re using a 32-bit or 64-bit system.
Open a terminal and type in the following command:
The output will be something similar to this:
This means that you’re running Linux kernel 4.4.0-97, or in more generic terms, you are running Linux kernel version 4.4.
But what do the other digits mean here? Let me explain:
- 4 – Kernel version
- 4 – Major revision
- 0 – Minor revision
- 97 – Bug fix
- generic – Distribution-specific string. For Ubuntu, it means I’m using the desktop version. For Ubuntu server edition, it would be ‘server’.
You can also use the uname command with the option -a. This will provide more system information if you need it.
The output of the command should like this:
Let me explain the output and what it means:
- Linux – Kernel name. If you run the same command on BSD or macOS, the result will be different.
- itsfoss – Hostname.
- 4.4.0-97-generic – Kernel release (as we saw above).
- #120-Ubuntu SMP Tue Sep 19 17:28:18 UTC 2017 – This means that Ubuntu has compiled 4.4.0-97-generic 120 times. A timestamp for the last compilation is also there.
- x86_64 – Machine architecture.
- x86_64 – Processor architecture.
- x86_64 – Operating system architecture (you can run a 32-bit OS on a 64-bit processor).
- GNU/Linux – Operating system (and no, it won’t show the distribution name).
But I’ll save you from information overload. Let’s see some other commands to find your Linux kernel version.
2. Find Linux kernel using /proc/version file
In Linux, you can also find the kernel information in the file /proc/version. Just look at the contents of this file:
You’ll see an output similar to what you saw with uname.
You can see the kernel version 4.4.0-97-generic here.
3. Find Linux kernel version using dmesg commad
dmesg is a powerful command used for writing kernel messages. It’s also very useful for getting system information.
Since dmesg provides an awful lot of information, you should normally use a command like less to read it. But since we’re here just to check the Linux kernel version, grepping on ‘Linux’ should give the desired output.
The output will have a few lines but you should be able to identify the Linux kernel version there easily.
How do you check your Linux kernel version and other information?
Of the three ways discussed here, I use uname all the time. It’s the most convenient.
What about you? Which command do you prefer for getting Linux kernel information?
Like what you read? Please share it with others.
Источник
Ubuntu Wiki
MainlineBuilds
Introduction
By default, Ubuntu systems run with the Ubuntu kernels provided by the Ubuntu repositories. However it is handy to be able to test with unmodified upstream kernels to help locate problems in Ubuntu kernel patches, or to confirm that upstream has fixed a specific issue. To this end we now offer select upstream kernel builds. These kernels are made from unmodified kernel source but using the Ubuntu kernel configuration files. These are then packaged as Ubuntu .deb files for simple installation, saving you the time of compiling kernels, and debugging build issues.
These kernels are not supported and are not appropriate for production use.
How do I install an upstream kernel?
Following these steps in order will help you successfully test an upstream kernel.
Prepare OS to install an upstream kernel
First, if one is using select proprietary or out-of-tree modules (e.g. bcmwl, fglrx, NVIDIA proprietary graphics drivers, VirtualBox, etc.) unless there is an extra package available for the version you are testing, you will need to uninstall the module first, in order to test the mainline kernel. If you do not uninstall these modules first, then the upstream kernel may fail to install, or boot.
Choose the proper upstream kernel files
The build directories are nicely organized into per architecture groups. For example, if one is using a 64-bit/amd64 architecture and wants the generic kernel version you would want those files marked A, from the appropriate group.
If you want the low latency version, B.
Download upstream kernel files from the Ubuntu archive
Few things can compromise the security of a Linux system worse than a compromised kernel
We urge you to carefully verify the integrity of any and all downloaded kernel packages as explained below.
The Mainline kernel archive has a directory for each tagged release version, with packages for the generic and lowlatency configurations inside.
Note: If you are testing to isolate a bug or regression, please do not use the daily folder. Instead, use the latest mainline kernel at the top from the link above.
Install all upstream kernel files
Execute the following command against each of the downloaded files in a terminal of your choosing:
If no errors show up, reboot while holding Shift then select «Advanced options for Ubuntu», then select and boot into the new entry that looks something like:
Problems installing upstream kernels
Virtualbox
Some errors that may occur while attempting to install an upstream kernel are the result of VirtualBox being installed. For example,
As per above, you need to either install the modules-extra package, if available, or uninstall VirtualBox.
Unsatisfied dependencies
A failure to install can also result from the installed version of Ubuntu lacking the newer packages the upstream kernel is dependent on for the install to succeed. For example,
If you already have the package referenced by the error message (in this instance, libssl1.1) installed but the version number is beneath the new kernel’s requirements, then you would first need to upgrade your Ubuntu installation to a newer release. However, if libssl1.1 is not installed at all, and the version that comes with your release is sufficient, then install libssl1.1.
Other install errors
If for some reason the kernel you attempted to build failed, and it’s not due to the above, then continue to test the next most recent kernel version until you can test to the issue.
Uninstalling upstream kernels
The upstream kernels have their own ABI namespace, so they install side by side with the stock Ubuntu kernels (each kernel has a separate directory under /lib/modules/VERSION for example). This means that you can keep several mainline and Ubuntu stock kernels installed at the same time and select the one you need from the GRUB boot menu.
If you want to uninstall an upstream kernel once your need for installing it has abated, execute the following to find the exact name of the kernel packages you need to uninstall:
and then execute the following to uninstall them:
Remember that several packages can belong to one kernel version; common headers plus the architecture specific headers, image and modules are to be expected at a minimum.
Mainline kernel build toolchain
These kernels are built with the toolchain (gcc, g++, etc.) from the previous Ubuntu LTS release. (e.g. Ubuntu 14.04 «Trusty Tahr» / 16.04 «Xenial Xerus» / 18.04 «Bionic Beaver», etc.) Therefore, out-of-tree kernel modules you already have built and installed for use with your release kernels are not likely to work with the mainline builds.
Mainline kernel mapping to Ubuntu kernel
The Ubuntu kernel is not bit-for-bit the same as the mainline. However, one may find the upstream release that the Ubuntu kernel is based on via the Ubuntu to mainline mapping table.
Support (BEWARE: there is none)
The mainline kernel builds are produced for debugging purposes and therefore come with no support. Use them at your own risk.
Kernel source code trees
In each directory of the above-linked archive there is a file named COMMIT which defines the base commit in Linus Torvalds’ master tree from which they were built. The patches in the same directory . -* are applied on top of this commit to make the build tree. A mirror of Linus’ tree is available from git://kernel.ubuntu.com/virgin/linux.git.
First download the COMMIT and patch files . -* from the mainline build in question to a temporary directory:
Verifying mainline build binaries
To provide verification that the published builds are 1. built by the Ubuntu mainline build system, and 1. are bit-for-bit identical copies of the files on the server,
the individual files are checksummed and the results are published as a file named CHECKSUMS in the same directory. This file is in turn signed by the mainline builder using the GPG key below, which can be validated against its record from the Ubuntu Keyserver.
The verification can be done by running the following commands:
- Import the above public key to your keyring (if you haven’t already done that):
- Download the CHECKSUMS and CHECKSUMS.gpg files from the build directory and verify if the CHECKSUMS is signed with the above key:
- Verify the checksums of downloaded deb files: You should get a line ending with «OK» for each of downloaded deb file and each type of checksums that are given in the CHECKSUMS file.
Upstream kernel details
We currently build five sets of upstream kernels. All formal tags from Linus’ tree and from the stable trees, plus:
the tip of the drm-next head of Dave Airlie’s linux repository daily,
the tip of the drm-intel-next head of Keith Packard’s linux repository daily until 2012, after which it has been taken over by Daniel Vetter at http://cgit.freedesktop.org/drm-intel/, and in particular, the drm-intel-next branch,
the tip of the master branch of the debloat-testing tree daily,
tags from the combined v2.6.32.x.y tree (by StefanBader) which is v2.6.32.x with DRM from 2.6.33.y.
This makes these kernels closer to the Lucid kernels which are based on 2.6.32 kernels with DRM backported from the 2.6.33 series.
The tagged releases (as made by Linus and the stable maintainers) are found under a directory matching their tag name and which kernel configuration they were built with ( — ).
Daily tip of the tree builds are found in the daily sub-directory named for the date they were made.
Each build directory contains the header and image .deb files for the generic flavour i386 and amd64 architectures, as well lowlatency.
Can I install and use a mainline kernel in a live environment?
No. One has two choices to use a mainline kernel:
- Install the mainline kernel in an installed environment, restart, and choose this newly installed kernel.
- Build a live environment with the new kernel in it. Given the amount of effort involved in doing this, it is easiest to use an installed OS to test the mainline kernel.
Kernel/MainlineBuilds (последним исправлял пользователь roguescholar 2020-03-26 22:30:32)
Источник