How to update the kernel in Ubuntu

Anonim

How to update the kernel in Ubuntu

The Linux distribution core is the basis of the operating system that is responsible for compatibility with devices and performs other important options. Now the developers are trying once a few months or even more often to produce core updates to introduce new features and support equipment. To Ubuntu, this topic also applies, so some owners of this distribution faced with the need to install updates. This procedure is performed relatively difficult, since each action will be made through the "Terminal". Next, we want to demonstrate two ways to cope with the task.

We update the kernel in Ubuntu

The official website on which information is located for each core update is called kernel.org. It is there that you can view absolutely all updates and changes made to the version of interest. As for the update process itself, it happens in manual or automatic mode. Each of these options has its own difficulties and features, so we offer to study them in detail in turns, as a result, to stop on the optimal one. However, for starters, let's see how to find out the current version of the kernel.

Determine the current version of the kernel in Ubuntu

The definition of the current version of the kernel in Ubuntu occurs through the standard "terminal" by entering just one command. For this, they will not even need the rights of the superuser, and the whole process will take only a few seconds.

  1. Open the application menu and run from the "Terminal" from there. You can open the console and another way convenient for you.
  2. Starting the terminal to verify the current version of the kernel in Ubuntu

  3. Enter the ONAME -R command and press the ENTER key.
  4. The command to check the current core version in the Ubuntu distribution

  5. The new line displays the type of kernel and its version.
  6. Results After entering the command to check the version of the kernel in Ubuntu

Now you know what kind of kernel is used in your assembly and you can understand whether it is worth updating it now and from what type to repel. In the future, upon completion of the installation of updates, we recommend using this command to determine the correctness of the installation of files.

Method 1: Manual update mode

The manual core update mode in Ubuntu will take a little longer than automatic, but at the same time you will receive variability in choosing versions and can even download them in advance from another computer, for example, on the USB flash drive, if there is no connection to the network on the main PC. You will only need to pre-select the appropriate assembly and use the commands given to install it.

Go to the official site to download Linux kernel files

  1. Open the browser and go to the reference above. Here you can choose the first directory called "Daily". It contains the latest versions of the kernel, updated every day. Otherwise, just go to the lowest on the list to find the last suitable assembly.
  2. Choose a kernel for download on the official website in Ubuntu

  3. Open the directory with the version to get deb packets.
  4. Selection of the version of the kernel for download on the official Ubuntu website

  5. Download "Linux-Headers" and "Linux-image" of suitable architectures and identical versions at a convenient location. To do this, it will be enough to click on the blue links.
  6. Download images and other kernel files for Ubuntu update

  7. When notification of file processing is notified, check the "Save File" paragraph.
  8. Confirmation of downloading files from the official site to update the kernel in Ubuntu

  9. Navigate to the location of the downloaded packets and click one of them with the right mouse button.
  10. View downloads about downloaded files before installing in Ubuntu

  11. In the context menu that appears, you are interested in "Properties".
  12. Go to the properties of downloaded packages to update the Ubuntu kernel

  13. Pay attention to the footnote "Parent Folder". Copy this path if you find it difficult to enter it yourself in the console if necessary.
  14. Definition of the location of the kernel files for Ubuntu update

  15. Now launch a new session in the Terminal, from where to go to the destination folder defined earlier by entering the CD + path.
  16. Enter a command to go to the location of the files to update the Ubuntu kernel

  17. If the move has passed successfully, the current directory will additionally appear in the new input row, from which subsequent commands will be performed.
  18. Successful transition to file location folder to update kernel in Ubuntu

  19. Treat the dpkg -i * .deb command to start the installation.
  20. Enter a command to install packages when updating the kernel in Ubuntu

  21. If there is a notification that the operation is required for the privileges of the superuser, add the word Sudo before the main string.
  22. Information about access rights when installing the core update files in Ubuntu

  23. To confirm the superuser rights, you will need to enter a password. Consider that symbols when writing are not displayed, but are entered. As soon as you type your password, click on ENTER to confirm.
  24. Enter the password to get rights when installing the core update files in Ubuntu

  25. The unpacking of available archives will begin. It will take a certain period of time. Do not interrupt the terminal session and do not follow other actions during this operation.
  26. Waiting for the completion of the process of unpacking the kernel files when upgrading in Ubuntu

  27. You will be notified of the successful completion of the operation or an error may appear on the screen indicating dependency impairment. If this did not happen, pay attention only to the last actions of the following instruction, and if the installation was interrupted, you will need to perform additional manipulations.
  28. Information about the completion of the update of the kernel files in Ubuntu

Problems with the installation of the kernel through the standard package manager - the situation is common. In most cases, it is solved by using a third-party installer. To begin with, it should be added, and then use the built-in features.

  1. You can use the same session "Terminal" or create a new one. Enter the Sudo APT-Get Install GDEBI command in it and click on ENTER.
  2. Enter a command to install an additional package installation component in Ubuntu

  3. To confirm access rights, you will need to enter a superuser password.
  4. Password entry to install an additional package installation component in Ubuntu

  5. When notifying the extension of the volume of the occupied disk space, select Variant D.
  6. Confirmation of an additional package installation component in Ubuntu

  7. After that, move again to the path where DEB packets were placed, for example, via the CD command ~ / download.
  8. Go to the location of the kernel files for their update to Ubuntu

  9. Use the Sudo GDEBI Linux-Headers * .deb Linux-image string - *. DEB.
  10. A command to install kernel updates via an additional package in Ubuntu

  11. Expect the end of reading and unpacking files.
  12. Waiting for the completion of the core update via the additional component in Ubuntu

  13. Confirm package installation operation.
  14. Confirm the core update via the additional Ubuntu component

  15. To apply all changes, you will need to update the bootloader by entering Sudo Update-Grub.
  16. Updating the bootloader after successfully updating the kernel in Ubuntu

  17. You will be notified that the update has passed successfully.
  18. Notification of successful bootloader update to Ubuntu

Immediately after rebooting the computer, all changes will take effect. Now you will use the operating system on the new core. If suddenly the loader for some reason broke, refer to the section at the end of this material. There we will talk in detail about the causes of problems and describe the solution method.

Method 2: Automatic core update

This method will suit those users who want to receive updates regularly by using for this one and the same means establishing the most recent version of the kernel on the PC. This operation is carried out by using a script. Let's look at how to create it and install updates for the Ubuntu kernel.

  1. To begin with, go to the folder where the script is installed. Run the console and enter the CD / TMP command.
  2. Enter the command to transition to the installation path of the script in Ubuntu

  3. Use the Git Clone Git: //github.com/GM-Script-Writer-62850/ubuntu-PUINLINEBERNEL-UPDATER command.
  4. Team To install the core update script in Ubuntu

  5. If you have received a notification of the lack of Git command, follow the instructions for installation.
  6. Installing an additional component to install Ubuntu script

  7. After it will only be left to write a script by water Bash Ubuntu-Mainline-kernel-Updater / Install.
  8. Installation of the script to update the kernel in Ubuntu

  9. Confirm Add files by selecting a positive response option.
  10. Confirmation of the installation of the script to automatically update the kernel in Ubuntu

  11. Checking updates is started through KernelUpdateChecker -R Yakkety. Note that the -R branch is used to determine the version of the distribution. Specify the option in accordance with your needs.
  12. Enter a command to start checking updates for kernel in Ubuntu

  13. If the kernel updates are found, set them through Sudo / TMP / Kernel-Update.
  14. The command to install the found kernel updates in Ubuntu

  15. At the end, be sure to check the current active kernel via UNAME -R and update GRUB.
  16. Check the current version of the kernel after a successful update in Ubuntu

Now, every time you need to search for kernel updates, you can use the above command to implement the task in automatic mode. You will only remain to confirm all warnings about expanding the busy disk space. If the script is no longer needed, it is recommended to remove it from the system through the following commands:

RM ~ / .config / autostart / kernelupdate.desktop

Sudo RM / USR / LOCAL / BIN / KERNELUPDATE {Checker, ScriptGenerator}

Solving problems with GRUB loader after renewing the kernel

Sometimes during the installation of updates for the kernel, errors occur or the user itself completed the installation of the files in the inadvertent. In such situations, a problem arises, in which the operating system simply ceases to load. It concerns this and owners of proprietary drivers from NVIDIA. The solution here is one thing: boot from the old kernel and delete a new one with a further reinstall or selection of a more stable version.

  1. Turn on the computer and immediately press the ESC key to go to the download menu. Use the arrows to move to the "Advanced Settings for Ubuntu", and then press ENTER.
  2. Selecting additional parameters for download Ubuntu

  3. Lay your old working core here and select it for download.
  4. Select the working core to download the Ubuntu operating system

  5. Enter your account, and after successfully activate the graphic shell, run the console.
  6. Go to terminal after successfully downloading Ubuntu on the working core

  7. Enter the Sudo APT remove Linux-HEADER-5.2 * Linux-Image-5.2 *, where 5.2 is the version of the previously installed kernel.
  8. The command to delete the non-working core version in Ubuntu

  9. Specify the password to provide superuser rights.
  10. Enter the password to further delete the non-working version of the kernel in Ubuntu

  11. After successful deletion, update the bootloader via Sudo Update-Grub.
  12. Updating the bootloader After successfully deleting the non-working core version in Ubuntu

  13. You will be notified that the file generation has passed successfully, and now you will be downloaded from the old kernel again.
  14. Successful downloader update after successful removal of the non-working kernel in Ubuntu

As part of today's material, you learned about two core update methods in Ubuntu. As you can see, to implement each of them you will have to perform a number of console commands, but the choice of the option itself is already dependent on your needs. Use the instructions presented at the end to quickly solve the problems with the PC load after installing the new version of the kernel.

Read more