{"id":3093,"date":"2022-12-20T16:43:28","date_gmt":"2022-12-20T19:43:28","guid":{"rendered":"http:\/\/lode.uno\/linux-man\/index.php\/2022\/12\/20\/kernelinstall-man8\/"},"modified":"2022-12-20T16:43:28","modified_gmt":"2022-12-20T19:43:28","slug":"kernelinstall-man8","status":"publish","type":"post","link":"https:\/\/lode.uno\/linux-man\/2022\/12\/20\/kernelinstall-man8\/","title":{"rendered":"KERNEL&minus;INSTALL (man8)"},"content":{"rendered":"<h1 align=\"center\">KERNEL\u2212INSTALL<\/h1>\n<p> <a href=\"#NAME\">NAME<\/a><br \/> <a href=\"#SYNOPSIS\">SYNOPSIS<\/a><br \/> <a href=\"#DESCRIPTION\">DESCRIPTION<\/a><br \/> <a href=\"#COMMANDS\">COMMANDS<\/a><br \/> <a href=\"#THE $BOOT PARTITION\">THE $BOOT PARTITION<\/a><br \/> <a href=\"#OPTIONS\">OPTIONS<\/a><br \/> <a href=\"#ENVIRONMENT VARIABLES\">ENVIRONMENT VARIABLES<\/a><br \/> <a href=\"#EXIT STATUS\">EXIT STATUS<\/a><br \/> <a href=\"#FILES\">FILES<\/a><br \/> <a href=\"#SEE ALSO\">SEE ALSO<\/a><br \/> <a href=\"#NOTES\">NOTES<\/a> <\/p>\n<hr>\n<h2>NAME <a name=\"NAME\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">kernel-install \u2212 Add and remove kernel and initramfs images to and from \/boot<\/p>\n<h2>SYNOPSIS <a name=\"SYNOPSIS\"><\/a> <\/h2>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"89%\">\n<p style=\"margin-top: 1em\"><b>kernel\u2212install<\/b> COMMAND [OPTIONS&#8230;] <i>KERNEL\u2212VERSION KERNEL\u2212IMAGE<\/i> [<i>INITRD\u2212FILE<\/i>&#8230;]<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<h2>DESCRIPTION <a name=\"DESCRIPTION\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>kernel\u2212install<\/b> is used to install and remove kernel and initramfs images to and from the boot loader partition, referred to as <i>$BOOT<\/i> here. It will usually be one of \/boot\/, \/efi\/, or \/boot\/efi\/, see below.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>kernel\u2212install<\/b> will execute the files located in the directory \/usr\/lib\/kernel\/install.d\/ and the local administration directory \/etc\/kernel\/install.d\/. All files are collectively sorted and executed in lexical order, regardless of the directory in which they live. However, files with identical filenames replace each other. Files in \/etc\/kernel\/install.d\/ take precedence over files with the same name in \/usr\/lib\/kernel\/install.d\/. This can be used to override a system\u2212supplied executables with a local file if needed; a symbolic link in \/etc\/kernel\/install.d\/ with the same name as an executable in \/usr\/lib\/kernel\/install.d\/, pointing to \/dev\/null, disables the executable entirely. Executables must have the extension &#8220;.install&#8221;; other extensions are ignored.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">An executable should return <b>0<\/b> on success. It may also return <b>77<\/b> to cause the whole operation to terminate (executables later in lexical order will be skipped).<\/p>\n<h2>COMMANDS <a name=\"COMMANDS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">The following commands are understood:<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>add<\/b> <i>KERNEL\u2212VERSION KERNEL\u2212IMAGE<\/i> <b>[<\/b><i>INITRD\u2212FILE<\/i> <b>&#8230;]<\/b><\/p>\n<p style=\"margin-left:17%;\">This command expects a kernel version string and a path to a kernel image file as arguments. <b>kernel\u2212install<\/b> calls the executables from \/usr\/lib\/kernel\/install.d\/00-entry-directory.install \/usr\/lib\/kernel\/install.d\/50-depmod.install \/usr\/lib\/kernel\/install.d\/50-dracut.install \/usr\/lib\/kernel\/install.d\/51-dracut-rescue.install \/usr\/lib\/kernel\/install.d\/90-loaderentry.install and \/etc\/kernel\/install.d\/*.install with the following arguments:<\/p>\n<p style=\"margin-left:23%; margin-top: 1em\">add <i>KERNEL\u2212VERSION<\/i> $BOOT\/<i>MACHINE\u2212ID<\/i>\/<i>KERNEL\u2212VERSION<\/i>\/ <i>KERNEL\u2212IMAGE<\/i> [<i>INITRD\u2212FILE<\/i> &#8230;]<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Three default plugins execute the following operations in this case:<\/p>\n<p style=\"margin-left:23%; margin-top: 1em\">\u2022 00\u2212entry\u2212directory.install creates the directory $BOOT\/<i>MACHINE\u2212ID<\/i>\/<i>KERNEL\u2212VERSION<\/i>\/ if $BOOT\/<i>MACHINE\u2212ID<\/i>\/ already exists.<\/p>\n<p style=\"margin-left:23%; margin-top: 1em\">\u2022 50\u2212depmod.install runs <b>depmod<\/b>(8) for the <i>KERNEL\u2212VERSION<\/i>.<\/p>\n<p style=\"margin-left:23%; margin-top: 1em\">\u2022 90\u2212loaderentry.install copies <i>KERNEL\u2212IMAGE<\/i> to $BOOT\/<i>MACHINE\u2212ID<\/i>\/<i>KERNEL\u2212VERSION<\/i>\/linux. If an <i>INITRD\u2212FILE<\/i> is provided, it also copies <i>INITRD\u2212FILE<\/i> to $BOOT\/<i>MACHINE\u2212ID<\/i>\/<i>KERNEL_VERSION<\/i>\/<i>INITRD\u2212FILE<\/i>. It also creates a boot loader entry according to the <b><font color=\"#0000FF\">Boot Loader Specification<\/font><\/b> <small><font color=\"#000000\">[1]<\/font><\/small> <font color=\"#000000\">in $BOOT\/loader\/entries\/<i>MACHINE\u2212ID<\/i>\u2212<i>KERNEL\u2212VERSION<\/i>.conf. The title of the entry is the <i>PRETTY_NAME<\/i> parameter specified in \/etc\/os\u2212release or \/usr\/lib\/os\u2212release (if the former is missing), or &#8220;Linux <i>KERNEL\u2212VERSION<\/i>&#8220;, if unset.<\/font><\/p>\n<p style=\"margin-left:23%; margin-top: 1em\"><font color=\"#000000\">If the entry directory $BOOT\/<i>MACHINE\u2212ID<\/i>\/<i>KERNEL\u2212VERSION<\/i>\/ does not exist, this plugin does nothing.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><b>remove<\/b> <i>KERNEL\u2212VERSION<\/i><\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">This command expects a kernel version string as single argument. This calls executables from \/usr\/lib\/kernel\/install.d\/00-entry-directory.install \/usr\/lib\/kernel\/install.d\/50-depmod.install \/usr\/lib\/kernel\/install.d\/50-dracut.install \/usr\/lib\/kernel\/install.d\/51-dracut-rescue.install \/usr\/lib\/kernel\/install.d\/90-loaderentry.install and \/etc\/kernel\/install.d\/*.install with the following arguments:<\/font><\/p>\n<p style=\"margin-left:23%; margin-top: 1em\"><font color=\"#000000\">remove <i>KERNEL\u2212VERSION<\/i> $BOOT\/<i>MACHINE\u2212ID<\/i>\/<i>KERNEL\u2212VERSION<\/i>\/<\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\">Afterwards, <b>kernel\u2212install<\/b> removes the directory $BOOT\/<i>MACHINE\u2212ID<\/i>\/<i>KERNEL\u2212VERSION<\/i>\/ and its contents.<\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\">Two default plugins execute the following operations in this case:<\/font><\/p>\n<p style=\"margin-left:23%; margin-top: 1em\"><font color=\"#000000\">\u2022 50\u2212depmod.install removes the files generated by <b>depmod<\/b> for this kernel again.<\/font><\/p>\n<p style=\"margin-left:23%; margin-top: 1em\"><font color=\"#000000\">\u2022 90\u2212loaderentry.install removes the file $BOOT\/loader\/entries\/<i>MACHINE\u2212ID<\/i>\u2212<i>KERNEL\u2212VERSION<\/i>.conf.<\/font><\/p>\n<h2>THE $BOOT PARTITION <a name=\"THE $BOOT PARTITION\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">The partition where the kernels and<\/font> <b><font color=\"#0000FF\">Boot Loader Specification<\/font><\/b> <small><font color=\"#000000\">[1]<\/font><\/small> <font color=\"#000000\">snippets are located is called <i>$BOOT<\/i>. <b>kernel\u2212install<\/b> determines the location of this partition by checking \/efi\/, \/boot\/, and \/boot\/efi\/ in turn. The first location where $BOOT\/loader\/entries\/ or $BOOT\/$MACHINE_ID\/ exists is used.<\/font><\/p>\n<h2>OPTIONS <a name=\"OPTIONS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">The following options are understood:<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><b>\u2212v<\/b>, <b>\u2212\u2212verbose<\/b><\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">Output additional information about operations being performed.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><b>\u2212h<\/b>, <b>\u2212\u2212help<\/b><\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">Print a short help text and exit.<\/font><\/p>\n<h2>ENVIRONMENT VARIABLES <a name=\"ENVIRONMENT VARIABLES\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">If <b>\u2212\u2212verbose<\/b> is used, <i>$KERNEL_INSTALL_VERBOSE=1<\/i> will be set for the plugins. They may output additional logs in this case.<\/font><\/p>\n<h2>EXIT STATUS <a name=\"EXIT STATUS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">If every executable returns 0 or 77, 0 is returned, and a non\u2212zero failure code otherwise.<\/font><\/p>\n<h2>FILES <a name=\"FILES\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">\/usr\/lib\/kernel\/install.d\/*.install \/etc\/kernel\/install.d\/*.install<\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">Drop\u2212in files which are executed by kernel\u2212install.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">\/etc\/kernel\/cmdline \/proc\/cmdline<\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">Read by 90\u2212loaderentry.install. The content of the file \/etc\/kernel\/cmdline specifies the kernel command line to use. If that file does not exist, \/proc\/cmdline is used.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">\/etc\/kernel\/tries<\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">Read by 90\u2212loaderentry.install. If this file exists a numeric value is read from it and the naming of the generated entry file is slightly altered to include it as $BOOT\/loader\/entries\/<i>MACHINE\u2212ID<\/i>\u2212<i>KERNEL\u2212VERSION<\/i>+<i>TRIES<\/i>.conf. This is useful for boot loaders such as <b>systemd-boot<\/b>(7) which implement boot attempt counting with a counter embedded in the entry file name.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">\/etc\/machine\u2212id<\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">The content of the file specifies the machine identification <i>MACHINE\u2212ID<\/i>.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">\/etc\/os\u2212release \/usr\/lib\/os\u2212release<\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">The content of the file specifies the operating system title <i>PRETTY_NAME<\/i>.<\/font><\/p>\n<h2>SEE ALSO <a name=\"SEE ALSO\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><b>machine-id<\/b>(5), <b>os-release<\/b>(5), <b>depmod<\/b>(8), <b>systemd-boot<\/b>(7),<\/font> <b><font color=\"#0000FF\">Boot Loader Specification<\/font><\/b> <small><font color=\"#000000\">[1]<\/font><\/small><\/p>\n<h2>NOTES <a name=\"NOTES\"><\/a> <\/h2>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"12%\"><\/td>\n<td width=\"3%\">\n<p style=\"margin-top: 1em\"><font color=\"#000000\">1.<\/font><\/p>\n<\/td>\n<td width=\"2%\"><\/td>\n<td width=\"38%\">\n<p style=\"margin-top: 1em\"><font color=\"#000000\">Boot Loader Specification<\/font><\/p>\n<\/td>\n<td width=\"45%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">https:\/\/systemd.io\/BOOT_LOADER_SPECIFICATION<\/font><\/p>\n<hr>\n","protected":false},"excerpt":{"rendered":"<p>  kernel-install \u2212 Add and remove kernel and initramfs images to and from \/boot <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[5,52,242,4],"class_list":["post-3093","post","type-post","status-publish","format-standard","hentry","category-8-administracion-del-sistema","tag-5","tag-administracion","tag-kernel-install","tag-man8"],"gutentor_comment":0,"_links":{"self":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/3093","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/comments?post=3093"}],"version-history":[{"count":0,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/3093\/revisions"}],"wp:attachment":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/media?parent=3093"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/categories?post=3093"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/tags?post=3093"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}