Commit Graph

33 Commits

Author SHA1 Message Date
Itxaka
0180749d82
Fail if dracut cant install required binaries (#382) 2024-10-01 14:45:22 +02:00
Dimitris Karakasilis
6b07d39073
Add awk (#157)
* Add awk and gawk in the initrafms

to allow growpart to work. Also include libraries which dracut fails to
auto-detect

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>

* Bump yip

to get this fix: https://github.com/mudler/yip/pull/110

as part of this: https://github.com/kairos-io/kairos/issues/1831

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>

* Fix lint errors

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>

---------

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
2023-09-25 10:32:45 +03:00
Dimitris Karakasilis
7fe9afa409
Add sfdisk to initramfs (#153)
Part of: https://github.com/kairos-io/kairos/issues/1831

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
2023-09-18 16:50:35 +03:00
Itxaka
e7c114c6b7
Bump yip to latest (#151) 2023-09-13 10:32:27 +02:00
Dimitris Karakasilis
13b06d9e35
1448 use yip (#135)
Co-authored-by: Mauro Morales <mauro.morales@spectrocloud.com>
Co-authored-by: Itxaka <itxaka.garcia@spectrocloud.com>
2023-07-04 14:52:26 +02:00
Itxaka
553a768e5b Install kairos-agent into the initramfs
Signed-off-by: Itxaka <itxaka.garcia@spectrocloud.com>
2023-05-24 16:54:19 +02:00
Itxaka
bc3614a154
drop kcrypt binary from dracut 2023-05-19 11:07:27 +02:00
Itxaka
d644fb0af9
Run kcrypt unlock via immucore (#118) 2023-05-04 18:58:26 +02:00
Itxaka
f1c3aad0ee
🌱 activate LVM volumes at the start (#113) 2023-04-19 16:23:51 +02:00
Itxaka
af632832a3
🌱 Add kcrypt binary to initramfs (#108)
So we can run kcrypt as part of the stages inside the initramfs
2023-03-30 20:02:52 +02:00
Itxaka
8832ec6981
Run yip directly for stages (#82) 2023-03-09 08:58:07 +01:00
Itxaka
aa5939da89
Rework workflow (#77)
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
2023-03-08 11:45:11 +01:00
Itxaka
bf34119ece
Run command directly without subcommand (#59)
If immucore is run we should just execute our normal dag stuff directly
instead of having a subcommand.

Keep the version subcommand and dry-flag

Signed-off-by: Itxaka <itxaka.garcia@spectrocloud.com>
2023-02-20 11:14:26 +01:00
Itxaka
dac147da2d Avoid sysroot.mount starting before immucore
Make it explicit that we run before sysroot.mount, otherwise it may be
launched in parallel and fails as immucore hasnt mount the sysroot
already

Signed-off-by: Itxaka <itxaka.garcia@spectrocloud.com>
2023-02-16 11:16:43 +01:00
Itxaka
ad014e9f22
Full rework (#41)
* Full rework

 - Extract steps to a different file
 - Simplify dag for easy understanding
 - Load dag based on our boot process
 - Simplify steps to not depend on useless stuff
 - Better logging

Signed-off-by: Itxaka <itxaka.garcia@spectrocloud.com>

* Move sentinel file to the dag

Signed-off-by: Itxaka <itxaka.garcia@spectrocloud.com>

* Adapt tests

Signed-off-by: Itxaka <itxaka.garcia@spectrocloud.com>

---------

Signed-off-by: Itxaka <itxaka.garcia@spectrocloud.com>
2023-02-15 22:30:08 +01:00
Itxaka
076bba95dc Set the sentinel file from immucore directly
Also add a missing livecd sentinel file

Signed-off-by: Itxaka <itxaka.garcia@spectrocloud.com>
2023-02-13 21:42:45 +01:00
Itxaka
56632ca277
Add extra files needed for dracut (#36)
* Add extra files needed for dracut

If we are dropping cos-immutable-rootfs then we have to include the
missing files that the package already added.

For example, the several dracut configs of modules for the initramfs
stage, or the general config for the dracut file.

We also need to install and link the initramfs elemental stage service
as that its no longer provided by the cos-immutable-rootfs package and
not integrated into immucore yet

Signed-off-by: Itxaka <itxaka.garcia@spectrocloud.com>

* Minor improvements

Signed-off-by: Itxaka <itxaka.garcia@spectrocloud.com>

---------

Signed-off-by: Itxaka <itxaka.garcia@spectrocloud.com>
2023-02-13 14:34:51 +01:00
Itxaka
d0816bb7e3 Fix tmpfs fstab entry
Signed-off-by: Itxaka <itxaka@spectrocloud.com>
2023-02-09 10:34:43 +01:00
Itxaka
23b4b8f69f Set sentinel file during generator
Some cloud init scripts may need it ASAP

Signed-off-by: Itxaka <itxaka@spectrocloud.com>
2023-02-08 18:24:02 +01:00
Itxaka
3f4b782fe9 Add missing module rsync to initramfs
Signed-off-by: Itxaka <itxaka@spectrocloud.com>
2023-02-08 15:59:04 +01:00
Itxaka
9dcf453764 Add a note to the generator sysroot.mount
Signed-off-by: Itxaka <itxaka@spectrocloud.com>
2023-02-07 21:58:53 +01:00
Itxaka
b62a1f2e99 fix deps of rootfs stage, not working modules, symlink
Signed-off-by: Itxaka <itxaka@spectrocloud.com>
2023-02-07 21:05:30 +01:00
Itxaka
63679b6df1 Add missing modules and fix rootfs stage
Signed-off-by: Itxaka <itxaka@spectrocloud.com>
2023-02-07 20:16:02 +01:00
Itxaka
717851b0b2 +x generator.sh
Signed-off-by: Itxaka <itxaka@spectrocloud.com>
2023-02-07 16:48:34 +01:00
Itxaka
14e0faacee Fix dracut service install
Signed-off-by: Itxaka <itxaka@spectrocloud.com>
2023-02-06 21:58:59 +01:00
Itxaka
3afcffe42b
Merge branch 'master' into changes_v4 2023-02-06 18:16:00 +01:00
mudler
74a433bb53 Hook the dracut service in the correct flow 2023-02-06 18:14:18 +01:00
Itxaka
e8750e527b Service files fixes
Signed-off-by: Itxaka <itxaka@spectrocloud.com>
2023-02-06 18:10:48 +01:00
Itxaka
7d539b63f4 more
more logging
run as dry-run
print version
remove nouser opt

Signed-off-by: Itxaka <itxaka@spectrocloud.com>
2023-02-06 17:24:50 +01:00
Itxaka
67fdfa8df5 Allow removing the cos-immutable-rootfs on dracut build
For easy debugging
Also fixes missing stuff on dracut build to be able to still run the
cos-setup-rootfs/initramfs services and adds the missing elemental
binary to the initramfs.
As we remove the cos-immutable-rootfs module for dracut then both the
services and binary doesnt get included.

Signed-off-by: Itxaka <itxaka@spectrocloud.com>
2023-02-06 11:29:28 +01:00
Itxaka
b33fccfbd3 drop unused var in dracut
Signed-off-by: Itxaka <itxaka@spectrocloud.com>
2023-02-04 11:18:49 +01:00
Itxaka
8973979ceb Mark dracut modules executable
otherwise they refuse to run during initramfs :)

Signed-off-by: Itxaka <itxaka@spectrocloud.com>
2023-02-04 09:29:57 +01:00
mudler
80cb803940 Add dracut/Earthfile skel 2023-02-01 22:34:07 +01:00