Skip to content

Commit

Permalink
✨ Fix building with no elemental
Browse files Browse the repository at this point in the history
Signed-off-by: Itxaka <[email protected]>
  • Loading branch information
Itxaka committed May 17, 2023
1 parent c2c326a commit 8a0d506
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -334,13 +334,12 @@ base-image:
RUN --no-cache kernel=$(ls /lib/modules | head -n1) && dracut -f "/boot/initrd-${kernel}" "${kernel}" && ln -sf "initrd-${kernel}" /boot/initrd
END


# Set /boot/vmlinuz pointing to our kernel so kairos-agent can use it
# https://github.com/kairos-io/kairos-agent/blob/0288fb111bc568a1bfca59cb09f39302220475b6/pkg/elemental/elemental.go#L548
IF [ "$FLAVOR" = "fedora" ] || [ "$FLAVOR" = "rockylinux" ]
# https://github.com/kairos-io/elemental-cli/blob/23ca64435fedb9f521c95e798d2c98d2714c53bd/pkg/elemental/elemental.go#L553
RUN rm -rf /boot/initramfs-*
END

# Set /boot/vmlinuz pointing to our kernel so elemental-cli can use it
# https://github.com/kairos-io/elemental-cli/blob/23ca64435fedb9f521c95e798d2c98d2714c53bd/pkg/elemental/elemental.go#L553
IF [ ! -e "/boot/vmlinuz" ]
# If it's an ARM flavor, we want a symlink here from zImage/Image
# Check that its not a symlink already or grub will fail!
Expand Down
2 changes: 1 addition & 1 deletion scripts/build_vm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ SSH_USER="${SSH_USER:-kairos}"
SSHPASS="${SSH_PASS:-kairos}"
export SSHPASS
HD_SIZE="${HD_SIZE:-50000}"
INSTALL_COMMAND="${INSTALL_COMMAND:-sudo /bin/sh -c 'elemental install /dev/sda && sync'}"
INSTALL_COMMAND="${INSTALL_COMMAND:-sudo /bin/sh -c 'kairos-agent install /dev/sda && sync'}"

HAS_SSHPASS="$(type "sshpass" &> /dev/null && echo true || echo false)"
HAS_VBOX="$(type "VBoxManage" &> /dev/null && echo true || echo false)"
Expand Down

0 comments on commit 8a0d506

Please sign in to comment.