mirror of
				https://git.proxmox.com/git/systemd
				synced 2025-11-04 11:07:20 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			90 lines
		
	
	
		
			9.9 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			90 lines
		
	
	
		
			9.9 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>kernel-install</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><style>
 | 
						|
    a.headerlink {
 | 
						|
      color: #c60f0f;
 | 
						|
      font-size: 0.8em;
 | 
						|
      padding: 0 4px 0 4px;
 | 
						|
      text-decoration: none;
 | 
						|
      visibility: hidden;
 | 
						|
    }
 | 
						|
 | 
						|
    a.headerlink:hover {
 | 
						|
      background-color: #c60f0f;
 | 
						|
      color: white;
 | 
						|
    }
 | 
						|
 | 
						|
    h1:hover > a.headerlink, h2:hover > a.headerlink, h3:hover > a.headerlink, dt:hover > a.headerlink {
 | 
						|
      visibility: visible;
 | 
						|
    }
 | 
						|
  </style><a href="index.html">Index </a>·
 | 
						|
  <a href="systemd.directives.html">Directives </a>·
 | 
						|
  <a href="../python-systemd/index.html">Python </a>·
 | 
						|
  <a href="../libudev/index.html">libudev </a>·
 | 
						|
  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 219</span><hr><div class="refentry"><a name="kernel-install"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>kernel-install — Add and remove kernel and initramfs images to and from /boot</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">kernel-install</code>   COMMAND   <em class="replaceable"><code>KERNEL-VERSION</code></em>  [<em class="replaceable"><code>KERNEL-IMAGE</code></em>]</p></div></div><div class="refsect1"><a name="idm140539741875232"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>
 | 
						|
      <span class="command"><strong>kernel-install</strong></span> is used to install and remove kernel and
 | 
						|
      initramfs images to and from <code class="filename">/boot</code>.
 | 
						|
    </p><p><span class="command"><strong>kernel-install</strong></span> will execute the files
 | 
						|
    located in the directory <code class="filename">/usr/lib/kernel/install.d/</code>
 | 
						|
    and the local administration directory <code class="filename">/etc/kernel/install.d/</code>.
 | 
						|
    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 <code class="filename">/etc/kernel/install.d/</code> take precedence over files with the same name
 | 
						|
    in <code class="filename">/usr/lib/kernel/install.d/</code>. This can be used to override a system-supplied
 | 
						|
    executables with a local file if needed; a symbolic link in <code class="filename">/etc/kernel/install.d/</code>
 | 
						|
    with the same name as an executable in <code class="filename">/usr/lib/kernel/install.d/</code>,
 | 
						|
    pointing to /dev/null, disables the executable entirely. Executables must have the
 | 
						|
    extension "<code class="literal">.install</code>"; other extensions are ignored.</p></div><div class="refsect1"><a name="idm140539738081232"></a><h2 id="Commands">Commands<a class="headerlink" title="Permalink to this headline" href="#Commands">¶</a></h2><p>The following commands are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="add KERNEL-VERSION KERNEL-IMAGE"><span class="term"><span class="command"><strong>add <em class="replaceable"><code>KERNEL-VERSION</code></em> <em class="replaceable"><code>KERNEL-IMAGE</code></em></strong></span></span><a class="headerlink" title="Permalink to this term" href="#add%20KERNEL-VERSION%20KERNEL-IMAGE">¶</a></dt><dd><p><span class="command"><strong>kernel-install</strong></span> creates the directory
 | 
						|
          <code class="filename">/boot/<em class="replaceable"><code>MACHINE-ID</code></em>/<em class="replaceable"><code>KERNEL-VERSION</code></em>/</code>
 | 
						|
          and calls every executable
 | 
						|
          <code class="filename">/usr/lib/kernel/install.d/*.install</code> and
 | 
						|
          <code class="filename">/etc/kernel/install.d/*.install</code> with
 | 
						|
          the arguments
 | 
						|
          </p><pre class="programlisting">add <em class="replaceable"><code>KERNEL-VERSION</code></em> <code class="filename">/boot/<em class="replaceable"><code>MACHINE-ID</code></em>/<em class="replaceable"><code>KERNEL-VERSION</code></em>/</code></pre><p>
 | 
						|
          </p><p>The kernel-install plugin <code class="filename">50-depmod.install</code> runs depmod for the <em class="replaceable"><code>KERNEL-VERSION</code></em>.</p><p>The kernel-install plugin
 | 
						|
          <code class="filename">90-loaderentry.install</code> copies
 | 
						|
          <em class="replaceable"><code>KERNEL-IMAGE</code></em> to
 | 
						|
          <code class="filename">/boot/<em class="replaceable"><code>MACHINE-ID</code></em>/<em class="replaceable"><code>KERNEL-VERSION</code></em>/linux</code>.
 | 
						|
          It also creates a boot loader entry according to the boot
 | 
						|
          loader specification in
 | 
						|
          <code class="filename">/boot/loader/entries/<em class="replaceable"><code>MACHINE-ID</code></em>-<em class="replaceable"><code>KERNEL-VERSION</code></em>.conf</code>.
 | 
						|
          The title of the entry is the
 | 
						|
          <em class="replaceable"><code>PRETTY_NAME</code></em> parameter specified
 | 
						|
          in <code class="filename">/etc/os-release</code> or
 | 
						|
          <code class="filename">/usr/lib/os-release</code> (if the former is
 | 
						|
          missing), or "Linux
 | 
						|
          <em class="replaceable"><code>KERNEL-VERSION</code></em>", if unset.  If
 | 
						|
          the file <code class="filename">initrd</code> is found next to the
 | 
						|
          <code class="filename">linux</code> file, the initrd will be added to
 | 
						|
          the configuration.</p></dd><dt id="remove KERNEL-VERSION"><span class="term"><span class="command"><strong>remove <em class="replaceable"><code>KERNEL-VERSION</code></em></strong></span></span><a class="headerlink" title="Permalink to this term" href="#remove%20KERNEL-VERSION">¶</a></dt><dd><p>Calls every executable <code class="filename">/usr/lib/kernel/install.d/*.install</code>
 | 
						|
          and <code class="filename">/etc/kernel/install.d/*.install</code> with the arguments
 | 
						|
          </p><pre class="programlisting">remove <em class="replaceable"><code>KERNEL-VERSION</code></em> <code class="filename">/boot/<em class="replaceable"><code>MACHINE-ID</code></em>/<em class="replaceable"><code>KERNEL-VERSION</code></em>/</code></pre><p>
 | 
						|
          </p><p><span class="command"><strong>kernel-install</strong></span> removes the entire directory
 | 
						|
          <code class="filename">/boot/<em class="replaceable"><code>MACHINE-ID</code></em>/<em class="replaceable"><code>KERNEL-VERSION</code></em>/</code> afterwards.</p><p>The kernel-install plugin <code class="filename">90-loaderentry.install</code> removes the file
 | 
						|
          <code class="filename">/boot/loader/entries/<em class="replaceable"><code>MACHINE-ID</code></em>-<em class="replaceable"><code>KERNEL-VERSION</code></em>.conf</code>.</p></dd></dl></div></div><div class="refsect1"><a name="idm140539741945488"></a><h2 id="Exit status">Exit status<a class="headerlink" title="Permalink to this headline" href="#Exit%20status">¶</a></h2><p>If every executable returns with 0, 0 is returned, a non-zero failure code otherwise.</p></div><div class="refsect1"><a name="idm140539741944304"></a><h2 id="Files">Files<a class="headerlink" title="Permalink to this headline" href="#Files">¶</a></h2><div class="variablelist"><dl class="variablelist"><dt id="
 | 
						|
          /usr/lib/kernel/install.d/*.install
 | 
						|
          /etc/kernel/install.d/*.install
 | 
						|
        "><span class="term">
 | 
						|
          <code class="filename">/usr/lib/kernel/install.d/*.install</code>
 | 
						|
          <code class="filename">/etc/kernel/install.d/*.install</code>
 | 
						|
        </span><a class="headerlink" title="Permalink to this term" href="#%0A%20%20%20%20%20%20%20%20%20%20/usr/lib/kernel/install.d/*.install%0A%20%20%20%20%20%20%20%20%20%20/etc/kernel/install.d/*.install%0A%20%20%20%20%20%20%20%20">¶</a></dt><dd><p>Drop-in files which are executed by kernel-install.</p></dd><dt id="
 | 
						|
          /etc/kernel/cmdline
 | 
						|
          /proc/cmdline
 | 
						|
        "><span class="term">
 | 
						|
          <code class="filename">/etc/kernel/cmdline</code>
 | 
						|
          <code class="filename">/proc/cmdline</code>
 | 
						|
        </span><a class="headerlink" title="Permalink to this term" href="#%0A%20%20%20%20%20%20%20%20%20%20/etc/kernel/cmdline%0A%20%20%20%20%20%20%20%20%20%20/proc/cmdline%0A%20%20%20%20%20%20%20%20">¶</a></dt><dd><p>The content of the file <code class="filename">/etc/kernel/cmdline</code> specifies the kernel command line to use.
 | 
						|
            If that file does not exist, <code class="filename">/proc/cmdline</code> is used.</p></dd><dt id="
 | 
						|
          /etc/machine-id
 | 
						|
        "><span class="term">
 | 
						|
          <code class="filename">/etc/machine-id</code>
 | 
						|
        </span><a class="headerlink" title="Permalink to this term" href="#%0A%20%20%20%20%20%20%20%20%20%20/etc/machine-id%0A%20%20%20%20%20%20%20%20">¶</a></dt><dd><p>The content of the file specifies the machine identification <em class="replaceable"><code>MACHINE-ID</code></em>.</p></dd><dt id="
 | 
						|
          /etc/os-release
 | 
						|
          /usr/lib/os-release
 | 
						|
        "><span class="term">
 | 
						|
          <code class="filename">/etc/os-release</code>
 | 
						|
          <code class="filename">/usr/lib/os-release</code>
 | 
						|
        </span><a class="headerlink" title="Permalink to this term" href="#%0A%20%20%20%20%20%20%20%20%20%20/etc/os-release%0A%20%20%20%20%20%20%20%20%20%20/usr/lib/os-release%0A%20%20%20%20%20%20%20%20">¶</a></dt><dd><p>The content of the file specifies the operating system title <em class="replaceable"><code>PRETTY_NAME</code></em>.</p></dd></dl></div></div><div class="refsect1"><a name="idm140539741929840"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
 | 
						|
      <a href="machine-id.html"><span class="citerefentry"><span class="refentrytitle">machine-id</span>(5)</span></a>,
 | 
						|
      <a href="os-release.html"><span class="citerefentry"><span class="refentrytitle">os-release</span>(5)</span></a>,
 | 
						|
      <a class="ulink" href="http://www.freedesktop.org/wiki/Specifications/BootLoaderSpec" target="_top">Boot loader specification</a>
 | 
						|
    </p></div></div></body></html>
 |