[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH OSSTEST v7 09/15] Debian: Handle lack of bootloader support in d-i on ARM.



Debian doesn't currently know what bootloader to install in a Xen
guest on ARM. We install pv-grub-menu above which actually does what
we need, but the installer doesn't treat that as a "bootloader".

Most ARM platforms end up installing a u-boot boot.scr, based on a
platform whitelist. This doesn't seem appropriate for us. Grub is not
available for arm32. For arm64 we will eventually end up with in-guest
UEFI and therefore grub-efi and things will work normally. I'm not
sure what the answer is going to be for arm32.

This patch enables the workaround for Wheezy, Jessie and Sid,
post-Jessie should be enabled as we add them. (Pre-wheezy does not
support running as a Xen guest on ARM so we don't test them at all).

Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
---
v4: Handle sid too
v3: New
---
 Osstest/Debian.pm    | 14 ++++++++++++--
 ts-debian-di-install |  6 ++++--
 2 files changed, 16 insertions(+), 4 deletions(-)

diff --git a/Osstest/Debian.pm b/Osstest/Debian.pm
index 30b1b3a..ee24e4e 100644
--- a/Osstest/Debian.pm
+++ b/Osstest/Debian.pm
@@ -707,8 +707,8 @@ END
     return $preseed;
 }
 
-sub preseed_create_guest ($$;@) {
-    my ($ho, $sfx, %xopts) = @_;
+sub preseed_create_guest ($$$;@) {
+    my ($ho, $arch, $sfx, %xopts) = @_;
 
     my $suite= $xopts{Suite} || $c{DebianSuite};
 
@@ -755,6 +755,16 @@ d-i     grub-installer/bootdev          string /dev/xvda
 
 END
 
+    # Debian doesn't currently know what bootloader to install in a
+    # Xen guest on ARM. We install pv-grub-menu above which actually
+    # does what we need, but the installer doesn't treat that as a
+    # "bootloader".
+    logm("\$arch is $arch, \$suite is $suite");
+    $preseed_file.= (<<END) if $arch =~ /^arm/ && $suite =~ 
/wheezy|jessie|sid/;
+d-i     nobootloader/confirmation_common boolean true
+
+END
+
     $preseed_file .= preseed_hook_cmds();
 
     return create_webfile($ho, "preseed$sfx", $preseed_file);
diff --git a/ts-debian-di-install b/ts-debian-di-install
index 22c1930..da6ab73 100755
--- a/ts-debian-di-install
+++ b/ts-debian-di-install
@@ -158,7 +158,9 @@ END
 
        $method_cfg = setup_netboot($tmpdir, $arch, $suite);
 
-       $ps_url = preseed_create_guest($gho, '', Suite=>$suite, PvMenuLst=>($bl 
eq "pvgrub"));
+       $ps_url = preseed_create_guest($gho, $arch, '',
+                                      Suite=>$suite,
+                                      PvMenuLst=>($bl eq "pvgrub"));
 
        $extra_disk = "";
     }
@@ -170,7 +172,7 @@ END
 
        ($method_cfg,$extra_disk) = setup_netinst($tmpdir, $arch, $cd);
 
-       $ps_url = preseed_create_guest($gho, '', CDROM=>1);
+       $ps_url = preseed_create_guest($gho, $arch, '', CDROM=>1);
     }
     else
     {
-- 
2.1.4


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.