KW-DEPLOY(1)
π kw-deploy β Deploy kernel π
okay bestie, welcome to kw-deploy(1), the part of the kw family where stuff actually gets installed on machines. it's giving "last step of the kernel pipeline" energy and honestly? iconic.
β¨ SYNOPSIS β¨
kw (d | deploy) [--remote <remote>:<port> | --local]
[--setup] [-r | --reboot] [--no-reboot] [-m | --modules] [-s |
--ls-line] [-l | --list] [-a | --list-all] [(-u | --uninstall)
[<kernel-name>[,...]]] [-f --force] [--alert=(s | v | (sv | vs) |
n)] [-p | --create-package] [(-F | --from-package)
<kw-package-path>]
like, look at all those flags. main character behavior fr fr. π«Ά
πΈ DESCRIPTION πΈ
Sooo if you're chillin' inside a kernel directory, this command will try to install the current kernel version in your target machine β remote, host, or VM, pick your fighter. π
If you wanna install a kernel version on a remote machine, here's the whole glow-up sequence that runs:
- Prepare a local directory with all the required files;
- Send all the files to the target machine; and
- Execute the operations that will update the target machine.
You can specify the deploy target right from the command line with --remote <remote>:<port> (e.g. --remote 172.16.254.1:22). But ngl, if you're deploying to the same remote over and over, you're gonna want the kw remote feature β it saves the SSH info in a config file that kw reads. like:
kw remote --add origin root@172.16.254.1
want the deets? check kw remote --help. π¦
Now, if you wanna install a new kernel version on your own host machine, use --local β and yeah, you're gonna need your root password, no way around it bestie.
Another super typical thing when you're deploying a fresh kernel to a test machine is rebooting after the update. You can slap --reboot on a command to explicitly make kw reboot the machine afterwards, or you can make it always happen by tweaking the reboot_after_deploy flag in deploy.config like this:
kw config deploy.reboot_after_deploy yes
This can be used in conjunction with the :ref:build<build-doc>`` command by invoking kw bd.
System Message: ERROR/3 (<stdin>:, line 52) Unknown interpreted text role "ref".
(yeah that's just sitting there in the original. it's not me, it's the docs. π)
π OPTIONS π
--remote <remote>:<port>β Deploy the Kernel image and modules to a machine in the network.--localβ Deploy the Kernel image and modules in the host machine, you will need root access.kw deploy --localshould not be executed withsudoor root.-r,--rebootβ Reboot machine after deploy.--no-rebootβ Do not reboot machine after deploy.--setupβ This command runs a basic setup in the target machine, including installing packages and preparing the distro for the deploy.-m,--modulesβ Only install/update modules.-l,--listβ List available kernels in a single column the target.-a,--list-allβ List all available kernels, including the ones not installed by kw.-s,--ls-lineβ List available kernels separated by comma.-u (<kernel-name> | regex:<pattern>)[,...],--uninstall [(<kernel-name> | regex:<pattern>)[,...]]β Remove a single kernel or multiple kernels; for removing multiple kernels it is necessary to separate them with comma. A regex pattern can also be passed as input, prefixed with'regex:'. If no kernel name is provided, remove the first kernel managed by kw it encounters.-f,--forceβ Remove kernels even if they were not installed by kw (only valid with--uninstallor-u). Trying to remove a kernel not directly managed by kw can lead to system failures, and it is not recommended; only use it if you are sure about what you are doing.-p,--create-packageβ It is possible to create a kw package that can be shared with other users and deployed with kw. This option instructs kw to just generate the package without deploying it; notice that the package will be available in the current folder.-F,--from-packageβ You can use this option to deploy a custom kernel from kw package.--alert=(s | v | (sv | vs) | n)β
Defines the alert behaviour upon the command completion.
senables sound notification.venables visual notification.svorvsenables both.n(or any other option) disables notifications (this is the default).
Note: Only run commands related to VM after you turn it off. Under the hood, it executes the mount operation, followed bymake modules_installwith a specific target, and finallyumountsthe QEMU image.
π EXAMPLES π
For these examples, we assume that the relevant fields in your configuration files (located by default in .kw/) have already been setup. We recommend the use of kw config for managing your local and global configurations.
First, if you are working in a specific kernel module, and if you want to install your recent changes in your local machine you can use:
cd <kernel-path>
kw d --local --modules
For building and installing a new module version based on the current kernel version, you can use:
cd <kernel-path>
kw bd
Now, let's say that you set up your configuration file to deploy your new kernel to a machine reachable via ssh. You can run the following command in order to prepare your target machine to receive your new kernel via kw d:
kw deploy --setup
Alternatively, you can just run kw d directly; the standard behavior will automatically run the setup operation in your first deploy. slay. β¨
Suppose that you want to share a specific kernel with someone else for validation; you can generate a kw package with:
kw deploy --create-package
The above command will create a *.kw.tar package file that can be shared with any other kw user. If you want to install a custom kernel from this package, you can use:
kw deploy --from-package 5.19.0-THIS-IS-AN-EXAMPLE+.kw.tar
Below are examples of how to use kw deploy --uninstall:
- Full kernel name argument
kw deploy --uninstall 'kernel1'
- Regular expression argument
kw deploy --uninstall 'regex:kernel.*'
- Comma-separated list of full kernel names and regular expressions
kw deploy --uninstall 'regex:kernel[1-3],kernel4,regex:kernel[5-6]'
- Removes the first kernel managed by kw:
kw deploy --uninstall
and that's the whole page bestie, no cap, every single flag accounted for. π this was kw-deploy β Deploy kernel() β from the kw-deploy - Deploy kernel() manual, and yeah, the header and footer are literally the same string, which is lowkey a vibe. anyway, happy deploying, go be the main character of your kernel tree. πππ¦β¨
π¦ where this page comes from
- ubuntu stonking: kworkflow 1:0.10-3 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms