I am attempting to debootstrap a Debian 10 onto a disk that will be used with an APU2D4 board.

However, I am getting stuck selecting the proper kernel package.

Assuming the architecture is the same on my host (which runs debootstrap) and on the target host, will apt-get install linux-image-$(dpkg --print-architecture) (assuming Bash semantics) install the correct kernel? ... or is there another virtual package that is even architecture-agnostic and - perhaps - uses $(dpkg --print-architecture) internally to figure out the appropriate specific kernel package?

NB: I am definitely looking for some virtual package so that I will always get the latest kernel updates.


The APU2D4 is an amd64 system, so the appropriate kernel meta-package is linux-image-amd64. In this instance the last part matches the architecture, but that’s not always the case; see the linux-latest package for details of all the available kernel meta-packages.

To ensure you always get the latest kernel, once linux-image-amd64 is installed, you should always upgrade with apt upgrade or apt-get upgrade --with-new-pkgs so that kernel ABI changes are handled correctly.

  • Thanks a bunch. Isn't apt-get upgrade --with-new-pkgs pretty much equivalent to saying apt-get dist-upgrade, though? – 0xC0000022L Jul 30 at 6:19
  • Not quite: dist-upgrade will install new packages and remove packages if necessary to perform the upgrade; upgrade --with-new-pkgs will only install new packages, it won’t remove any. – Stephen Kitt Jul 30 at 7:48
  • Got it, thanks. – 0xC0000022L Jul 30 at 8:36

In this case, yes. apt-get install linux-image-$(dpkg --print-architecture) will install a metapackage that has a dependency on the latest kernel for the given architecture. The .deb package format has no way to specify architecture specific dependencies.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.