Some hosts require "append raw" [0] when booting with memdisk, while
others don't. This is based on the hardware/BIOS, and needs to be set
on a per-host basis.
In order to do this, add a new "MemdiskAppend" host property and make
use of it in the setup_netboot_memdisk helper.
[0] http://www.syslinux.org/wiki/index.php?title=MEMDISK#Memory_access_method
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
Changes since v1:
- Explicitly use NONE for no options set (instead of an empty string,
which is the default).
- Allow to manually pass append parameters.
END
}
-sub setup_netboot_memdisk ($$) {
- my ($ho, $img) = @_;
+sub setup_netboot_memdisk ($$;$) {
+ my ($ho, $img, $append) = @_;
+
+ $append //= get_host_property($ho, "MemdiskAppend", "NONE");
+ $append = $append eq "NONE" ? "" : "append $append";
setup_netboot_bootcfg($ho, <<END);
serial 0 $c{Baud}
timeout 5
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
+ $append
default overwrite
END
}