Как обновить ядро linux mint
Перейти к содержимому

Как обновить ядро linux mint

  • автор:

Upgrade Kernel on Linux Mint

Upgrading the kernel on Linux Mint is a comparatively straightforward process that can be completed through the terminal and Update Manager. Upgrading the kernel can bring new features and bug fixes, but it can also cause compatibility issues with certain software and hardware. Therefore, before starting the upgrade, it is essential to back up the key data. This guide covers two methods to upgrade the Linux Mint kernel.

Check the Current Kernel Version

Before upgrading the kernel, it is a good idea to check the current version of the kernel that runs on the system. The “uname -r” command can be employed to achieve this. The “uname -r” is a command that displays the current version of the kernel (the core part of the operating system) that the system is running on. The “-r” option specifically tells the uname command to display only the release version of the kernel.

This command outputs the current kernel version – “5.15.0.56-generic”. This tells us that the current version of the kernel is 5.15.0 and the specific build is 56. The “generic” at the end indicates that this is a standard version of the kernel, as opposed to a specific version which is tailored for a particular hardware architecture.

Upgrade Using the Update Manager

Upgrading the Linux Mint kernel using the Update Manager is a straightforward process. First, open the Update Manager by searching for it in the Mint menu or by running the “mintupdate” command in the terminal.

The Update Manager is launched within seconds on your Linux Mint screen. In the Update Manager, click on the “View” button in the top right corner as displayed from the attached image and select the 4th option which is “Linux kernels”.

The very next screen displays a warning to proceed with the kernel update. It explains the issues that you can encounter after upgrading a kernel and the instructions to perform if you face any of the listed ones. You need to proceed with this step by utilizing the “Continue” button at the bottom.

After continuing, the very next “Kernels” screen shows you a list of available kernel updates. The kernel version with its “Active” status is your currently in-use kernel. Tap on the kernel version that you would like to upgrade to and hit the “Install” button to begin the installation process.

Before the initialization of a kernel upgrade process, the pop-up dialog appears to reassure you that you’re going to upgrade to the newest kernel version. Tap “Yes” to proceed. The process of upgrading might take more than 5 minutes. Wait and relax until then. Once the installation is completed, reboot your system and your new kernel will be in use.

Upgrade Using the Wget Utility

The “wget” command is used to download the latest kernel file for the Linux Mint system from a GitHub repository. The file that is being downloaded is called “ubuntu-mainline-kernel.sh” and is located in the “master” branch of the “pimlie/ubuntu-mainline-kernel.sh” repository on GitHub. When the command is executed, the computer first attempts to resolve the “raw.githubusercontent.com” URL to an IP address.

The server responds with a status code of 200, indicating that the file is found and is being sent back to the computer. The computer receives the file and saves it under the same name as the server-side file in a local directory. In this case, the file is saved as “ubuntu-mainline-kernel.sh” in the current working directory. The file size is 26474 bytes, and the download speed is 1.90 MB/s.

$ wget https: // raw.githubusercontent.com / pimlie / ubuntu-mainline-kernel.sh / master / ubuntu-mainline-kernel.sh

—2023-01-16 13 : 51 : 48 — https: // raw.githubusercontent.com / pimlie / ubuntu-mainline-kernel.sh / master / ubuntu-mainline-kernel.sh

Resolving raw.githubusercontent.com ( raw.githubusercontent.com ) . 185.199.111.133, 185.199.110.133, 185.199.108.133, .

Connecting to raw.githubusercontent.com ( raw.githubusercontent.com ) | 185.199.111.133 | : 443 . connected.

HTTP request sent, awaiting response. 200 OK

Length: 26474 ( 26K ) [ text / plain ]

Saving to: ‘ubuntu-mainline-kernel.sh’

2023 -01- 16 13 : 51 : 48 ( 1.90 MB / s ) — ‘ubuntu-mainline-kernel.sh’ saved [ 26474 / 26474 ]

To display the directories and files in the current working directory, the “ls” command is used. In this case, the “omar” user is in their home directory, represented by the “

” symbol. The output of the command shows a list of the items in the directory including “ubuntu-mainline-kernel.sh” which is likely a shell script file with the “ubuntu-mainline-kernel” name.

Desktop Downloads new.txt Public ubuntu-mainline-kernel.sh Warpinator

Documents Music Pictures Templates Videos

The downloaded latest kernel file from a GitHub repository using the wget command contains the shell script to install the newest kernel version. You can open this file in the VIM editor and have a look at the script as shown in the following image:

The “/usr/local/bin/” directory is used to store the locally installed executable files. It is a good practice to install the locally created scripts in this directory so that they can be easily accessed by all users on the system. The following command is used to install a file called “ubuntu-mainline-kernel.sh” in the “/usr/local/bin/” directory. The “sudo” keyword is used to run the subsequent di with superuser privileges. This is necessary because the “/usr/local/bin/” directory is a system directory and the regular users do not have permission to write to it.

When the command is executed, it copies the “ubuntu-mainline-kernel.sh” file from its current location to the “/usr/local/bin/” directory and set the appropriate permissions for that file so that it can be executed by any user on the system.

$ sudo install ubuntu-mainline-kernel.sh / usr / local / bin /

[ sudo ] password for omar:

The following command uses the “ubuntu-mainline-kernel.sh” script to install a new version of the Linux kernel on an Ubuntu system. The installation process begins with the “-i” flag. When the command is executed, the system prompts for the user’s password and confirmation of the process proceeding (by typing “y” and pressing Enter). The new kernel version is installed and is accessible on the system after this is accomplished. The updated kernel won’t take effect until the user reboots the computer.

$ sudo ubuntu-mainline-kernel.sh -i

[ sudo ] password for omar:

Finding latest version available on kernel.ubuntu.com

Latest version is: v6.1.6, continue ? ( y / N )

Will download 6 files from kernel.ubuntu.com:

Downloading amd64 / linux-headers-6.1.6-060106-generic_6.1.6- 060106.202301141035 _amd64.deb: 100 %

Downloading amd64 / linux-headers-6.1.6-060106_6.1.6- 060106.202301141035 _all.deb: 100 %

Downloading amd64 / linux-image-unsigned-6.1.6-060106-generic_6.1.6- 060106.202301141035 _amd64.deb: 100 %

Downloading amd64 / linux-modules-6.1.6-060106-generic_6.1.6- 060106.202301141035 _amd64.deb: 100 %

Downloading amd64 / CHECKSUMS: 100 %

Downloading amd64 / CHECKSUMS.gpg: 100 %

Importing kernel-ppa gpg key ok

Signature of checksum file has been successfully verified

Checksums of deb files have been successfully verified with sha256sum

Installing 4 packages

Cleaning up the work folder

Now, run the uname-r command again on the Linux Mint terminal to see the kernel version. You will see that the Linux Mint kernel is upgraded to 6.1.6-060106-generic without causing any issues during the upgrade process.

Conclusion

Upgrading the kernel on Linux Mint is a simple process that can be done through the terminal via the wget instruction and using the Update Manager of your Linux Mint system. Please note that before upgrading, you should make sure that all your software is compatible with the new kernel and also make a backup of your important data.

About the author

Omar Farooq

Hello Readers, I am Omar and I have been writing technical articles from last decade. You can check out my writing pieces.

Как обновить ядро в Linux Mint

Как обновить ядро ​​в Linux Mint? В этой статье объясняется то, как это сделать и что это проще, чем вы думаете.

Обновление ядра может быть трудным, особенно для новых пользователей Linux. Однако в Linux Mint можно без проблем перейти на новое ядро. Сегодня мы узнаем, как это сделать и что делать, если у вас возникнут проблемы.

Зачем обновлять ядро ​​Linux?

Ядро Linux обеспечивает правильную работу оборудования вашего устройства в ответ на ввод и запуск приложений. Он также активно участвует в управлении ресурсами, обеспечивая максимальную производительность вашего процессора.

Команда разработчиков ядра Linux регулярно выпускает новые ядра с обновленными драйверами и новыми драйверами для оборудования, не поддерживаемого в предыдущих версиях, а также другие улучшения. Вы можете увидеть последние выпуски ядра на официальном сайте проекта.

Чтобы узнать, какое ядро ​​вы сейчас используете, откройте терминал и введите:

У вас должна получиться распечатка, подобная этой:

Вы можете обнаружить, что ваше ядро ​​значительно старше последней версии ядра. Это связано с тем, что некоторые дистрибутивы, такие как Linux Mint, поставляются со старыми ядрами для обеспечения стабильности. Это старое ядро ​​более надежно и с большей вероятностью будет работать с уникальным программным обеспечением дистрибутива, что снижает вероятность сбоев ядра.

Хотя всегда можно вручную обновить ядро ​​до более нового, этот процесс может быть довольно сложным.

К счастью для вас, Linux Mint позволяет с легкостью обновляться до некоторых новых ядер с помощью инструмента управления ядром в диспетчере обновлений Mint.

Как обновить ядро ​​Linux

Вот как вы можете обновить ядро:

  • Запустите диспетчер обновлений (Update Manager).
  • В раскрывающемся меню диспетчера обновлений нажмите Просмотр > Ядра Linux (View > Linux Kernels).
  • Выберите Продолжить (Continue), если появится предупреждающее сообщение.
  • Щелкните самое новое ядро, доступное в левом списке ядер.
  • В списке ревизий ядра выберите самую новую из поддерживаемых в настоящее время.
  • Щелкните Установить (Install).
  • Подтвердите свой пароль при появлении запроса.

Не удаляйте старое ядро ​​после установки нового. Вы избавите себя от огромной головной боли, если у вас возникнут проблемы с новым ядром.

Чтобы начать использовать новое ядро, просто перезагрузите устройство. Если вы не укажете иное, ваше устройство всегда будет выбирать самое новое установленное ядро ​​при загрузке.

Устранение неполадок ядра Linux

Возможно, после обновления ядра ваше оборудование начинает работать странно, программное обеспечение, которое вы регулярно используете, начинает давать сбой или ваш компьютер вообще перестает работать. Не паникуйте, если это произойдет. Вы можете временно вернуться к предыдущему ядру, открыв меню GRUB при загрузке.

  • Перезагрузите компьютер с Linux, удерживая нажатой клавишу Shift.
  • Когда появится меню GRUB, выберите Advanced Options.
  • Появится список установленных ядер. Выберите старое ядро, в котором не было проблем.

Если проблема исчезнет после отката, старое ядро ​​может быть вашим лучшим выбором на данный момент, если оно имеет официальный статус поддержки.

Однако вам необходимо удалить более новое ядро, если вы не хотите, чтобы ваше устройство использовало его.

  • Снова войдите в меню ядра в диспетчере обновлений Mint и выберите более новое ядро.
  • Щелкните Удалить (Remove).

После этого ваше устройство больше не должно загружаться с новым ядром.

Простое обновление ядра Linux

Теперь у вас есть последнее ядро, которое официально поддерживает Linux Mint. Все системы Linux основаны на той или иной версии ядра, поэтому вам может быть интересно, что их всех отличает?

Как установить последние версии ядра Linux в Ubuntu и Linux Mint

Последние версии ядра Linux имеют драйверы для новых устройств и другие нововведения. К сожалению, многие популярные дистрибутивы Linux не спешат обновить ядро. Данная инструкция покажет, как легко, без компиляции, установить любую версию ядра Linux в Ubuntu и Linux Mint. Вы можете выбрать для установки как более новое ядро, так и более старое, чем предлагает репозиторий вашего дистрибутива.

При желании, вы без проблем можете удалить установленные ядра Linux и вернуться к ядру из репозитория.

Поскольку Linux Mint основана на Ubuntu, то данная инструкция в полной мере применима и к дистрибутивам Linux Mint, кроме LMDE. Для LMDE (Linux Mint Debian Edition) смотрите статью «Как установить последние версии ядра Linux в Debian и основанные на Debian дистрибутивы».

Предупреждение перед обновлением ядра

Необходимо помнить, что из-за несовместимости ядра с программами (в первую очередь, с проприетарными видео драйверами), вы можете столкнуться с проблемами, в том числе с чёрным экраном во время загрузки.

В большинстве случаев, возникшие проблемы можно решить без переустановки дистрибутива. Начните с того, что в меню загрузки перейдите в дополнительные параметры и загрузитесь с предыдущей версией ядра. Выполнив загрузку, удалите проблемное ядро.

Проблемы могут вызвать проприетарные драйверы для видеокарт, поскольку старые версии могут быть не совместимы с последними версиями ядра без патча. Если у вас установлены проприетарные видео драйверы, то серьёзной подумайте, прежде чем следовать инструкциям ниже. Также подготовьтесь, поищите инструкции, как решить проблему при загрузки дистрибутива в чёрный экран.

Следует быть особенно осторожным владельцам старых дистрибутивов — настоятельно рекомендуется обновлять ядро только на последних версиях ОС.

Ещё одна вполне вероятная проблема, с которой вы можете столкнуться если установите ядро самой последней версии — проблема с неразрешёнными зависимостями и как следствие невозможность использования менеджера пакетов apt для обновления и установки программ. Если вы столкнулись с ситуацией, когда после успешной установки нового ядра не получается обновить пакеты с помощью apt, то попробуйте устанавливать более ранние версии ядра, которые вам подходят, а версии, вызывающие проблемы с зависимостями, удаляйте. Помните, что невозможно удалить ядро с которым вы загрузились — перед удалением загрузите компьютер с любой другой версией ядра.

mainline — репозиторий ядер Ubuntu

Для Ubuntu имеется репозиторий скомпилированных ядер mainline всех версий, в том числе самых последних, поэтому установка не вызывает особых сложностей — компилировать ядро Linux не нужно. Более того, имеются инструменты, в том числе с графическим интерфейсом для установки любых ядер.

На самом деле, если ядра уже скомпилированы, то достаточно скачать из одной папки с сервера файлы следующего вида:

  • linux-headers-*-generic_*_amd64.deb
  • linux-headers-*_all.deb
  • linux-image-unsigned-*-generic_*_amd64.deb
  • linux-modules-*-generic_*_amd64.deb

И установить их командой:

Но процесс можно упростить ещё больше, используя утилиты для работы с ядрами.

mainline (продолжение бесплатной версии ukuu) — программа с графическим и консольным интерфейсом для обновления ядра

Если вы предпочитаете графический интерфейс, то используйте Mainline.

Чтобы установить программу выполните следующие команды:

Для запуска графического интерфейса выполните:

Для запуска консольной версии выполните:

Использование графической версии не должно вызвать затруднений. При запуске будет получена информация о доступных ядрах, вы можете выбрать любое ядро и установить его, просто нажав на кнопку «Установка». Дополнительно доступны такие действия как удаление ядер и просмотр списков изменений для каждой версии ядра.

Использование консольной версии следующее:

Справка по опциям и командам:

(1) Строка версии должна браться из вывода —list

(2) Одна или более строк версий (разделённые запятыми) берутся из вывода —list

Перезагрузите компьютер, чтобы использовать новое ядро.

По умолчанию ваша система будет загружена с последним ядром, если вы хотите это изменить, то перейдите в дополнительные параметры загрузки

и выберите желаемую версию из установленных ядер.

Утилита ubuntu-mainline-kernel.sh

Последнюю версию ядра на Ubuntu и Linux Mint также можно установить с помощью утилиты командной строки ubuntu-mainline-kernel.sh.

Загружаем и устанавливаем скрипт ubuntu-mainline-kernel.sh:

Справка по ubuntu-mainline-kernel.sh

Пример установки последней версии ядра

Проверяем текущую версию ядра:

Ядро имеет версию 5.11.

Проверяем, какая версия ядра является последней:

Чтобы вывести список доступных для установки версий ядер выполните команду:

Например, мы хотим установить ядро версии v5.12.11, тогда команда следующая (префикс «v» указывать не надо):

Если вы хотите установить последнюю на данный момент версию, то запустите следующую команду:

Вам будет задан вопрос, хотите ли вы продолжить, введите «y»:

Программа завершила работу — чтобы изменения вступили в силу, требуется перезагрузка.

Опять проверяем версию ядра:

Как восстановить Linux после установки ядра

Если ваш компьютер загружается с чёрным экраном, зависает или что-то не работает после обновления ядра, перезагрузитесь и выберите Дополнительные параметры для вашего дистрибутива в меню GRUB:

Затем выберите предыдущую версию ядра и нажмите Enter:

Независимо от причины, вам необходимо загрузиться с предыдущей версией ядра, если вы хотите удалить последнее ядро. Это потому, что вы не можете удалить ядро, которое в настоящее время используется.

Если вы не видите меню GRUB2, нажмите и удерживайте клавишу Shift или несколько раз нажмите клавишу Esc (это может варьироваться в зависимости от загрузки BIOS или UEFI и от используемой вами версии Ubuntu/Linux Mint) при загрузке GRUB. Должно появиться меню Grub, позволяющее выбрать предыдущую версию ядра.

How to Update Kernel in Linux Mint 20

How_to_Update_Kernel_in_Linux_Mint_20

The Kernel of any operating system is such an important component that it always resides in your system’s memory. It acts as a bridge between your software and hardware which facilitates their communication. In Linux Mint, you are generally not encouraged to update your Linux Kernel since it affects the normal working of your system. However, you might want to do so if you are more concerned about the security of your system. Therefore, in this article, we will share with you the method of updating the Kernel in Linux Mint 20.3.

Procedure of Updating the Kernel in Linux Mint 20.3:

For updating the Kernel in Linux Mint 20.3, you will have to go through the procedure explained in the following steps:

Step # 1: Access the Update Manager:

First of all, you need to search for the Update Manager through Mint Menu’s search bar and click on the Update Manager result to launch it.

Step # 2: Navigate to the View Tab:

In the Update Manager window, you need to click on the View tab for launching the associated menu.

Step # 3: Select the Linux Kernels Option:

From the View menu, you need to click on the Linux Kernels option as highlighted below:

Step # 4: Proceed by Pressing the Continue Button:

Once you will do this, you will be presented with a warning message. According to this message, it is generally not recommended to change the default Kernel version since it might introduce some bugs into your system. However, if you are ready to take this risk and still want to update the version of your Kernel, then you will need to click on the “Continue” button.

Step # 5: Choose the Relevant Linux Kernel and Update the Current One:

You will be displayed with all the available Kernel versions along with the one that you are currently running as shown in the following image:

From this list, you can choose any required upgraded Kernel version and then click on the associated “Install” button for updating your Linux Kernel.

The newly installed Kernel will be automatically loaded into your system’s memory once you will reboot it after the installation process gets completed.

Conclusion:

By following the steps shared above, you can instantly update your Linux Kernel without any hassle. However, we would like to advise you again to do this at your own risk since you might face some issues after messing up with your default Kernel.

Karim Buzdar

Karim Buzdar holds a degree in telecommunication engineering and holds several sysadmin certifications including CCNA RS, SCP, and ACE. As an IT engineer and technical author, he writes for various websites.

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *