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
Best Answer
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 withlinux-image-generic
. That is, in recent releases such as 14.04, Ubuntu no longer provides separate kernels for VMs. (Butlinux-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
andlinux-image-virtual
, and that is thatlinux-image-generic
pulls in some extra kernel modules that may be considered nonessential, by depending not only on the latestlinux-image-<VERSION>-generic
package, but also the latestlinux-image-extra-<VERSION>-generic
package. In contrast,linux-image-virtual
depends onlinux-image-<VERSION>-generic
but not onlinux-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 thelinux-image-generic
metapackage as a dependency. Back whenlinux-image-extra-virtual
depended on actuallinux-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 alllinux-image-extra-virtual
needs to do is install the extra modules, which is achieved by making surelinux-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) withlinux-image-extra-virtual
have the necessary packages installed after being upgraded to newer systems (e.g., 14.04).Sources:
-generic
and-virtual
kernel metapackages.There's a lot of documentation that hasn't been updated to reflect that
linux-image-virtual
andlinux-image-generic
provide the same kernels, in recent Ubuntu releases, which is why I've provided links topackages.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.)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
; thelinux-image-generic
metapackage doesn't provide them directly either.