Updating the Linux kernel to the new version. Overview of the android kernel features 3.10 65 Version of the core

We have repeatedly wrote about custom firmware, root applications and alternative boot menu. All this standard themes in the Android-hacker community, however, except the above, there is another concept as a "custom kernel", which can give almost limitless capabilities for managing the smartphone and its iron at the lowest level. In this article, I will tell you what it is, why it is necessary and how to choose the right custom core.

Custom Kernel?

What is a custom kernel? As we all know, Android is a cake consisting of three base layers: Linux kernel, a set of low-level libraries and services and a DALVIK virtual machine, on top of which graphics shell, high-level tools and services, as well as almost all applications installed from the market. The creators of most alternative custom firmware usually work with two upper layers, adding functions to a graphical shell (for example, buttons in a curtain), changing it (the process of those in CyanogenMod), as well as adding new system services (equalizer in CyanogenMod) and optimizing existing ones.

The authors of popular firmware also make changes to the Linux kernel: optimize (assembly with more aggressive compiler optimization flags) include new functionality (for example, Windows Ball support), and other changes seems to be able to raise the processor frequency above the manufacturer . Often, all this remains behind the scenes, and many customer firmware users do not even suspect these possibilities, especially since the same CyanogenMod comes with a custom kernel only for a limited circle of devices, which are available both sources of the native nucleus and the possibility of its replacement. For example, almost all Cyanogenmod firmware for Motorola smartphones use a standard kernel - to replace it with it is impossible due to impenetrable loader protection.

However, the kernel in smartphones with a unlocked loader can be replaced separately from the main firmware. And not just replace, but to establish a kernel with a huge number of different functions that require certain technical knowledge to control, and therefore are usually not embedded in the kernel of popular firmware, such as Cyanogenmod, AOKP and MIUI. Among these functions, you can find the high frequency of the processor, the gamma screen control, energy saving modes, highly efficient power managers and a huge number of other features.

In this article, we will talk about what the creators of custom cores can offer us, consider the main custom kernels for various devices, and also try to install the kernel regardless of the main firmware and check everything on your own skin. So, what do the developers of alternative nuclei usually offer?

Smart adjustr

In the OMAP35XX SOCs used, for example, in Galaxy S II and Galaxy Nexus, there is a SmartReflex feature that performs the role of a smart voltage adjustment system when the load is changed. In essence, it eliminates the need for a fine tuning by the user.


Optimization

Often, the main purpose of assembling the custom kernel is becoming optimizing performance. Typically, the vendor of the mobile technology is trying to keep the balance between performance and stability, therefore, even good optimization techniques that can significantly raise the speed of the device, can be rejected by the manufacturer only on the basis that after their application, some applications have begun to fall every tenth launch. Of course, the enthusiasts are not embarrassing such trifles, and many of them are ready to apply any compiler options, energy saving algorithms and rebel the frequency of the processor so high as the device only withstands the device. Among all optimization techniques are the most common four:



Another type of optimization: Changing the standard I / O scheduler. The situation on this field is even more interesting, since instead of understanding the principles of the planners, some nuclear collectors simply read documents on I / O-planners for Linux and draw conclusions. Among users, this approach is spread even more. In fact, almost all the most productive and smart Linux schedulers are not at all suitable for Android: they are designed for use with mechanical data warehouses in which the data access speed varies depending on the position of the head. The scheduler uses different query combining schemes depending on the physical position of the data, therefore requests to data that are located close to the current head position will receive greater priority. This is completely illogical in the case of solid-state memory, which guarantees the same access speed to all cells. Advanced planners will bring more harm on the smartphone than benefits, and the best result will be shown the most axis and primitive. In Linux there are three similar schedule:

  • NOOP (NO OPERATION) - the so-called non-scheduler. Simple FIFO query queue, the first request will be processed first, second second and so on. It is well suited for solid-state memory and allows you to correctly distribute the priorities of applications to access to the drive. Additional plus: Low load on the processor by virtue of a very simple principle of operation. Minus: No accounting of the work of the device, which may result from performance failures.
  • SiO (Simple I / O) - Analogue of the Deadline Scheduler without taking into account the proximity of the sectors to each other, that is, designed specifically for solid-state memory. Two main highlights: the priority of read operations on recording operations and grouping operations on processes with the allocation of each time quantum time for operations. In smartphones, where the speed of operation of the current application and the predominance of reading operations above the record shows very good performance. Available in Leankernel, MATR1X core for Nexus 4 and Siyahkernel.
  • ROW (READ OVER WRITE) - The planner specifically designed for mobile devices and added to the kernel just a few months ago. The main task: priority processing of read requests, but a fair time distribution and recording requests. It is considered the best scheduler for Nand-memory, the default is used in Leankernel and Matr1x.

It is worth saying that almost all the standard firmware and half of the custom still use the kernel with a standard CFQ planner for Linux, which, however, is not so bad because it can work properly with solid-state drives. On the other hand, it is too complicated, creates a greater load on the processor (and therefore the battery) and does not take into account the specifics of the mobile OS. Another popular choice is a Deadline scheduler, which is not worse than SiO, but is redundant. You can see the list of available schedules using such a command:

# Cat / SYS / BLOCK / * / QUEUE / SCHEDULER

To change, this is used (where Row is the name of the planner):

# FOR I IN / SYS / BLOCK / * / QUEUE / SCHEDULER; Do Echo Row\u003e $ 1; Done

Some nuclear collectors use another type of optimization associated with the input-output. This is disabling the FSYNC system call used to forced reset the changed contents of open files to the disk. It is believed that without a FSync system will less often turn to the drive and thus will be able to save the processor time and battery charge. Pretty controversial statement: FSync in applications are not used as often and only to save truly important information, but its disconnection can lead to the loss of the same information in the event of a fall in the operating system or other problems. The ability to disable FSYNC is available in the Franco.kernel and Glados kernels, and the control is used to control / sys / module / sync / parameters / fsync_enabled, to which 0 for shutdown or 1 should be recorded. I repeat to use this feature is not recommended.

Add new features to the kernel

Of course, besides optimizations, twists and different systems of extended equipment, in custom nuclei, you can also find a completely new functionality, which is not in standard nuclei, but which can be useful to users.

These are mostly different drivers and file systems. For example, some kernels include the support of the CIFS module that allows you to mount Windows Balls. This module is in the MATR1X kernel for Nexus S, Faux123 for Nexus 7, Siyahkernel and Glados. He in itself is useless, but there are several applications in the market, allowing you to use his capabilities.

Another utility is the inclusion in the NTFS-3G driver kernel (more precisely, in the package with the kernel, the driver itself works as a Linux application), which is necessary to mount flash drives formatted into the NTFS File System. This driver is in the nuclei Faux123 and Siyahkernel. Usually it is activated automatically, but if this does not happen, you can use the StickMount application from the market.

Many nuclei also have in their composition support for the so-called ZRAM technology, which allows you to reserve a small amount of RAM (usually 10%) and use it as a compressed paging area. As a result, there is an expansion of the amount of memory, without any serious consequences for performance. Available in Leankernel, enabled using Trickster MOD or ZRAM Enable command.

The last two interesting features are Fast USB Charge and Sweep2Wake. The first is nothing but forced inclusion of the "fast charging" mode, even if the smartphone is connected to the computer's USB port. Quick charging mode is available in all more or less new smartphones, but due to technical restrictions, it cannot be enabled simultaneously with access to the memory card. Fast USB CHARGE feature allows you to enable this mode always by turning off access to the drive.

SWEEP2Wake is a new way to wake the device invented by the author Breaked-Kernel. Its meaning to include a smartphone, having spent his finger on the navigation keys located below the screen or the screen itself. This is really a convenient function, but as a result of its inclusion, the sensor will remain active even during the device's sleep, which can noticeably discharge the battery.

Acceleration, voltage and energy saving

Overclocking is popular not only among stationary computers and laptops, but also in the environment of mobile technicians. Like the stones of the X86 architecture, processors and graphic cores of mobile techniques are greatly chasing. However, the way of overclocking and the steps taken here are several others. The fact is that the standard drivers for SOCs that are responsible for energy saving and changing the processor frequency are usually locked at standard frequencies, so for fine tuning you have to install or an alternative driver or custom kernel.

Almost all the more or less high-quality and popular custom kernels already include unlocked drivers, so after their installation, the possibility of controlling the "power" processor is significantly expanding. Usually, custom kept kernels make two things affecting the choice of frequency. This extension of the frequency range beyond the initially specified - can be installed as a higher frequency of the processor and very low, which allows you to save the battery and increase frequency gradation, for example, instead of three possible frequencies are offered to choose from six. The second is adding the possibility of adjusting the voltage processor, so that you can reduce the processor voltage at low frequencies to save the charge of the battery and boost on high to increase the stability of work.

All this can be controlled using the well-known SETCPU pay utility or free Trickster MOD. Recommendations for management are all the same as for desktop systems. The lower frequency of the processor is better to establish the minimum, but not lower than 200 MHz (in order to avoid lags), the upper threshold increases gradually with testing the stability of work, when the fall of which is recommended to lift the voltage for this frequency. There are no voltage recommendations, since each processor is unique and the values \u200b\u200bwill be different for everyone.

In addition to changing frequencies, the collectors often add new energy saving control algorithms in the core (automatic processor control), which, in their opinion, can show the best results in comparison with standard. Almost all of them are based on the default in the new versions of the Android algorithm interactive, the essence of which is to dramatically raise the frequency of the processor to the maximum in the event of an increase in the load, and then gradually reduce to the minimum. He came to replace the Ondemand algorithm used before, which smoothly regulated the frequency in both sides in proportion to the load, and allows you to make the system more responsive. The alternative nuclei collectors offer the following algorithms on the interconnection:

  • Smartassv2. - rethinking the interactive algorithm with a focus on saving the battery. The main difference is not to pull the processor to high frequencies in the case of short-term load bursts for which there are enough and low processor performance. The default is used in the MATR1X kernel.
  • Interactivex - Tuuning algorithm Interactive, the main feature of which is in the departure of the processor on the minimum user-specified frequency and de-energizing the second core of the processor during the screen shutdown. The default is in LEANKERNEL.
  • LulzActiveV2. - In essence, invented ondemand. When the load on the processor exceeds the specified (by default, 60%), the algorithm lifts the frequency to a certain number of divisions (by default 1), when lowering the load, lowers. Of particular interest is the fact that it allows you to independently set the parameters of the work, therefore it is suitable for foreign guys.

In general, nuclear collectors are very like to invent new energy saving algorithms due to the simplicity of their implementation, so you can find more from a dozen others. Most of them are a complete slag, and when choosing a scheduler should be guided by the rule: either one of the three described above, or a standard interactive, which, by the way, is very good. You can make a choice using all the same Trickster MOD.

Control interfaces

Most of the popular custom cores include several mechanisms of fine control by various driver parameters, most common from which ColorControl, GammaControl, SoundControl and Tempcontrol.

The first two interfaces are available almost everywhere, including Cyanogenmod kernels, the second two are in Leankernel and maybe in others. Anyway, all them can be controlled using Trickster MOD.

Nuclei

What kernel to choose? There is no definite answer to this question, and not because "each of its own", but because in the world there is a huge number of Android devices and almost as many different cores. Nevertheless, there are several popular cores that are developed immediately for several devices. Anyway, many of them I mentioned along the narration, here I will give their brief description.

  • Leankernel - kernel for Galaxy Nexus, Nexus 7 and Galaxy S III. The main focus during development is made on the simplicity and speed of work. Energy Saving Algorithm: InteractiveX V2, I / O: Row Scheduler, All Listed Control Interfaces, Fast USB CHARGE, SWAP and ZRAM Support, Flexible Overclocking CPU and GPU. One of the best cores. Customizable using Trickster MOD.
  • MATR1X (http://goo.gl/fqlbi, goo.gl/zcyva) - core for Nexus S and Nexus 4. Simple and non-rotated kernel. Support overclocking CPU and GPU, GammaControl, Fast USB Charge, SWeep2Wake, Schedule I / O: SiO, ROW and FIPS. Performance tweaks. Configured using Trickster MOD.
  • Bricked-kernel (http://goo.gl/kd5f4, goo.gl/ezkAV) is a simple and non-rotated kernel for Nexus 4 and HTC One X. Optimization for Snapdragon S4 and NVIDIA Tegra 3, recycled power saving mode for Tegra 3, the ability Overclocking, Energy Saving Algorithm: Tuned Ondemand (available and Interactive).
  • Siyahkernel - kernel for Galaxy S II and S III. Flexible overclocking options, automatic battery calibration, improved touch screen driver, energy saving algorithms: Smartassv2 and LulzActiveV2, I / O schedulers: Noop, Deadline, CFQ, BFQV3R2 (default), V (R), SiO. CIFS and NTFS drivers (with automatic). Configured using ExtWeaks.
  • franco.kernel - kernel for Nexus S, Galaxy Nexus, Nexus 4, Nexus 7, Nexus 10, Galaxy S III, Galaxy Note, Optimus One and One X.

The capabilities of the nucleus are highly different from the device to the device, so the details will have to look in place. Nevertheless, flashing this core, you will get the possibility of overclocking, tuning drivers, excellent performance, as well as the support of various algorithms for energy saving and planners. In fact, the kernel includes almost all of the tweaks described in the article. It is considered one of the best available cores. There is an application for automatic update Franko.kernel Updater. You can configure using Trickster MOD.

How to install?

All kernels are distributed in standard for Android zip-archives, which should be flashing through the recovery console just like alternative firmware. Typically, the kernel are compatible with any firmware, therefore, picking up the desired kernel, it can be safely installed. The only thing to pay attention to is the Android version with which the kernel is ensured. It can be how to approach all the Android versions available for the device, and only one will work with one (the developer usually clearly talks about it). Before the firmware, be sure to make a backup of the current firmware using the same recovery console. If something goes wrong, you can always roll back.

conclusions

As you could make sure, custom cores have many advantages over the kernels used in standard or third-party firmware. And more importantly - it is not necessary to know all the subtleties of Android to use them, just download and install a zip archive.

"And I ... I wash the carburetor!"
Joke

Introduction

In kindergarten, we converted grasshoppers in the hope of sorting out in their structure. The School was replenished with a radio receiver "Russia". The institute has reached the car, the nuts of which were repeatedly rearranged. The interests changed, but the desire to "disassemble" sometimes wakes up, and today it is directed to android.

How many times did the presence of the original sources android? I am no longer read. Android is an open project, but, unfortunately, we have the opportunity to read only; Edit Android code, not being an employee of Google, almost impossible. Immerse yourself over this moment and upgrade repository. How to do it, well described on the official.


General architecture

Android architecture can be diagnosed like this:

Desktop computers and laptops have a well-established power system (X86 processors there are several): the computer works "on full revs", when something is being done, and goes into the energy efficient mode when the system is idle. Care in "Sleep" Mode occurs either after quite a long inaction, or manually, for example, when closing the laptop lid.

The phones needed another mechanism: the main state of the system is "hibernation", the output from it is carried out only in cases of necessity. Thus, the system may fall asleep, even if some application shows activity. In Android, the WakeLock mechanism was implemented: if the application (or driver) performs something important that should reach a logical completion, it "captures" wakelock, preventing the device.

Attempts to porting the WakeLock mechanism in the kernel caused resistance to many developers. Android programmers solved a specific problem, the solution of which was a certain mechanism. The conditions of the task were very narrow. Target platform - ARM, so its features were used: ARM processors initially suggest the frequent change of operation modes "sleep" and "wakefulness", in contrast to x86. In the Android applications communicate with the power management system through PowerManager, and what to do client Linux applications?

Android developers did not even try to find a general decision "for the future", which then would be fed into the main core without any problems, did not consult on this issue with the Linux nucleus community. Is it possible to blame them? Despite all problems and discussions, as mentioned above, an API appears in the kernel with an identical functionality of Autosleep.

Programmers of applications under android quite rarely have to deal with WakeLock-Ami, as the platform and drivers handle their obligations assigned to them, taking into account the "sleep" regime. However, a familiar PowerManager will help intervene in this process. By the way, only one scenario comes to the author: do not give the phone to fall asleep when running a service from BroadcastReceiver, which is solved by auxiliary class from Android Support Library WakefulbroadcastReceiver.

Low Memory Killer.

In the standard Linux kernel there is Out of Memory Killer, which based on the Badness parameter defines the killed process:

Badness_For_Task \u003d Total_VM_FOR_TASK / (SQRT (CPU_TIME_IN_SECONDS) *
SQRT (SQRT (CPU_TIME_IN_MINUTES)))

Thus, the more the process consumes memory and the less lives, the less he is lucky.

The diagram presents the overall logging system of android. The logging driver provides access to each Buffer through / dev / log / *. Applications have access to them not directly, but through the liblog library. Liblog library communicate Log, Slog and Eventlog classes. The AdB Logcat command shows the contents of the "Main" buffer.

Conclusion

In this note, we briefly reviewed some of the features of Android as Linux Systems. Some other parts remained behind the brackets (PMEM, RAM Console, etc.), as well as such important aspects of the platform as a whole, as System Service, the process of starting the system and others. If this topic is interesting, in the following articles we will look at them.

Users of mobile devices does not always suit the work and the possibility of their gadgets. For this reason, users are looking for an optimal way, how to flash the kernel of the android operating system. On the one hand, such an action can be easily accomplished with your tablet or smartphone. Thousands of users successfully reflash the kernel without the emergence of difficulties and problems. But, on the other hand, any error during this process can lead to, among which the failure of the gadget and the need for expensive service. At different stages there is a risk to choose the wrong version of the core firmware, which is created by unqualified developers, or does not fit your mobile device. We recommend to be extremely attentive when carrying out any actions that make changes to the software part of the device at a low level. After successfully flashing the kernel, many people have the feeling that they keep a completely new device in their hands. Advanced users Thus can adjust the gadget to their needs and preferences, while receiving new knowledge and experience about modern mobile technologies.

The kernel of the operating system android and its firmware

What is a kernel of a mobile device?

The kernel of the operating system is the basis of the software that controls the hardware of the device. The main parameters of any gadget depends on it. It should be noted that it consists of three interrelated components - the Linux kernel, the vertical Dalvik machine and different low-level services and libraries. If we are talking about custom firmware, only two components are affected, which allow you to add new system services, optimize existing parameters and change the graphic shell.

Those who want to establish the kernel on android should understand that there is a distinction between the concepts of a custom core and a custom firmware. The latter is an informal software version. Custom firmware developed by a team of specialists for specific devices. The castener kernel is based on the Linux kernel, representing his informal version. Often the castener kernel goes complete with the firmware. But it can be installed separately after changing the firmware. In fact, it does not replace the native kernel of the mobile device, which is the ultimate goal of such an operation.

Android kernel firmware is mainly produced in order to increase the operation time of the device for several hours using the power consumption parameters settings. Perhaps this is the main reason for which users carry out complex transformations of the software of their gadgets. The firmware will allow you to change and video chip without consequences for a smartphone or tablet. Advanced users thus adjust the screen operation by changing its color reproduction, sensitivity. The core firmware allows you to improve the sound of the device, update the drivers and implement support for non-standard external gadgets.

Before flashing the kernel, we recommend to make sure that you have chosen a successful version that is created by experienced developers. In addition, it is important to make sure that it comes to your version of Android firmware. It is advisable to read the reviews of people who managed to install the appropriate version of the core on their mobile phone. Reviews may contain important information about problems that may occur at the firmware phase or further functioning of the device.

Gadget Firmware via FastBoot

You can reflash the device android via FastBoot. But to begin with, install the utility to your gadget. There are two versions of such a program. The first provides for downloading FastBoot in the complex with the official Android SDK program. The second version involves loading the utility separately.

We recommend checking whether your mobile laptop is sees or a computer. To do this, you must perform. After downloading and installing to a computer, a laptop running on the Windows operating system, the FastBoot utility and the smartphone connectivity must be opened. To do this, discover the search. In Windows 8, this is enough to send a mouse cursor to the right side of the screen and select the appropriate section. In the search you need to enter "CMD", after which the command line appears before you. The device should be translated into the firmware mode. Next, enter a command that tested the interaction of the computer and the mobile device:

fastBoot Devices.

If everything works, you need to download the correct version of the boot.img kernel firmware. We do not recommend reflashing the core of the original firmware, as this can lead to problems in the work of the smartphone. The file should be saved to a predetermined section on a C called "Android". After that, you must download the mobile device in the FastBoot and connect to the computer. The FastBoot USB message appears on the screen.

  • cD C: \\ Android.
  • fastBoot Flash Boot Boot.img.
  • fastBoot Erase Cache.
  • fastBoot Reboot.

It is very important to correctly enter all the words taking into account the register and spaces. The CD command opens the desired folder in which the required files are contained. After that, flashing occurs. The FastBoot Erase Cache command deletes the cache section. The last command - FastBoot Reboot restarts the device from the firmware mode to normal. If all the specified actions you have made correctly, the process will be successful.

Firmware using ClockworkMod Recovery

ClockworkMod Recovery (or abbreviated CWM) is a recovery system that is used instead of the factory original Recovery. CWM allows you to install a new firmware on your mobile device, flash the kernel, make a backup of files and restore the shell. Such a system can work with firmware update files having a zip-format. ClockworkMod is installed by replacing the factory recovery. To start CWM, you need to know the key combination that is suitable for your gadget. In most cases, this is a combination of buttons to reduce sound and power on, which should be pressed during the device loading.

For the core firmware, you should download the archive with the expansion of ZIP. It must contain the META-INF folder. There are two options further. In the first case, you need to specify the firmware file. The second option assumes the placement of the firmware file in the / sdcard folder. After that, the ClockworkMod Recovery should be activated, find the Apply Update FROM SDCARD function there and specify the desired file.

It should be noted that the CLOCKWORKMOD Recovery menu is convenient and understood for most users. In addition to such a recovery system for firmware, you can use TWRP Recovery. This tool is convenient and popular among Android users. The main thing is to choose the correct firmware file.

Android core firmware is the procedure to which we do not recommend resorting if you are completely satisfied with the work of the gadget. Such actions are due to the desire to increase the performance of a mobile phone or tablet. Advanced users get the ability to set the parameters at a lower level. But without certain knowledge and objective reasons, it is better not to change the software part of the mobile device, as it is associated with risk and failures in its work.

On Sunday evening, Linus Torvalds, which is the Linux parent and the developer of the operating system core, after two months of work announced the release of the new version of the Linux kernel 3.10.

According to the developer himself, this core turned out to be the largest in the amount of innovations over the past few years.

Linus admitted that at first it was assumed to release another release candidate, however, after a thought, the final release at number 3.10 was immediately discovered. Also Torvalds in his message he noted that the new core, as well as version 3.9, is fully prepared for everyday use.

In addition, the announcement of the RC version of the kernel Linus Torvalds wrote that earlier he always included a list of names of the people who sent certain parts of the code, but this time this list would be so great that it could not be given entirely in one sheet mailing.

List of basic changes made to kernel 3.10:

  • Now you can prohibit scripts as programs - the startup functionality containing the path to the interpreter in the "#!" Header, can now be assembled in the form of the kernel module;
  • The BCACHE system developed and used in Google is integrated. BCACHE allows you to organize caching access to slow hard disks on fast SSD drives; caching is underway at the level of the block device - and this allows you to speed up access to the drive, and independently of the file systems used on the device;
  • The kernel can be collected by the CLANG compiler thanks to the prepared project LLVMLinux patches;
  • A dynamic control system of interrupt generation timer appeared. Now it is possible, depending on the current state, changes in the range from thousands of ticks per second to one interruption per second - this allows you to minimize the load on the CPU when processing interrupts in the event of the system inactivity. Now this function is used for real-time and HPC systems (high-performance computing), but in the following editions of the kernel will also be involved for desktop systems too;
  • The possibility of generating an event with an application notification to the approach to the exhaustion of the available process / memory system (in CGroups);
  • For the PERF command, profiling access to memory has become available;
  • Added support for the RDMA (ISER) protocol in the ISCSI subsystem;
  • A new driver "Sync" (experimental) appeared. It was designed as part of the Android platform and is used to synchronize between other drivers;
  • The QXL virtual graphics card driver was integrated (applied in virtualization systems to accelerate graphs with the SPICE protocol);
  • Now new power management tools are supported, which appeared in the AMD processors 16H (Jaguar);
  • Support for accelerating video decoding using the UVD hardware decoder built into the modern GPU AMD was added to the RADEON DRM module;
  • A driver for virtual video adapters Microsoft Hyper-V appeared (on the work of Hyper-V as a whole there are also improvements);
  • Cryptographic functions (SHA256, SHA512, Blowfish, TwoFish, Serpent and Camellia) are optimized using AVX / AVX2 and SSE instructions.

Recently, new versions of the cores come out quite often. Once a few months there is a stable release. Well, unstable candidates for releases come out and more often. Linus Torvalds and many developers around the world are constantly working to improve new cores and adding more and more functionality in them.

With each new version in the Linux kernel, support is supported by several new devices, such as new processors, video cards or even touch screens. Recently, support for new equipment has improved very much. Also, new file systems are also included in the kernel, the operation of the network stack is improved, errors and bugs are corrected.

If you need more detailed information about changes in some specific kernel version, see its ChangeLog on Kernel.org, and in this article we will look at the Linux kernel update to the new version. I will try not to tie the instructions for a specific version of the core, the new nuclei come out quite often and it will be relevant for each of them.

Consider updating the Ubuntu and CentOS kernel. First, let's look at how to update the kernel in Ubuntu 16.04.

Let's first see which kernel you have installed. To do this, open the terminal and execute:

For example, I now use version 4.3, and I can update to the newest version. Ubuntu developers have already taken care of their users to collect the kernel manually and made debacks of the new version of the kernel. They can be downloaded from the official site canonical.

I could bring here a WGET command to download if the core version would be known, but in our case it will be better to use a browser. Open the site http://kernel.ubuntu.com/~kernel-ppa/mainline/. Here are all collected by the Ubuntu kernel. The kernels are collected for both certain distributions, with the code name of the distribution and general. Moreover, the kernels from Ubuntu 16.10 are likely to work at 16.04, but from 9.04 in Ubuntu 16.04 it is not worth putting the kernel.

Scroll to the bottom, it is there who are new versions of the nuclei:

In addition, at the very top there is a Daily / Current folder, which contains the most recent, night builds of the nuclei. Select the desired version of the kernel and download two Linux-Headers and Linux-Image files for your architecture:

After the download is complete, you can switch to the installation. To do this, follow these steps in the terminal:

Go to the installation package folder, such as ~ / downloads:

Run the installation:

If this command has not worked, you can go to another way. Install the GDEBI utility:

sudo Apt-Get Install GDEBI

Then, using it, install the kernel:

sudo GDEBI Linux-Headers * .deb Linux-image - *. DEB

The kernel is installed, it remains to update the bootloader:

sudo Update-Grub

Now you can restart the computer and watch what happened. After the reboot, make sure that the Linux kernel update to the new version was successful:

As you can see the kernel successfully installed and works. But do not rush to delete the old version of the kernel, it is recommended to have several versions of the kernel in the system so that in case of malfunctions to be able to boot with the old working version.

Auto update Linux kernel in Ubuntu

Above, we considered how to install the desired version of the kernel manually. Previously, Ubuntu had a PPA, for daily kernel assemblies, but now it is closed. Therefore, you can update the kernel only by downloading the Deb package and installing it. But all this can be simplified using a special script.

Install the script:

cD / TMP.
$ git clone git: //github.com/gm-script-writer-62850/ubuntu-mainline-kernel-updater
$ Bash Ubuntu-Mainline-Kernel-Updater / Install

Check the availability of updates:

KernelUpdateChecker -r Yakkety.

The -R option allows you to specify the distribution branch for which you want to look for the kernel. For xenial kernels are no longer going, but here they will work perfectly from the next version. In addition, the -no-Rc option can be specified using the utility not to use candidates for releases, and the -V option specifies the exact version of the kernel that you want to install. If you do not matter for what distribution a kernel, if only the newest, use the - Relase option. The script will issue such a result:

Before installing the kernel, you can see the details opening the / TMP / Kernel-Update file:

Here we see that the search for Yakkety was performed, and the version of the 4.7-RC6 kernel is available at the moment. We can install:

sudo / TMP / Kernel-Update

The script will show us the version of the current core, as well as the version of the kernel, which will be installed, the date of its assembly and other details. A question will also be asked whether the change is needed. Next will be setting:

Old nuclei, just in case, do not delete (N):

Ready, updating the kernel to the new version is completed, now restart the computer (Y):

Check whether the update of the Ubuntu kernel worked:

Moreover, the script has been added to the startup and will now check automatically updates after 60 seconds after logging into the system. Autostrack label is in the file:

vI ~ / .config / autostart / kernelupdate.desktop

You can change it as you need or delete. If you want to delete the script completely from the system, perform:

rM ~ / .config / autostart / kernelupdate.desktop
$ Sudo RM / USR / Local / Bin / KernelUpdate (Checker, Scriptgenerator)

Is not downloading

If no errors or the kernel have been updated during installation, and now the system is not loaded with the new core, you can use the old kernel. The system may not start if you use the proprietary driver for the NVIDIA video card in this case, do not rush to download the new version of the kernel, use only stable kernels, the support of this module has already been added to them.

And to restore the system operation, select ADVANCED OPTIONS FOR UBUNTU In the GRUB menu:

And run the previous working kernel:

After downloading, it will be left to remove an incorrectly installed kernel and update the GRUB once again, substitute the desired version of the kernel instead of 4.7:

sudo Apt Remove Linux-HEADER-4.7 * Linux-Image-4.7 *

sudo Update-Grub

Now your system has returned to the previous state. You can try to set the older version of the kernel or try again.

Upgrading the Linux kernel up to 4.4 in CentOS

And now let's look at how to update the Linux kernel of the newest version in Centos. The instruction is checked on CentOS 7, but most likely will work on RedHat 7, Fedora and other similar distributions.

As a rule, new kernels are not included in the official CentOS repository, so to get the latest stable version, we will need to add the ELREPO repository. This is a commercial package repository (Enterprise Linux Packages) it is also supported in Redhat and Fedora.

To add a repository, follow these steps:

First you need to import the key:

rPM --Import https://www.elrepo.org/rpm-gpg-key-elrepo.org.

We add repository and the necessary components in Rhel / Scientific Linux / CentOS-7:

rpm -uvh http://www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm.

yum Install Yum-Plugin-Fastestmirror

In Fedora 22 and above: