{
    "mode": "man",
    "parameter": "kernel-install",
    "section": "8",
    "url": "https://www.chedong.com/phpMan.php/man/kernel-install/8/json",
    "generated": "2026-06-12T03:02:11Z",
    "synopsis": "kernel-install COMMAND [OPTIONS...] KERNEL-VERSION KERNEL-IMAGE [INITRD-FILE...]",
    "sections": {
        "NAME": {
            "content": "kernel-install - Add and remove kernel and initramfs images to and from /boot\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "kernel-install COMMAND [OPTIONS...] KERNEL-VERSION KERNEL-IMAGE [INITRD-FILE...]\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "kernel-install is used to install and remove kernel and initramfs images to and from the boot\nloader partition, referred to as $BOOT here. It will usually be one of /boot/, /efi/, or\n/boot/efi/, see below.\n\nkernel-install will execute the files located in the directory /usr/lib/kernel/install.d/ and\nthe local administration directory /etc/kernel/install.d/. All files are collectively sorted\nand executed in lexical order, regardless of the directory in which they live. However, files\nwith identical filenames replace each other. Files in /etc/kernel/install.d/ take precedence\nover files with the same name in /usr/lib/kernel/install.d/. This can be used to override a\nsystem-supplied executables with a local file if needed; a symbolic link in\n/etc/kernel/install.d/ with the same name as an executable in /usr/lib/kernel/install.d/,\npointing to /dev/null, disables the executable entirely. Executables must have the extension\n\".install\"; other extensions are ignored.\n\nAn executable should return 0 on success. It may also return 77 to cause the whole operation\nto terminate (executables later in lexical order will be skipped).\n",
            "subsections": []
        },
        "COMMANDS": {
            "content": "The following commands are understood:\n\nadd KERNEL-VERSION KERNEL-IMAGE [INITRD-FILE ...]\nThis command expects a kernel version string and a path to a kernel image file as\narguments.  kernel-install calls the executables from /usr/lib/kernel/install.d/*.install\nand /etc/kernel/install.d/*.install with the following arguments:\n\nadd KERNEL-VERSION $BOOT/MACHINE-ID/KERNEL-VERSION/ KERNEL-IMAGE [INITRD-FILE ...]\n\nThree default plugins execute the following operations in this case:\n\n•   00-entry-directory.install creates the directory $BOOT/MACHINE-ID/KERNEL-VERSION/ if\n$BOOT/MACHINE-ID/ already exists.\n\n•   50-depmod.install runs depmod(8) for the KERNEL-VERSION.\n\n•   90-loaderentry.install copies KERNEL-IMAGE to $BOOT/MACHINE-ID/KERNEL-VERSION/linux.\nIf an INITRD-FILE is provided, it also copies INITRD-FILE to\n$BOOT/MACHINE-ID/KERNELVERSION/INITRD-FILE. It also creates a boot loader entry\naccording to the Boot Loader Specification[1] in\n$BOOT/loader/entries/MACHINE-ID-KERNEL-VERSION.conf. The title of the entry is the\nPRETTYNAME parameter specified in /etc/os-release or /usr/lib/os-release (if the\nformer is missing), or \"Linux KERNEL-VERSION\", if unset.\n\nIf the entry directory $BOOT/MACHINE-ID/KERNEL-VERSION/ does not exist, this plugin\ndoes nothing.\n\nremove KERNEL-VERSION\nThis command expects a kernel version string as single argument. This calls executables\nfrom /usr/lib/kernel/install.d/*.install and /etc/kernel/install.d/*.install with the\nfollowing arguments:\n\nremove KERNEL-VERSION $BOOT/MACHINE-ID/KERNEL-VERSION/\n\nAfterwards, kernel-install removes the directory $BOOT/MACHINE-ID/KERNEL-VERSION/ and its\ncontents.\n\nTwo default plugins execute the following operations in this case:\n\n•   50-depmod.install removes the files generated by depmod for this kernel again.\n\n•   90-loaderentry.install removes the file\n$BOOT/loader/entries/MACHINE-ID-KERNEL-VERSION.conf.\n",
            "subsections": [
                {
                    "name": "THE $BOOT PARTITION",
                    "content": "The partition where the kernels and Boot Loader Specification[1] snippets are located is\ncalled $BOOT.  kernel-install determines the location of this partition by checking /efi/,\n/boot/, and /boot/efi/ in turn. The first location where $BOOT/loader/entries/ or\n$BOOT/$MACHINEID/ exists is used.\n"
                }
            ]
        },
        "OPTIONS": {
            "content": "The following options are understood:\n",
            "subsections": [
                {
                    "name": "-v --verbose",
                    "content": "Output additional information about operations being performed.\n",
                    "flag": "-v",
                    "long": "--verbose"
                },
                {
                    "name": "-h --help",
                    "content": "Print a short help text and exit.\n",
                    "flag": "-h",
                    "long": "--help"
                }
            ]
        },
        "ENVIRONMENT VARIABLES": {
            "content": "If --verbose is used, $KERNELINSTALLVERBOSE=1 will be set for the plugins. They may output\nadditional logs in this case.\n",
            "subsections": []
        },
        "EXIT STATUS": {
            "content": "If every executable returns 0 or 77, 0 is returned, and a non-zero failure code otherwise.\n",
            "subsections": []
        },
        "FILES": {
            "content": "/usr/lib/kernel/install.d/*.install /etc/kernel/install.d/*.install\nDrop-in files which are executed by kernel-install.\n\n/etc/kernel/cmdline /proc/cmdline\nRead by 90-loaderentry.install. The content of the file /etc/kernel/cmdline specifies the\nkernel command line to use. If that file does not exist, /proc/cmdline is used.\n\n/etc/kernel/tries\nRead by 90-loaderentry.install. If this file exists a numeric value is read from it and\nthe naming of the generated entry file is slightly altered to include it as\n$BOOT/loader/entries/MACHINE-ID-KERNEL-VERSION+TRIES.conf. This is useful for boot\nloaders such as systemd-boot(7) which implement boot attempt counting with a counter\nembedded in the entry file name.\n\n/etc/machine-id\nThe content of this file specifies the machine identification MACHINE-ID. If it cannot\nread /etc/machine-id, kernel-install will use \"Linux\" as the machine ID instead.\n\n/etc/os-release /usr/lib/os-release\nThe content of the file specifies the operating system title PRETTYNAME.\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "machine-id(5), os-release(5), depmod(8), systemd-boot(7), Boot Loader Specification[1]\n",
            "subsections": []
        },
        "NOTES": {
            "content": "1. Boot Loader Specification\nhttps://systemd.io/BOOTLOADERSPECIFICATION\n\n\n\nsystemd 249                                                                        KERNEL-INSTALL(8)",
            "subsections": []
        }
    },
    "summary": "kernel-install - Add and remove kernel and initramfs images to and from /boot",
    "flags": [
        {
            "flag": "-v",
            "long": "--verbose",
            "arg": null,
            "description": "Output additional information about operations being performed."
        },
        {
            "flag": "-h",
            "long": "--help",
            "arg": null,
            "description": "Print a short help text and exit."
        }
    ],
    "examples": [],
    "see_also": [
        {
            "name": "machine-id",
            "section": "5",
            "url": "https://www.chedong.com/phpMan.php/man/machine-id/5/json"
        },
        {
            "name": "os-release",
            "section": "5",
            "url": "https://www.chedong.com/phpMan.php/man/os-release/5/json"
        },
        {
            "name": "depmod",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/depmod/8/json"
        },
        {
            "name": "systemd-boot",
            "section": "7",
            "url": "https://www.chedong.com/phpMan.php/man/systemd-boot/7/json"
        }
    ]
}