@@ -122,7 +122,7 @@ BEGIN {
await_webspace_fetch_byleaf create_webfile
file_link_contents get_timeout
setup_netboot_di setup_netboot_local host_netboot_file
- subst_netboot_template
+ subst_netboot_template setup_netboot_memdisk
ether_prefix
@@ -2629,6 +2629,26 @@ default local
END
}
+sub setup_netboot_memdisk ($$) {
+ my ($ho, $img) = @_;
+ setup_netboot_bootcfg($ho, <<END);
+serial 0 $c{Baud}
+timeout 5
+label overwrite
+ menu label ^Overwrite
+ menu default
+ kernel memdisk
+ initrd $img
+ # NB: according to the memdisk syslinux wikipage [0]
+ # adding "append raw" is required in order to boot on
+ # some boxes, and in fact some hardware will not boot
+ # without it.
+ # [0] http://www.syslinux.org/wiki/index.php?title=MEMDISK#Memory_access_method
+ append raw
+default overwrite
+END
+}
+
# uboot emulates pxelinux, so reuse BIOS stuff
sub setup_netboot_di_uboot ($$$$$;%) { return &setup_netboot_di_bios; }
sub setup_netboot_local_uboot ($) { return &setup_netboot_local_bios; }
The helper allows booting a host from pxelinux using an image compatible with memdisk. Note that this requires having a copy of the memdisk binary (provided as part of pxelinux) in the root of the tftp server. Signed-off-by: Roger Pau Monné <roger.pau@citrix.com> --- Changes since v3: - New in this version (split from install patch). --- Osstest/TestSupport.pm | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-)