mirror of
https://github.com/kairos-io/immucore.git
synced 2025-09-16 23:20:56 +00:00
This makes immucore run more in parallel rather than block everything else. We just tell sysroot.mount that eventually it will be mounted and to wait for a bit. This allows us to be more flexible where to run and run in parallel in cases like cdrom in which we may do things but we need the sysroot to be mounted already but not from us. Also adds the initramfs stage directly in immucore and merges all the dracut config into one Dont create sysroot, just add a timeout override so it waits for us Dont block on the service, just make sure to finish before initrd.target Fix mounts from cmdline More proper log Store logs under the /run/immucore dir Store rootfs and initramfs logs separated Do not log the full stages in INFO level Run initramfs stage in immucore directly on boot and cd/netboot Drop systemd requirement from dracut module Signed-off-by: Itxaka itxaka.garcia@spectrocloud.com
36 lines
1.1 KiB
Bash
Executable File
36 lines
1.1 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
# called by dracut
|
|
check() {
|
|
return 0
|
|
}
|
|
|
|
# called by dracut
|
|
depends() {
|
|
echo rootfs-block dm fs-lib
|
|
return 0
|
|
}
|
|
|
|
# called by dracut
|
|
installkernel() {
|
|
instmods overlay
|
|
}
|
|
|
|
# called by dracut
|
|
install() {
|
|
declare moddir=${moddir}
|
|
declare systemdutildir=${systemdutildir}
|
|
declare systemdsystemunitdir=${systemdsystemunitdir}
|
|
|
|
# Add missing elemental binary, drop once we get yip lib inside immucore as its only needed to run the stages
|
|
inst_multiple immucore elemental
|
|
# add utils used by elemental or stages
|
|
inst_multiple partprobe sync udevadm parted mkfs.ext2 mkfs.ext3 mkfs.ext4 mkfs.vfat mkfs.fat blkid e2fsck resize2fs mount umount sgdisk rsync
|
|
# missing mkfs.xfs xfs_growfs in image?
|
|
inst_script "${moddir}/generator.sh" "${systemdutildir}/system-generators/immucore-generator"
|
|
inst_simple "${moddir}/immucore.service" "${systemdsystemunitdir}/immucore.service"
|
|
mkdir -p "${initdir}/${systemdsystemunitdir}/initrd.target.requires"
|
|
ln_r "../immucore.service" "${systemdsystemunitdir}/initrd.target.requires/immucore.service"
|
|
|
|
dracut_need_initqueue
|
|
} |