
64 ビット カーネルを一切変更せずに再コンパイルし、新しいカーネルを grub のデフォルト カーネルにするという課題を与えられました。私はカーネルを搭載した Ubuntu 14.04.2 64 ビット システムでこれを行っています3.16.0-60-generic
。
私は以下の手順を実行しました(一部はここそして一部はここ) -
apt-get source linux-image-$(uname -r)
sudo apt-get build-dep linux-image-$(uname -r)
cd linux-lts-utopic-3.16.0/
cp /boot/config-3.16.0-60-generic .config
make
make modules
make modules_install
sudo make install
カーネルを起動してすべて実行できますが、カーネル バージョン ( uname -r
) は と表示されます3.16.7-ckt22
。ソースからカーネルをコンパイルした場合、バージョンはどのように変更されたのでしょうか3.16.0-60
?
編集: 私は以下の指示に完全に従わなかったhttps://wiki.ubuntu.com/Kernel/BuildYourOwnKernel現在のカーネル イメージが新しいカーネル イメージで上書きされるためです。-3.16.0-60-recompiled などの変更されたサフィックスを持つイメージが、grub で元のイメージと一緒に表示されることを望んでいました。
答え1
簡単に答えると、カーネル バージョンはコンパイル時に変更されたのではなく、公式の Ubuntu バージョン用に変更されたということです。詳しい答えは以下にあります。
公式Ubuntuカーネルには特別なバージョン番号があります。バージョン番号のマッピングを調べることができます。ここ、特定の行は以下にコピーされます:
3.16.0-60.80~14.04.1 Ubuntu-lts-3.16.0-60.80_14.04.1 3.16.7-ckt22
見るここ命名規則の説明については、以下も参照してください。
What does a specific Ubuntu kernel version number mean?
The official version of an Ubuntu kernel tells you a number of things,
including the base upstream version, the current Ubuntu ABI identifier
and the kernel flavour. (See How can we determine the version of the
running kernel? to find your current version number.)
Given a version like 2.6.35-6.9-generic this can be broken into four
parts as below:
<base kernel version>-<ABI number>.<upload number>-<flavour>
The base kernel version represents the mainline version on which the
Ubuntu kernel is based. The ABI number represents significant changes
in the kernel Application Binary Interface. The upload number is a
monotonically increasing counter for each upload of this base version.
The flavour indicates which kernel configuration variant this is (See
What is a Kernel Flavour?).