Skip to content

Commit

Permalink
pkg: grub: Replace echo command by true command
Browse files Browse the repository at this point in the history
The load_hv_cmd variable present in EVE's GRUB config points to the command
used to load a hypervisor. However, in case of "kvm" and "kubervirt" this
command is not needed and it's just translated to an echo command. However,
this approach will make messages like the following to appear during a KVM
based boot:

/boot/xen.gz console=com1 smt=false clocksource=pit dom0_mem=800M,max:800M
dom0_max_vcpus=1 dom0_vcpus_pin

This can lead to misunderstandings and confusion since a Xen's boot command
line it's being printed on a KVM's system.

This commit replaces echo by true command. The true command can receive any
number of arguments and will always return true without any printing, so
no Xen's boot command line will be printed in "kvm" or "kubevirt" cases.

Signed-off-by: Renê de Souza Pinto <rene@renesp.com.br>
  • Loading branch information
rene authored and shjala committed Jun 15, 2023
1 parent da8e195 commit 8597c5a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pkg/grub/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ RUN eve-alpine-deploy.sh
# list of grub modules that are portable between x86_64 and aarch64
ENV GRUB_MODULES_PORT="part_gpt fat ext2 iso9660 squash4 gzio linux acpi normal cpio crypto disk boot crc64 \
search_disk_uuid search_part_label search_label xzio xfs video gfxterm serial gptprio chain probe reboot regexp smbios \
part_msdos cat echo test configfile loopback"
part_msdos cat echo test configfile loopback true"

FROM grub-build-base AS grub-build-amd64
ENV GRUB_MODULES="multiboot multiboot2 efi_uga efi_gop linuxefi gpt verify gcry_sha256 measurefs"
Expand Down
4 changes: 2 additions & 2 deletions pkg/grub/rootfs.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ function set_riscv64_qemu {
}

function set_kvm_boot {
set_global load_hv_cmd echo
set_global load_hv_cmd true
set_global load_dom0_cmd linux
set_global load_initrd_cmd initrd
set_global dom0_flavor_tweaks "pcie_acs_override=downstream,multifunction"
Expand All @@ -350,7 +350,7 @@ function set_xen_boot {
}

function set_kubevirt_boot {
set_global load_hv_cmd echo
set_global load_hv_cmd true
set_global load_dom0_cmd linux
set_global load_initrd_cmd initrd
set_global dom0_flavor_tweaks "pcie_acs_override=downstream,multifunction"
Expand Down

0 comments on commit 8597c5a

Please sign in to comment.