From 44169889fee468bf9f248f65bcc766e809f4bea4 Mon Sep 17 00:00:00 2001 From: Michal Sojka Date: Sun, 27 Jun 2021 21:22:29 +0200 Subject: [PATCH] grub2: Don't perform unnecessary config modifications for the linux BOOT_METHOD --- novaboot | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/novaboot b/novaboot index 2e70e79..7fa3816 100755 --- a/novaboot +++ b/novaboot @@ -594,9 +594,11 @@ sub generate_grub2_config($$$$;$$) print $fg " $boot_method ${base}$kbin $kcmd\n"; } else { my @args = split; - # GRUB2 doesn't pass filename in multiboot info so we have to duplicate it here - $_ = join(' ', ($args[0], @args)); - s|\brom://|$rom_prefix|g; # We do not need to translate path for GRUB2 + if ($boot_method eq "multiboot") { + # GRUB2 doesn't pass filename in multiboot info so we have to duplicate it here + $_ = join(' ', ($args[0], @args)); + s|\brom://|$rom_prefix|g; # We do not need to translate path for GRUB2 + } print $fg " $module_load_method $base$_\n"; } } -- 2.39.2