diff --git a/assemblers/org.osbuild.qemu b/assemblers/org.osbuild.qemu index 728a6890..ab973c82 100755 --- a/assemblers/org.osbuild.qemu +++ b/assemblers/org.osbuild.qemu @@ -539,7 +539,7 @@ def main(tree, output_dir, options, loop_client): fmt = options["format"] filename = options["filename"] size = options["size"] - bootloader = options.get("bootloader", {"type": "grub2"}) + bootloader = options.get("bootloader", {"type": "none"}) # sfdisk works on sectors of 512 bytes and ignores excess space - be explicit about this if size % 512 != 0: @@ -557,6 +557,11 @@ def main(tree, output_dir, options, loop_client): pt = partition_table_from_options(options) pt.write_to(image) + # For backwards comparability assume that if bootloader is not + # set and partition scheme is dos (MBR) grub2 is being used + if bootloader["type"] == "none" and pt.label == "dos": + bootloader["type"] = "grub2" + # Install the bootloader if bootloader["type"] == "grub2": install_grub2(image, pt, bootloader) diff --git a/samples/f30-qcow2-gpt.json b/samples/f30-qcow2-gpt.json index 92f5c553..89161c78 100644 --- a/samples/f30-qcow2-gpt.json +++ b/samples/f30-qcow2-gpt.json @@ -76,6 +76,7 @@ { "name": "org.osbuild.qemu", "options": { + "bootloader": {"type": "grub2"}, "format": "qcow2", "filename": "base.qcow2", "ptuuid": "29579f67-d390-43e7-bd96-dc8f5461171e",