Skip to content

Geertsky/dracut-bambini

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 

Repository files navigation

Dracut module for bare-metal-install using Ansible

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.

Installing the dracut-bambini module

Clone this repository and copy or link the 94bambini directory to the /usr/lib/dracut/modules.d/ directory.

Building the initramfs

Prerequisites

conda python

(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:

initramfs build command

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) 

Booting the ansible-bambini-initramfs

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.

Required boot arguments

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

Releases

No releases published

Packages

No packages published