From a06e50e263d96e6759d6b8052f89bc06a99056ae Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 17 Oct 2017 16:02:50 +0100 Subject: [PATCH] builder: templates: For RHEL, CentOS >= 7 and all Fedora, default to GPT. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The immediate issue is with Fedora/ppc64 and /ppc64le which currently use extended partitions, breaking the virt-builder ‘--size’ parameter, eg: $ virt-builder --arch ppc64le fedora-26 --size 20G ... [ 21.6] Resizing (using virt-resize) to expand the disk to 20.0G virt-resize: error: /dev/sda5: partition not found in the source disk image (this error came from '--expand' option on the command line). Try running this command: virt-filesystems --partitions --long -a /var/tmp/vbf67b8c.img However more generally MBR is broken and should die. GPT is supported by all modern virtual bootloaders, so just default to it. Notes: * This is different from mandating a UEFI bootloader. * I am not planning to rebuild any existing images except the F26 ppc64 & ppc64le ones. --- builder/templates/make-template.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builder/templates/make-template.ml b/builder/templates/make-template.ml index c8f87d76a..4193edf73 100755 --- a/builder/templates/make-template.ml +++ b/builder/templates/make-template.ml @@ -481,7 +481,7 @@ part / --fstype=%s --size=1024 --grow --asprimary | CentOS _ | RHEL _ | Fedora _ -> bpf "\ zerombr -clearpart --all --initlabel +clearpart --all --initlabel --disklabel=gpt autopart --type=plain "; | _ -> assert false (* cannot happen, see caller *)