Creates initial ramdisk images for preloading modules
-h, --help Display all options
If a [LIST] has multiple arguments, then you have to put these in quotes.
For example:
# dracut --add-drivers "module1 module2" ...
> this is pull everything in.
I'm not sure about this, I could be wrong. There *is* an option which does
pull in most/all modules:
-H, --hostonly Host-Only mode: Install only what is needed for booting the local host instead of a generic host.
-N, --no-hostonly Disables Host-Only mode
--hostonly-mode <mode> Specify the hostonly mode to use. <mode> could be one of "sloppy" or "strict". "sloppy" mode is used by default. In "sloppy" hostonly mode, extra drivers and modules will be installed, so minor hardware change won't make the image unbootable (eg. changed keyboard), and the image is still portable among similar hosts. With "strict" mode enabled, anything not necessary for booting the local host in its current state will not be included, and modules may do some extra job to save more space. Minor change of hardware or environment could make the image unbootable. DO NOT use "strict" mode unless you know what you are doing.
Depending on the discussion I've raised on whether the MAAS
produced Centos8 initramfs should closer match what the Ubuntu
initrd has (it's built for booting on hardware) the use
--no-hostonly should produce a larger, more complete initramfs
which would likely include storage modules like NVME.)
On a centos8 vm with virtio disks (no nvme), I created initramfs
3 ways:
The last test that'd be interesting is running dracut --hostonly
mode while booted into Ubuntu but chrooted into centos8
filesystem (which recreates what
curtin does/could do).
> > $dracut --regenerate-all --force
>
> This is not "leverage the scripts in CentOS to pull in
> appropriate drivers";
None of the dracut versions I've found on Centos8 include the
--regenerate-all flag ... what version of dracut is this?
[root@c8-vm ~]# dracut --regenrate-all /tmp/initrd2.img `uname -r`
getopt: unrecognized option '--regenrate-all'
Usage: /usr/bin/dracut [OPTION]... [<initramfs> [<kernel-version>]]
Version: 049-70. git20200228. el8
Creates initial ramdisk images for preloading modules
-h, --help Display all options
If a [LIST] has multiple arguments, then you have to put these in quotes.
For example:
# dracut --add-drivers "module1 module2" ...
> this is pull everything in.
I'm not sure about this, I could be wrong. There *is* an option which does
pull in most/all modules:
-H, --hostonly Host-Only mode: Install only what is needed for
booting the local host instead of a generic host.
Specify the hostonly mode to use. <mode> could be
one of "sloppy" or "strict". "sloppy" mode is used
by default.
In "sloppy" hostonly mode, extra drivers and modules
will be installed, so minor hardware change won't make
the image unbootable (eg. changed keyboard), and the
image is still portable among similar hosts.
With "strict" mode enabled, anything not necessary
for booting the local host in its current state will
not be included, and modules may do some extra job
to save more space. Minor change of hardware or
environment could make the image unbootable.
DO NOT use "strict" mode unless you know what you
are doing.
-N, --no-hostonly Disables Host-Only mode
--hostonly-mode <mode>
Depending on the discussion I've raised on whether the MAAS
produced Centos8 initramfs should closer match what the Ubuntu
initrd has (it's built for booting on hardware) the use
--no-hostonly should produce a larger, more complete initramfs
which would likely include storage modules like NVME.)
On a centos8 vm with virtio disks (no nvme), I created initramfs
3 ways:
--hostonly --hostonly- mode=strict mode=sloppy
--hostonly --hostonly-
--no-hostonly
[root@c8-vm ~]# ls -ahl /tmp/initrd* host-sloppy. img host-strict. img nohost. img
-rw------- 1 root root 17M Feb 17 19:24 /tmp/initrd-
-rw------- 1 root root 17M Feb 17 19:23 /tmp/initrd-
-rw------- 1 root root 28M Feb 17 19:22 /tmp/initrd-
On this setup, there's no practical difference between
strict/sloppy; and neither pull in the NVME module as it's not in
use. But the nohots only does
root@c8-vm ~]# lsinitrd /tmp/initrd- nohost. img | grep nvme | awk '{print $9}' modules/ 4.18.0- 193.19. 1.el8_2. centos. plus.x86_ 64/kernel/ drivers/ nvme modules/ 4.18.0- 193.19. 1.el8_2. centos. plus.x86_ 64/kernel/ drivers/ nvme/host modules/ 4.18.0- 193.19. 1.el8_2. centos. plus.x86_ 64/kernel/ drivers/ nvme/host/ nvme-core. ko.xz modules/ 4.18.0- 193.19. 1.el8_2. centos. plus.x86_ 64/kernel/ drivers/ nvme/host/ nvme-fabrics. ko.xz modules/ 4.18.0- 193.19. 1.el8_2. centos. plus.x86_ 64/kernel/ drivers/ nvme/host/ nvme-fc. ko.xz modules/ 4.18.0- 193.19. 1.el8_2. centos. plus.x86_ 64/kernel/ drivers/ nvme/host/ nvme-rdma. ko.xz modules/ 4.18.0- 193.19. 1.el8_2. centos. plus.x86_ 64/kernel/ drivers/ nvme/host/ nvme-tcp. ko.xz modules/ 4.18.0- 193.19. 1.el8_2. centos. plus.x86_ 64/kernel/ drivers/ nvme/host/ nvme.ko. xz modules/ 4.18.0- 193.19. 1.el8_2. centos. plus.x86_ 64/kernel/ drivers/ nvme/target modules/ 4.18.0- 193.19. 1.el8_2. centos. plus.x86_ 64/kernel/ drivers/ nvme/target/ nvme-loop. ko.xz modules/ 4.18.0- 193.19. 1.el8_2. centos. plus.x86_ 64/kernel/ drivers/ nvme/target/ nvmet-fc. ko.xz modules/ 4.18.0- 193.19. 1.el8_2. centos. plus.x86_ 64/kernel/ drivers/ nvme/target/ nvmet.ko. xz
usr/lib/
usr/lib/
usr/lib/
usr/lib/
usr/lib/
usr/lib/
usr/lib/
usr/lib/
usr/lib/
usr/lib/
usr/lib/
usr/lib/
The last test that'd be interesting is running dracut --hostonly
mode while booted into Ubuntu but chrooted into centos8
filesystem (which recreates what
curtin does/could do).