def _getParser(self):
op = F8_Bootloader._getParser(self)
op.add_option("--menus", dest="menus")
- op.add_option("--ptable", dest="ptable", type="string")
+ op.add_option("--ptable", dest="ptable", choices=("msdos", "gpt"),
+ default="msdos")
return op
kernel = "/bzImage"
- if cr.ptable_format in ('msdos', 'gpt'):
- rootstr = cr.rootdev
- else:
- raise ImageError("Unsupported partition table format found")
-
grubefi_conf += "linux %s root=%s rootwait %s\n" \
- % (kernel, rootstr, options)
+ % (kernel, cr.rootdev, options)
grubefi_conf += "}\n"
msger.debug("Writing grubefi config %s/hdd/boot/EFI/BOOT/grub.cfg" \
kernel = "/bzImage"
- if cr.ptable_format in ('msdos', 'gpt'):
- rootstr = cr.rootdev
- else:
- raise ImageError("Unsupported partition table format found")
-
boot_conf = ""
boot_conf += "title boot\n"
boot_conf += "linux %s\n" % kernel
- boot_conf += "options LABEL=Boot root=%s %s\n" \
- % (rootstr, options)
+ boot_conf += "options LABEL=Boot root=%s %s\n" % (cr.rootdev, options)
msger.debug("Writing gummiboot config %s/hdd/boot/loader/entries/boot.conf" \
% cr_workdir)
kernel = "/vmlinuz"
syslinux_conf += "KERNEL " + kernel + "\n"
- if cr.ptable_format in ('msdos', 'gpt'):
- rootstr = cr.rootdev
- else:
- raise ImageError("Unsupported partition table format found")
-
- syslinux_conf += "APPEND label=boot root=%s %s\n" % (rootstr, options)
+ syslinux_conf += "APPEND label=boot root=%s %s\n" % \
+ (cr.rootdev, options)
msger.debug("Writing syslinux config %s/hdd/boot/syslinux.cfg" \
% cr_workdir)
syslinux_conf += "LABEL linux\n"
syslinux_conf += " KERNEL /boot/bzImage\n"
- if image_creator.ptable_format in ('msdos', 'gpt'):
- rootstr = image_creator.rootdev
- else:
- raise ImageError("Unsupported partition table format found")
-
- syslinux_conf += " APPEND label=boot root=%s %s\n" % (rootstr, options)
+ syslinux_conf += " APPEND label=boot root=%s %s\n" % \
+ (image_creator.rootdev, options)
syslinux_cfg = os.path.join(image_creator.rootfs_dir['ROOTFS_DIR'], "boot", "syslinux.cfg")
msger.debug("Writing syslinux config %s" % syslinux_cfg)
msger.debug("Assigning %s partitions to disks" % ptable_format)
- if ptable_format not in ('msdos', 'gpt'):
- raise ImageError("Unknown partition table format '%s', supported " \
- "formats are: 'msdos'" % ptable_format)
-
if self._partitions_layed_out:
return