KERNEL-IMG.CONF(5)       (24 March 2019)       KERNEL-IMG.CONF(5)

     NAME
          kernel-img.conf - configuration file for Linux kernel
          packages

     SYNOPSIS
          /etc/kernel-img.conf

     DESCRIPTION
          The file /etc/kernel-img.conf is used by the kernel package
          installation and removal process to allow local options for
          handling some aspects of the installation.  Most configura-
          tion variables apply only to kernel image packages.

          Not all kernel image package creators support this file, or
          all the configuration variables.  Support status for the
          file itself is: nokeep; l    l.  Package creator     Status
          Debian linux source package   supported Ubuntu linux source
          package   supported kernel-package supported make
          deb-pkg   ignored

          The format of the file is a simple VAR=VALUE pair. Boolean
          values may be specified as Yes, True, 1, and No, False, 0,
          and are case insensitive.  This file is automatically cre-
          ated by the installation script in certain circumstances.

          At the moment, the user modifiable variables supported are:

          do_symlinks
               If set, the postinst and postrm scripts will maintain
               symlinks to default kernel and initramfs images, as
               described in linux-update-symlinks(8).  This variable
               is set by default.  nokeep; l    l.  Package
               creator     Status Debian linux source
               package   supported Ubuntu linux source
               package   supported kernel-package ignored since
               v12.001;      previously supported

          image_dest
               Set this variable to the directory in which symlinks to
               the default kernel and initramfs images should be main-
               tained.  The default value is /.  nokeep; l    l.
               Package creator     Status Debian linux source
               package   supported Ubuntu linux source
               package   supported kernel-package ignored since
               v12.001;      previously supported

          link_in_boot
               If set, this has the same effect as image_dest = /boot
               and overrides any other setting of image_dest.  This
               variable is unset by default.  nokeep; l    l.  Package

     Page 1                       Debian             (printed 5/24/22)

     KERNEL-IMG.CONF(5)       (24 March 2019)       KERNEL-IMG.CONF(5)

               creator     Status Debian linux source
               package   supported Ubuntu linux source
               package   supported kernel-package ignored since
               v12.001;      previously supported

          postinst_hook
               DEPRECATED: Set this variable to a script to be exe-
               cuted during installation. The path can be a relative
               path if the script lives in a safe path -- that is, if
               it lives in /bin, /sbin, /usr/bin, or /usr/sbin, or
               must be an absolute path instead. Before calling this
               script, the environment variable STEM shall be set to
               the value of the --stem argument (or the default value,
               linux), and in packages created by kernel-package
               KERNEL_PACKAGE_VERSION shall be set to the version of
               the kernel-package that created the package.  This
               script shall be called with two arguments, the first
               being the version of the kernel image, and the second
               argument being the location of the kernel image itself.
               Errors in the script shall cause the postinst to fail.
               Since debconf is in use before the script is called,
               this script should issue no diagnostic messages to std-
               out -- while the postinst does call db_stop, debconf
               does not restore stdout, so messages to stdout disap-
               pear.  An example script for grub users is present in
               /usr/share/doc/kernel-package/ directory.  This script
               is run after the scripts in /etc/kernel/postinst.d
               directory.  nokeep; l    l.  Package creator     Status
               Debian linux source package   unsupported since
               v4.6.1-1;      previously supported Ubuntu linux source
               package   unsupported since v4.15.0-18.19;      previ-
               ously supported kernel-package deprecated

          postrm_hook
               DEPRECATED: Set this variable to a script to be exe-
               cuted in the postrm (that is, after the image has been
               removed) after all the remove actions have been per-
               formed. The path can be a relative path if the script
               lives in a safe path -- that is, if it lives in /bin,
               /sbin, /usr/bin, or /usr/sbin, or must be an absolute
               path instead. In packages created by kernel-package,
               the environment variable KERNEL_PACKAGE_VERSION shall
               be set to the version of the kernel-package that cre-
               ated the package. This script shall be called with two
               arguments, the first being the version of the kernel
               image, and the second argument being the location of
               the kernel image itself. Errors in the script shall
               produce a warning message, but shall be otherwise
               ignored. Since debconf is in use before the script is
               called, this script should issue no diagnostic messages
               to stdout --  while the postinst does call db_stop,
               debconf does not restore stdout, so messages to stdout

     Page 2                       Debian             (printed 5/24/22)

     KERNEL-IMG.CONF(5)       (24 March 2019)       KERNEL-IMG.CONF(5)

               disappear.  This script is run after the scripts in
               /etc/kernel/postrm.d directory.  nokeep; l    l.  Pack-
               age creator     Status Debian linux source
               package   unsupported since v4.6.1-1;      previously
               supported Ubuntu linux source package   unsupported
               since v4.15.0-18.19;      previously supported
               kernel-package deprecated

          preinst_hook
               DEPRECATED: Set this variable to a script to be exe-
               cuted before the package is unpacked, and can be used
               to put in additional checks. The path can be a relative
               path if the script lives in a safe path -- that is, if
               it lives in /bin, /sbin, /usr/bin, or /usr/sbin, or
               must be an absolute path instead. In packages created
               by kernel-package, the environment variable
               KERNEL_PACKAGE_VERSION shall be set to the version of
               the kernel-package that created the package. This
               script shall be called with two arguments, the first
               being the version of the kernel image, and the second
               argument being the location of the kernel image itself.
               This script is run after the scripts in
               /etc/kernel/preinst.d directory.  nokeep; l    l.
               Package creator     Status Debian linux source
               package   unsupported since v4.6.1-1;      previously
               supported Ubuntu linux source package   unsupported
               since v4.15.0-18.19;      previously supported
               kernel-package deprecated

          prerm_hook
               DEPRECATED: Set this variable to a script to be exe-
               cuted before the package files are removed (so any
               added files may be removed) . The path can be a rela-
               tive path if the script lives in a safe path -- that
               is, if it lives in /bin, /sbin, /usr/bin, or /usr/sbin,
               or must be an absolute path instead. In packages cre-
               ated by kernel-package, the environment variable
               KERNEL_PACKAGE_VERSION shall be set to the version of
               the kernel-package that created the package. This
               script shall be called with two arguments, the first
               being the version of the kernel image, and the second
               argument being the location of the kernel image itself.
               Errors in the script shall cause the prerm to fail.
               Since debconf is in use before the script is called,
               this script should issue no diagnostic messages to std-
               out -- while the postinst does call db_stop, debconf
               does not restore stdout, so messages to stdout disap-
               pear.  This script is run after the scripts in
               /etc/kernel/prerm.d directory.  nokeep; l    l.  Pack-
               age creator     Status Debian linux source
               package   unsupported since v4.6.1-1;      previously
               supported Ubuntu linux source package   unsupported

     Page 3                       Debian             (printed 5/24/22)

     KERNEL-IMG.CONF(5)       (24 March 2019)       KERNEL-IMG.CONF(5)

               since v4.15.0-18.19;      previously supported
               kernel-package deprecated

          src_postinst_hook
               DEPRECATED: Unlike the other hook variables, this is
               meant for a script run during the post inst of a docs,
               headers or a source package. Using this hook for the
               headers package is now being deprecated, at some point
               the headers post install script shall only run the
               header_postinst_hook.  The path can be a relative path
               if the script lives in a safe path -- that is, if it
               lives in /bin, /sbin, /usr/bin, or /usr/sbin, or must
               be an absolute path instead. The environment variable
               KERNEL_PACKAGE_VERSION shall be set to the version of
               the kernel-package that created the package.  This
               script shall be called with two arguments, the first
               being the name of the package being installed (could be
               kernel source or headers), and the second argument
               being the version of the package being installed.
               Errors in the script shall cause the postinst to fail.
               This script is run after the scripts in
               /etc/kernel/src_postinst.d directory.  nokeep; l    l.
               Package creator     Status Debian linux source
               package   unsupported Ubuntu linux source
               package   unsupported kernel-package deprecated

          header_postinst_hook
               DEPRECATED: Unlike the other hook variables, this is
               meant for a script run during the post inst of a head-
               ers package only. The path can be a relative path if
               the script lives in a safe path -- that is, if it lives
               in /bin, /sbin, /usr/bin, or /usr/sbin, or must be an
               absolute path instead. In packages created by
               kernel-package, the environment variable
               KERNEL_PACKAGE_VERSION shall be set to the version of
               the kernel-package that created the package. This
               script shall be called with two arguments, the first
               being the name of the package being installed, and the
               second argument being the version of the package being
               installed. Errors in the script shall cause the pos-
               tinst to fail.  This script is run after the scripts in
               /etc/kernel/header_postinst.d directory.  nokeep;
               l    l.  Package creator     Status Debian linux source
               package   unsupported Ubuntu linux source
               package   unsupported since v4.15.0-18.19;      previ-
               ously supported kernel-package deprecated

          clobber_modules
               If set, the preinst shall silently try to move
               /lib/modules/version out of the way if it is the same
               version as the image being installed. Use at your own
               risk.  This variable is unset by default.  nokeep;

     Page 4                       Debian             (printed 5/24/22)

     KERNEL-IMG.CONF(5)       (24 March 2019)       KERNEL-IMG.CONF(5)

               l    l.  Package creator     Status Debian linux source
               package   ignored Ubuntu linux source package   ignored
               kernel-package supported

          warn_reboot
               This variable can be used to turn off the warning given
               when installing a kernel image which is the same ver-
               sion as the currently running version. If the modules
               list is changed, the modules dependencies may have been
               changed, and the modules for the new kernel may not run
               correctly on the running kernel if the kernel ABI has
               changed in the meanwhile. It is a good idea to reboot,
               and this is a note to remind you. If you know what you
               are doing, you can set this variable to no. This vari-
               able is set by default.  nokeep; l    l.  Package
               creator     Status Debian linux source
               package   ignored Ubuntu linux source package   ignored
               kernel-package supported

          relink_build_link
               This option manipulates the build link created by
               recent kernels. If the link is a dangling link, and if
               a the corresponding kernel headers appear to have been
               installed on the system, a new symlink shall be created
               to point to them. The default is to relink the build
               link (YES).  nokeep; l    l.  Package
               creator     Status Debian linux source
               package   ignored Ubuntu linux source package   ignored
               kernel-package supported

          force_build_link
               This option manipulates the build link created by
               recent kernels. If the link is a dangling link, a new
               symlink shall be created to point to kernel headers
               data in /usr/src, whether they have been installed or
               not. The default is unset, we don't create potentially
               dangling symlinks by default.  nokeep; l    l.  Package
               creator     Status Debian linux source
               package   ignored Ubuntu linux source package   ignored
               kernel-package supported

          relink_src_link
               This option manipulates the source link created by
               recent kernels. If the link is a dangling link it is
               deleted at install time. The default is to relink
               (delete) the source link (YES).  nokeep; l    l.  Pack-
               age creator     Status Debian linux source
               package   ignored Ubuntu linux source package   ignored
               kernel-package supported

          silent_modules
               This option has been put in for the people who are

     Page 5                       Debian             (printed 5/24/22)

     KERNEL-IMG.CONF(5)       (24 March 2019)       KERNEL-IMG.CONF(5)

               vastly irritated on being warned about preexisting mod-
               ules directory /lib/modules/$version. That directory
               may belong to an old or defunct kernel image package,
               in which case problems may arise with leftover modules
               in that directory tree, or the directory may legiti-
               mately exist due to a independent modules package being
               installed for this kernel version that has already been
               unpacked.  In this latter case the existence of the
               directory is benign.  If you set this variable, you
               shall no longer be given a chance to abort if a preex-
               isting modules directory /lib/modules/$version is
               detected.  This is unset by default.  nokeep; l    l.
               Package creator     Status Debian linux source
               package   ignored Ubuntu linux source package   ignored
               kernel-package supported

          ignore_depmod_err
               If set, does not prompt to continue after a depmod
               problem in the postinst script. This facilitates auto-
               mated installs, though it may mask a problem with the
               kernel image. A diagnostic is still issued. This is
               unset by default.  nokeep; l    l.  Package
               creator     Status Debian linux source
               package   unsupported since v4.4.1-1~exp1;      previ-
               ously supported Ubuntu linux source
               package   unsupported since v4.15.0-18.19;      previ-
               ously ignored kernel-package supported

     FILES
          The file described here is /etc/kernel-img.conf.
          kernel-common includes example scripts suitable for dropping
          into /etc/kernel/*.d installed in /usr/share/doc/kernel-
          common/examples.

     SEE ALSO
          linux-update-symlinks(8), make-kpkg(1), kernel-pkg.conf(5)

     AUTHOR
          This manual page was written by Manoj Srivastava
          <srivasta@debian.org> and Ben Hutchings <benh@debian.org>
          for the Debian GNU/Linux system.

     Page 6                       Debian             (printed 5/24/22)