We were basically overwriting the file if it existed which is bad.
Now it will read the file if it exists and ingest the existing ones,
then in will override witht he given vars if they match, warn the user
and then store the full processed vars.
This means it will never overwrite any vars again
Signed-off-by: Itxaka <itxaka@kairos.io>
We should not default to use the underlying OS files and binaries for
grub installs as we may be on a takeover scenario in which the
underlying OS does not provide the needed files.
This moves the grub binary and files to be provided by the source rootfs
and moves the grubOptions hook to use the go libraries directly instead
of shelling out to another binary
Signed-off-by: Itxaka <itxaka@kairos.io>
Usually we create the system dirs in images by default, but that means
that we cannot reuse the DeployImage for deploying random non-system
images.
This fixes it by adding an extra param to create the dir structure in
the created image
Signed-off-by: Itxaka <itxaka@kairos.io>