- Debian jessie linux kernel
- 8.6.1. Управление образами ядра
- How to Install Kernel Headers in Ubuntu and Debian
- Install Kernel Headers in Ubuntu and Debian
- If You Appreciate What We Do Here On TecMint, You Should Consider:
- minazou67 / howto-upgrade-debian-jessie-kernel.md
- This comment has been minimized.
- mxi1 commented Apr 3, 2017
- This comment has been minimized.
- g00dnatur3 commented Jun 6, 2017
- This comment has been minimized.
- shichao-an commented Jul 20, 2017
- This comment has been minimized.
- kalashnlkov commented Sep 20, 2017
- This comment has been minimized.
- zenwalk commented Dec 11, 2017
- This comment has been minimized.
- malick-dev commented Jan 14, 2018
- This comment has been minimized.
- dkalog commented Mar 3, 2019
- Managing Linux Kernel Upgrades In Debian
- The Debian LTS kernel Initiative
- Who really needs a new kernel?
- How to know Linux Kernel version in Debian Linux?
- Using backport Linux kernels in Debian
- Look for available Linux Kernel
- Installing a new Linux Kernel in Debian
Debian jessie linux kernel
Зачем пересобирать ядро? Обычно этого делать не нужно, так как ядро, устанавливаемое по умолчанию в Debian, подходит для многих конфигураций. Кроме этого, в Debian есть ещё несколько сборок ядра. Поэтому, сначала проверьте, может другой пакет с ядром лучше подходит для вашего компьютера. Однако, полезно пересобрать ядро в следующих случаях:
если установлено специфичное оборудование или возникает конфликт аппаратного обеспечения со стандартным ядром
чтобы задействовать свойства, которых нет в поставляемых сборках ядра (например, поддержка high memory)
для оптимизации ядра, удаляя ненужные драйверы для уменьшения времени загрузки
создания монолитного ядра, без модулей
для установки обновлённого или разрабатываемого ядра
чтобы больше узнать о ядрах linux
8.6.1. Управление образами ядра
Не бойтесь пересобирать ядро. Это забавно и полезно.
Чтобы собрать ядро по технологии Debian, вам потребуются некоторые пакеты: fakeroot , kernel-package , linux-source-2.6 и некоторые другие, которые, вероятно, уже установлены (в /usr/share/doc/kernel-package/README.gz есть полный список).
С помощью этого метода создаётся .deb файл из исходных текстов ядра, а также, если у вас имеются нестандартные модули, делается .deb файл с синхронизированными зависимостями. Это наилучший способ управления образами ядра; в /boot лежит ядро, System.map и журнальный конфигурационный файл от сборки.
Заметим, что вам не обязательно собирать ядро « по технологии Debian » ; но мы пришли к выводу, что управлять ядрами с помощью системы управления пакетами на самом деле безопаснее и легче. Фактически, вы можете получить исходные тексты ядра прямо у Линуса, а не в виде linux-source-2.6 , и собрать ядро с помощью kernel-package .
Заметим, что полную документацию по использованию kernel-package можно найти в /usr/share/doc/kernel-package . Этот раздел содержит лишь краткое руководство.
Далее мы предполагаем, что вы можете делать на своей машине что угодно и распаковываете исходные тексты ядра в домашний каталог [22] . Также мы предполагаем, что у вас ядро версии 3.16. Проверьте, что вы находитесь в каталоге куда хотите распаковать исходные тексты ядра, распакуйте их с помощью команды tar xf /usr/src/linux-source-3.16.tar.xz и перейдите в только что появившийся каталог linux-source-3.16 .
Теперь вы можете выполнить настройку ядра. Если установлены, настроены и запущены X11, то запустите make xconfig , иначе make menuconfig (вам потребуется установить пакет libncurses5-dev ). Внимательно прочитайте интерактивную документацию и внимательно выберите нужные параметры. Если что-то непонятно, обычно лучше включить драйвер устройства (программное обеспечение, которое управляет установленным оборудованием, например, картами Ethernet, SCSI-контроллерами и так далее). Будьте осторожны: для других параметров, не относящихся к определённому аппаратному обеспечению, нужно оставить значения по умолчанию, если вы не понимаете, что они делают. Не забудьте выбрать « Kernel module loader » в « Loadable module support » (не включён по умолчанию). Если его не включить, возникнут проблемы с установкой Debian.
Очистите дерево исходных текстов и сбросьте параметры kernel-package . Для этого выполните make-kpkg clean .
Теперь соберите ядро: fakeroot make-kpkg —initrd —revision=1.0.custom kernel_image . Номер версии « 1.0 » можно изменить; этот номер версии нужен только для отслеживания ваших сборок. Более того, вы можете добавить любое слово вместо « custom » (например, имя машины). Сборка ядра может занять некоторое время в зависимости от мощности машины.
После завершения сборки вы можете установить собранное ядро как обычный пакет. От суперпользователя выполните dpkg -i ../linux-image-3.16- субархитектура _1.0.custom_i386.deb . Часть субархитектура — это необязательная субархитектура, например, « 686 » , зависящая от установленных параметров ядра. dpkg -i установит ядро вместе с некоторыми полезными файлами поддержки. Например, будет правильно установлен System.map (полезен при отладке проблем с ядром), а также /boot/config-3.16 , содержащий параметры сборки ядра. Также, пакет способен автоматически использовать системный загрузчик платформы для обновления загрузки. Если вы создали пакет с модулями, то вам нужно установить и его.
Настало время перезагрузить систему: внимательно прочитайте все предупреждения, которые могут появиться, затем наберите shutdown -r now .
Подробней о ядрах Debian и сборке ядра смотрите в Debian Linux Kernel Handbook. Полная информация о kernel-package лежит в каталоге /usr/share/doc/kernel-package .
[22] Есть несколько мест куда можно распаковывать исходные тексты и собрать своё ядро, но это самый лёгкий способ без необходимости раздачи специальных прав.
Источник
How to Install Kernel Headers in Ubuntu and Debian
In our last article, we have explained how to install kernel headers in CentOS 7. Kernel Headers contain the C header files for the Linux kernel, which offers the various function and structure definitions required when compiling any code that interfaces with the kernel, such as kernel modules or device drivers and some user programs.
It is very important to note that the kernel headers package you install should match with the currently installed kernel version on your system. If your kernel version ships with the default distribution installation or you have upgraded your Kernel using dpkg or apt package manager from the Ubuntu or Debian base repositories, then you must install matching kernel headers using package manager only. And if you’ve compiled kernel from sources, you must also install kernel headers from sources.
In this article, we will explain how to install Kernel Headers in Ubuntu and Debian Linux distributions using default package manager.
Install Kernel Headers in Ubuntu and Debian
First check your installed kernel version as well as kernel header package that matches your kernel version using following commands.
Check Kernel Version and Kernel Headers in Ubuntu
On Debian, Ubuntu and their derivatives, all kernel header files can be found under /usr/src directory. You can check if the matching kernel headers for your kernel version are already installed on your system using the following command.
Check Kernel Headers in Ubuntu
From the above output, it’s clear that the matching kernel header directory doesn’t exist, meaning the package is not yet installed.
Before you can install the appropriate kernel headers, update your packages index, in order to grab information about the latest package releases, using the following command.
Then run the following command that follows to install the Linux Kernel headers package for your kernel version.
Install Kernel Headers in Ubuntu
Next, check if the matching kernel headers have been installed on your system using the following command
Verify Installed Kernel Headers in Ubuntu
That’s all! In this article, we have explained how to install kernel headers in Ubuntu and Debian Linux and other distributions in the Debian family tree.
Always keep in mind that to compile a kernel module, you will need the Linux kernel headers. If you have any quires, or thoughts to share, use the comment form below to reach us.
If You Appreciate What We Do Here On TecMint, You Should Consider:
TecMint is the fastest growing and most trusted community site for any kind of Linux Articles, Guides and Books on the web. Millions of people visit TecMint! to search or browse the thousands of published articles available FREELY to all.
If you like what you are reading, please consider buying us a coffee ( or 2 ) as a token of appreciation.
We are thankful for your never ending support.
Источник
minazou67 / howto-upgrade-debian-jessie-kernel.md
How to upgrade the Linux Kernel of debian 8 jessie
Debian 8 のカーネルをアップグレードする方法です。
- Microsoft Windows Server 2012 R2
- Hyper-V
- Debian 8.2 jessie
- Use iSCSI hard disk
特定の操作を実行すると、下記の警告がカーネルのメッセージバッファに出力され、その後ハードディスクが read-only でリマウントされてしまうため。
- 稼働しているアプリケーションを停止
- Hyper-V 上の仮想マシンにチェックポイントを作成
- カーネルのバージョンを確認
パッケージの取得元に backports リポジトリを追加します。
Install the kernel
Clean-up and reboot
Check the kernel version
- アプリケーションを開始し動作に問題がないことを確認
- Hyper-V 上の仮想マシンのチェックポイントを削除
- Hyper-V 上の仮想マシンをエクスポートしてバックアップ
This comment has been minimized.
Copy link Quote reply
mxi1 commented Apr 3, 2017
Thanks for sharing.
This comment has been minimized.
Copy link Quote reply
g00dnatur3 commented Jun 6, 2017
Nice instructions, Thank You!
谢谢
This comment has been minimized.
Copy link Quote reply
shichao-an commented Jul 20, 2017
This comment has been minimized.
Copy link Quote reply
kalashnlkov commented Sep 20, 2017
Thank you for sharing.
This comment has been minimized.
Copy link Quote reply
zenwalk commented Dec 11, 2017
This comment has been minimized.
Copy link Quote reply
malick-dev commented Jan 14, 2018
This comment has been minimized.
Copy link Quote reply
dkalog commented Mar 3, 2019
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Источник
Managing Linux Kernel Upgrades In Debian
Last updated September 6, 2017 By Shirish 11 Comments
Brief: This article explains the steps to upgrade Linux kernel in Debian. It also provides you a few tips and some trivia around kernel management in Debian Linux.
While upgrading Linux Kernel in Ubuntu is slightly easier thanks to some graphical tool, I as a Debian user prefer to set things right in the terminal instead of in GUI. Before we see how to upgrade Linux kernel in Debian, let’s see a few things about it first.
The Debian LTS kernel Initiative
Now the Linux kernel is an ever-moving target. Roughly every four months Linus releases a new kernel. Four months is a pretty short time to catch all the regressions and add new features etc. and hence . in 2011, a number of electronic makers came together and the LTSI initiative was born.
The reason I shared the above is, at least in Debian, the Debian kernel maintainers always try to stick to the LTSI release in the stable release. The reasoning is simple, you get two years maintenance from upstream kernel which is similar to Redhat and Canonical’s Ubuntu. Debian also provides security support for 5 years for the Debian kernel plus apps and they have been somewhat successful in raising the required amount although it never can be enough.
Who really needs a new kernel?
There are only 2-3 types of people or people thrown into situations where a kernel upgrade will benefit.
- Have the latest hardware – While both chip manufacturers nowadays send code and driver contributions around 6 months before release, the userspace tools would need more time to be optimized and know the system a bit more intimately. For e.g. if I were to a Kaby Lake processor or a Zen processor then having the latest kernels will at the very least make sure you have a CLI (command-line interface) if not the GUI.
- Regression – At times, mistakes do happen which are called regressions. These regressions over-time are and can be expensive to an organization. This has been discussed and known over the years and the only way to do that is have more and more users testing the kernels and having a variety of kernels in real-world conditions. In reality, most people do not even know that the kernel has a performance regression unless there is a specific use-case and there are other kernel versions doing the same/similar work with the same specs.
- Formatting a system to start things from scratch – Whenever you format your system it makes most sense to use the latest available kernel
How to know Linux Kernel version in Debian Linux?
Before we go anywhere or do anything, we need to know what is the version of the existing kernel. You can use the command below:
The output of the above command for my system is 4.9.0-2-amd64 meaning that I use Linux Kernel 4.9.0-2.
Using backport Linux kernels in Debian
Now if I were on Debian Jessie, what is called as the “stable” in Debian for 64-bit systems (as that’s in vogue now) – I would be using 3.16.0-4. Now let’s say for one or the reason from the above, you want the backported kernel. Now the only thing you need to do is to add backports to the list of /etc/apt/sources.list . Here is an example of an /etc/apt/sources.list using stable –
#——————————————————————————# |
# OFFICIAL DEBIAN REPOS |
#——————————————————————————# |
###### Debian Main Repos ###### |
deb http://deb.debian.org stable main contrib |
deb-src http://deb.debian.org stable main contrib |
deb http://deb.debian.org stable-updates main contrib |
deb-src http://deb.debian.org stable-updates main contrib |
deb http://deb.debian.org/debian-secruity stable/updates main |
deb-src http://deb.debian.org/debian-secruity stable/updates main |
deb http://ftp.debian.org/debian jessie-backports main |
deb-src http://ftp.debian.org/debian jessie-backports main |
Do that and run sudo aptitude update
Look for available Linux Kernel
Once the index is updated, you can do –
aptitude search linux-image
It should give you a list containing your existing kernel as well as any new kernel images its finds. Mine is a bit differently tailored /etc/apt/sources.list hence gives slightly different results.
As you can see, the linux-image commanded also showed the 32-bit kernels because I have added architecture-i386 as a foreign architecture.
[$] aptitude search linux-image |
p linux-image-4.10.0-rc6-686:i386 – Linux 4.10-rc6 for older PCs (signed) |
p linux-image-4.10.0-rc6-686-dbgsym:i386 – Debug symbols for linux-image-4.10.0-rc6-686 |
p linux-image-4.10.0-rc6-686-pae:i386 – Linux 4.10-rc6 for modern PCs (signed) |
p linux-image-4.10.0-rc6-686-pae-dbgsym:i386 – Debug symbols for linux-image-4.10.0-rc6-686-pae |
p linux-image-4.10.0-rc6-686-pae-unsigned:i386 – Linux 4.10-rc6 for modern PCs |
p linux-image-4.10.0-rc6-686-unsigned:i386 – Linux 4.10-rc6 for older PCs |
p linux-image-4.10.0-rc6-amd64 – Linux 4.10-rc6 for 64-bit PCs (signed) |
p linux-image-4.10.0-rc6-amd64-dbgsym – Debug symbols for linux-image-4.10.0-rc6-amd64 |
p linux-image-4.10.0-rc6-amd64-unsigned – Linux 4.10-rc6 for 64-bit PCs |
v linux-image-4.10.0-trunk-686:i386 – |
p linux-image-4.10.0-trunk-686-dbgsym:i386 – Debug symbols for linux-image-4.10.0-trunk-686 |
v linux-image-4.10.0-trunk-686-pae:i386 – |
p linux-image-4.10.0-trunk-686-pae-dbgsym:i386 – Debug symbols for linux-image-4.10.0-trunk-686-pae |
p linux-image-4.10.0-trunk-686-pae-unsigned:i386 – Linux 4.10 for modern PCs |
p linux-image-4.10.0-trunk-686-unsigned:i386 – Linux 4.10 for older PCs |
v linux-image-4.10.0-trunk-amd64 – |
p linux-image-4.10.0-trunk-amd64-dbgsym – Debug symbols for linux-image-4.10.0-trunk-amd64 |
p linux-image-4.10.0-trunk-amd64-unsigned – Linux 4.10 for 64-bit PCs |
p linux-image-4.9.0-2-686:i386 – Linux 4.9 for older PCs (signed) |
p linux-image-4.9.0-2-686-dbgsym:i386 – Debug symbols for linux-image-4.9.0-2-686 |
p linux-image-4.9.0-2-686-pae:i386 – Linux 4.9 for modern PCs (signed) |
p linux-image-4.9.0-2-686-pae-dbgsym:i386 – Debug symbols for linux-image-4.9.0-2-686-pae |
p linux-image-4.9.0-2-686-pae-unsigned:i386 – Linux 4.9 for modern PCs |
p linux-image-4.9.0-2-686-unsigned:i386 – Linux 4.9 for older PCs |
i A linux-image-4.9.0-2-amd64 – Linux 4.9 for 64-bit PCs (signed) |
p linux-image-4.9.0-2-amd64-dbgsym – Debug symbols for linux-image-4.9.0-2-amd64 |
p linux-image-4.9.0-2-amd64-unsigned – Linux 4.9 for 64-bit PCs |
p linux-image-4.9.0-2-grsec-686-pae:i386 – Linux 4.9 for modern PCs, Grsecurity protection |
p linux-image-4.9.0-2-grsec-amd64 – Linux 4.9 for 64-bit PCs, Grsecurity protection |
p linux-image-4.9.0-2-rt-686-pae:i386 – Linux 4.9 for modern PCs, PREEMPT_RT (signed) |
p linux-image-4.9.0-2-rt-686-pae-dbgsym:i386 – Debug symbols for linux-image-4.9.0-2-rt-686-pae |
p linux-image-4.9.0-2-rt-686-pae-unsigned:i386 – Linux 4.9 for modern PCs, PREEMPT_RT |
p linux-image-4.9.0-2-rt-amd64 – Linux 4.9 for 64-bit PCs, PREEMPT_RT (signed) |
p linux-image-4.9.0-2-rt-amd64-dbgsym – Debug symbols for linux-image-4.9.0-2-rt-amd64 |
p linux-image-4.9.0-2-rt-amd64-unsigned – Linux 4.9 for 64-bit PCs, PREEMPT_RT |
p linux-image-586:i386 – Linux for older PCs (dummy package) |
p linux-image-686:i386 – Linux for older PCs (meta-package) |
p linux-image-686-dbgsym:i386 – Debug symbols for Linux 686 configuration (meta-package) |
p linux-image-686-pae:i386 – Linux for modern PCs (meta-package) |
p linux-image-686-pae-dbgsym:i386 – Debug symbols for Linux 686-pae configuration (meta-package) |
i linux-image-amd64 – Linux for 64-bit PCs (meta-package) |
p linux-image-amd64-dbgsym – Debug symbols for Linux amd64 configuration (meta-package) |
p linux-image-grsec-686-pae:i386 – Linux image meta-package, grsec featureset |
p linux-image-grsec-amd64 – Linux image meta-package, grsec featureset |
p linux-image-grsec-i386:i386 – Linux image meta-package, grsec featureset (transition package) |
p linux-image-rt-686-pae:i386 – Linux for modern PCs (meta-package), PREEMPT_RT |
p linux-image-rt-686-pae-dbgsym:i386 – Debug symbols for Linux rt-686-pae configuration (meta-package) |
p linux-image-rt-amd64 – Linux for 64-bit PCs (meta-package), PREEMPT_RT |
p linux-image-rt-amd64-dbgsym – Debug symbols for Linux rt-amd64 configuration (meta-package) |
Installing a new Linux Kernel in Debian
Now usually if people want to update, they simply update linux-image-amd64 and it will pull in the required dependencies.
In my case, however, as there are no kernel updates in the short-term I will show how to update/upgrade to the next kernel, in this case 4.10.0-trunk. So this is what I do:
sudo aptitude install linux-image-4.10.0-trunk-amd64-unsigned linux-headers-4.10.0-trunk-amd64
Just follow the instructions. If something goes wrong, you’ll still be on the old kernel. However, I would insist that you file a bug report to Debian developers.
I hope you know how to upgrade Linux kernel in Debian and you also learned a few things about Linux kernel. As I love using Debian, I’ll write more articles around it in coming weeks.
Like what you read? Please share it with others.
Источник