]> xenbits.xensource.com Git - people/dariof/osstest.git/commitdiff
ts-debian-hvm-install: Do not create EFI partition if EFI not in use
authorIan Jackson <ian.jackson@eu.citrix.com>
Fri, 18 Sep 2015 15:21:45 +0000 (16:21 +0100)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Tue, 22 Sep 2015 15:34:23 +0000 (16:34 +0100)
If we are booting our install ISO using a non-EFI executable, don't
try to provide an EFI for the installed system either.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
v4: Fix regexp to match efi.img (!)
    Rebased, fixed code motion conflict.

ts-debian-hvm-install

index b9f9025d8db5d20ba74c5cd8d009dce3ee1bb244..6646a5ac13ddc70cd888b7e42a9868739afafa8b 100755 (executable)
@@ -49,6 +49,7 @@ our $guesthost= "$gn.guest.osstest";
 our $gho;
 
 our ($kernel, $ramdisk);
+our $bootfile;
 
 our $gsuite;
 
@@ -56,7 +57,7 @@ sub preseed () {
 
     my $preseed_file = preseed_base($gho,$gsuite,'','',());
 
-    $preseed_file .= (<<END);
+    $preseed_file .= (<<END.($bootfile =~ m/\befi\b/ ? <<END : '').<<END);
 d-i netcfg/get_hostname string $gn
 
 d-i partman-auto/disk string /dev/xvda
@@ -64,12 +65,14 @@ d-i partman-auto/method string  regular
 
 d-i partman-auto/expert_recipe string \\
         boot-root :: \\
+END
                 512 50 512 vfat \\
                         \$primary{ } \$bootable{ } \\
                         method{ efi } format{ } \\
                         use_filesystem{ } filesystem{ vfat } \\
                         mountpoint{ /boot/efi } \\
                 . \\
+END
                 5000 50 5000 ext4 \\
                         method{ format } format{ } \\
                         use_filesystem{ } filesystem{ ext4 } \\
@@ -222,7 +225,7 @@ sub prep () {
         my $cmds = iso_copy_content_from_image($gho, $newiso);
         target_cmd_root($ho, $cmds, $isotimeout);
 
-        my $bootfile = 'boot/grub/efi.img';
+        $bootfile = 'boot/grub/efi.img';
         if (!target_file_exists($ho, "$newiso/$bootfile")) {
             $bootfile = "isolinux/isolinux.bin";
             push @isogen_extra, qw(-c isolinux/boot.cat);