Skip to content

Commit acc714d

Browse files
committed
config/kernel: describe alternative initramfs generators
1 parent 50e3bf4 commit acc714d

1 file changed

Lines changed: 36 additions & 0 deletions

File tree

src/config/kernel.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,42 @@ to add `linux` and `linux-headers` to an `ignorepkg` entry in
4848
[xbps.d(5)](https://man.voidlinux.org/xbps.d.5), since base packages can depend
4949
on them.
5050

51+
## Changing the default initramfs generator
52+
53+
By default, Void Linux uses [dracut](https://man.voidlinux.org/dracut.8) to
54+
prepare initramfs images for installed kernels. Alternatives such as
55+
[mkinitcpio](https://man.voidlinux.org/mkinitcpio.8) are available. Each
56+
initramfs generator registers an [XBPS
57+
alternative](https://man.voidlinux.org/xbps-alternatives.1) in the `initramfs`
58+
group to link its [kernel hooks](#kernel-hooks) to be used when creating or
59+
removing initramfs images for a given kernel.
60+
61+
To replace dracut with, *e.g.*, mkinitcpio, install the `mkinitcpio` package;
62+
confirm that `mkinitcpio` appears in the list of available alternatives by
63+
running
64+
65+
```
66+
$ xbps-alternatives -l -g initramfs
67+
```
68+
69+
Issue the command
70+
71+
```
72+
# xbps-alternatives -s mkinitcpio
73+
```
74+
75+
to replace the dracut kernel hooks with those provided by mkinitcpio. With
76+
subsequent kernel updates (or updates to DKMS packages that trigger initramfs
77+
regeneration), mkinitcpio will be used instead of dracut to prepare initramfs
78+
images. To force images to regenerate, reconfigure your kernel packages by
79+
invoking
80+
81+
```
82+
# xbps-reconfigure -f linux<x>.<y>
83+
```
84+
85+
for each `linux<x>.<y>` package that is currently installed.
86+
5187
## cmdline
5288

5389
The kernel, the initial RAM disk (initrd) and some system programs can be

0 commit comments

Comments
 (0)