linux-image-virtual packages empty in 14.04 trusty?
The linux-image-*
packages that don't contain a kernel version number in their name are metapackages (see also this question). They work by providing no software directly, but instead always declaring the latest stable kernel provided for your Ubuntu release as a dependency. (Here's some more information on what dependencies are in general.)
This causes new kernels to be installed automatically when they are available (and does so without removing older kernels, so you can boot with an older kernel if something is broken for you in the newer one).
With all that said, the kernels linux-image-virtual
causes to be installed are (currently) the same ones as with linux-image-generic
. That is, in recent releases such as 14.04, Ubuntu no longer provides separate kernels for VMs. (But linux-image-virtual
still gives you a kernel and causes updated kernels to be installed; you don't have to install any other metapackage to make that happen.) Ubuntu 12.04 does have separate virtual kernel packages.
There is still a difference between linux-image-generic
and linux-image-virtual
, and that is that linux-image-generic
pulls in some extra kernel modules that may be considered nonessential, by depending not only on the latest linux-image-<VERSION>-generic
package, but also the latest linux-image-extra-<VERSION>-generic
package. In contrast, linux-image-virtual
depends on linux-image-<VERSION>-generic
but not on linux-image-extra-<VERSION>-generic
.
This fulfills (at least part of) the goal of having "the virtual machine kernel" be more lightweight.
Considering this, you might be confused by how a linux-image-extra-virtual
package still exists, even in Ubuntu 14.04. This works simply by declaring the linux-image-generic
metapackage as a dependency. Back when linux-image-extra-virtual
depended on actual linux-image-extra-<VERSION>-virtual
module-providing packages (i.e., back when such packages existed, such as in 12.04), it installed what was then a separate virtual kernel, plus the extra modules. Now there's no separate virtual kernel, so all linux-image-extra-virtual
needs to do is install the extra modules, which is achieved by making sure linux-image-generic
is installed.
linux-image-extra-virtual
is actually a transitional package in recent Ubuntu releases; it really only exists anymore so that old systems (e.g., 12.04) with linux-image-extra-virtual
have the necessary packages installed after being upgraded to newer systems (e.g., 14.04).
Sources:
- Embedded links to entries in the http://packages.ubuntu.com database.
-
Comment 1 for bug 1222278 by Adam Conrad, explaining the current difference between the
-generic
and-virtual
kernel metapackages.
There's a lot of documentation that hasn't been updated to reflect that linux-image-virtual
and linux-image-generic
provide the same kernels, in recent Ubuntu releases, which is why I've provided links to packages.ubuntu.com
to show the dependency relationships explicitly. (There's a slight bit of information in this question. Somewhere there are Ubuntu or Debian release notes that explicitly address this in more detail, I think.)
Or is the whole thing deprecated now?
That may be considered an accurate description of what has happened. The key point, though, is that this is not related to there being no actual kernel files provided directly by linux-image-virtual
; the linux-image-generic
metapackage doesn't provide them directly either.
Related videos on Youtube
user309427
Updated on September 18, 2022Comments
-
user309427 over 1 year
I can't seem to get a linux-virtual kernel (for VMs) installed in trusty. The packages install perfectly fine, but they simply are empty, without anything except changelog and copyright files in usr/share/doc.
What's the proper procedure to install -virtual kernel on Ubuntu 14.04 trusty? Or is the whole thing deprecated now?
Thanks
For reference:
root@s2:/boot/grub# dpkg -L linux-virtual /. /usr /usr/share /usr/share/doc /usr/share/doc/linux-virtual /usr/share/doc/linux-virtual/copyright /usr/share/doc/linux-virtual/changelog.gz root@s2:/boot/grub# dpkg -L linux-image-virtual /. /usr /usr/share /usr/share/doc /usr/share/doc/linux-image-virtual /usr/share/doc/linux-image-virtual/copyright /usr/share/doc/linux-image-virtual/changelog.gz root@s2:/boot/grub# dpkg -L linux-image-extra-virtual /. /usr /usr/share /usr/share/doc /usr/share/doc/linux-image-extra-virtual /usr/share/doc/linux-image-extra-virtual/copyright /usr/share/doc/linux-image-extra-virtual/changelog.gz root@s2:/boot/grub# dpkg -L linux-headers-virtual /. /usr /usr/share /usr/share/doc /usr/share/doc/linux-headers-virtual /usr/share/doc/linux-headers-virtual/copyright /usr/share/doc/linux-headers-virtual/changelog.gz root@s2:/boot/grub# lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 14.04.1 LTS Release: 14.04 Codename: trusty
-
user309427 almost 10 yearsI guess I probably worded my question a bit imprecise, yet your answer probably answers all questions related to the virtual images in ubuntu 14.04. Thanks a lot.
-
davidbak almost 9 yearsSo - if I'm understanding you correctly, in 15.04 after sudo apt-get install linux-virtual (or linux-image-virtual) then uname -a will still report "-generic" and /boot will contain only files named *-generic and none named *-virtual? Geez I wish that web pages all over the place would be updated ... thanks for your answer here!