This dracut module is created for the ansible bare-metal-install role ansible-bambini. It does the following:
- include
python
in the initial ramdisk. By packaging a conda environment. - pause the boot process just before the root filesystem gets mounted(
pre-mount
hook) - depends on the dracut-sshd module.
This combination makes it possible to partition a disk and install an OS on the root filesystem just before it gets mounted.
Clone this repository and copy or link the 94bambini
directory to the /usr/lib/dracut/modules.d/
directory.
(Work In Progress)
The python inside the initial ramdisk is a conda environment. The requirements for this conda environment:
- named:
bambini-python
- packed and stored in `/usr/lib/dracut/modules.d/bambini-python.tar
- conda modules to include:
- blivet
- cryptsetup
- parted
- libblockdev
- libbytesize
- libkmod
- libnvme
- libndctl The conda recipies are stored at conda-recipes/ and hosted at anaconda.org/geertsky
The initramfs image can be built using the following command:
sudo dracut -NM -a "bambini network lvm systemd-resolved" ansible-bambini-initramfs-$(uname -r).img $(uname -r)
The initramfs file together with it's kernel need to be fed to the server by any way possible. For instance: PXE, qemu/kvm Direct kernel boot, customized grub.
kernel argument | description |
---|---|
rd.neednet=1 |
The initial ramdisk execution requires network accessibility |
root=LABEL=root |
The dracut-bambini module labels the root filesystem partition with root . This is required for the boot process to continue. It can be modified after booting is finished. |
enforcing=0 |
selinux should be disabled for the boot to finish. When this is not acceptable, see ansible-dracut issue:#15 |