@@ -26,7 +26,48 @@ logger = logging.getLogger('wic')
class BootimgPcbiosPlugin(SourcePlugin):
"""
- Create MBR boot partition and install syslinux on it.
+ Creates boot partition that is legacy BIOS firmare bootable with
+ MBR/MSDOS as partition table format. Plugin will install caller
+ selected bootloader directly to resulting wic image.
+
+ Supported Bootloaders:
+ * syslinux (default)
+ * grub
+
+ ****************** Wic Plugin Depends/Vars ******************
+ WKS_FILE_DEPENDS = "grub-native grub"
+ WKS_FILE_DEPENDS = "syslinux-native syslinux"
+
+ # Optional variables
+ # GRUB_MKIMAGE_FORMAT_PC - Used to define target platform.
+ # GRUB_PREFIX_PATH - Used to define which directory
+ # grub config and modules are going
+ # to reside in.
+ GRUB_PREFIX_PATH = '/boot/grub2' # Default: /boot/grub
+ GRUB_MKIMAGE_FORMAT_PC = 'i386-pc' # Default: i386-pc
+
+ WICVARS:append = "\
+ GRUB_PREFIX_PATH \
+ GRUB_MKIMAGE_FORMAT_PC \
+ "
+ ****************** Wic Plugin Depends/Vars ******************
+
+
+ **************** Example kickstart Legacy Bios Grub Boot ****************
+ part boot --label bios_boot --fstype ext4 --offset 1024 --fixed-size 78M
+ --source bootimg_pcbios --sourceparams="loader-bios=grub" --active
+
+ part roots --label rootfs --fstype ext4 --source rootfs --use-uuid
+ bootloader --ptable msdos --source bootimg_pcbios
+ **************** Example kickstart Legacy Bios Grub Boot ****************
+
+
+ *************** Example kickstart Legacy Bios Syslinux Boot ****************
+ part /boot --source bootimg_pcbios --sourceparams="loader-bios=syslinux"
+ --ondisk sda --label boot --fstype vfat --align 1024 --active
+
+ part roots --label rootfs --fstype ext4 --source rootfs --use-uuid
+ bootloader --ptable msdos --source bootimg_pcbios
"""
name = 'bootimg_pcbios'
Adds comments underneath class declaration defining plugin usage and potential optional variables to set. Signed-off-by: Vincent Davis Jr <vince@underview.tech> --- .../lib/wic/plugins/source/bootimg_pcbios.py | 43 ++++++++++++++++++- 1 file changed, 42 insertions(+), 1 deletion(-)