summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/lib/wic/kickstart/custom_commands/micboot.py3
-rw-r--r--scripts/lib/wic/plugins/source/bootimg-efi.py15
-rw-r--r--scripts/lib/wic/plugins/source/bootimg-pcbios.py8
-rw-r--r--scripts/lib/wic/plugins/source/rootfs_pcbios_ext.py8
-rw-r--r--scripts/lib/wic/utils/partitionedfs.py4
5 files changed, 8 insertions, 30 deletions
diff --git a/scripts/lib/wic/kickstart/custom_commands/micboot.py b/scripts/lib/wic/kickstart/custom_commands/micboot.py
index d162142506..358b0ea9cd 100644
--- a/scripts/lib/wic/kickstart/custom_commands/micboot.py
+++ b/scripts/lib/wic/kickstart/custom_commands/micboot.py
@@ -44,6 +44,7 @@ class Mic_Bootloader(F8_Bootloader):
44 def _getParser(self): 44 def _getParser(self):
45 op = F8_Bootloader._getParser(self) 45 op = F8_Bootloader._getParser(self)
46 op.add_option("--menus", dest="menus") 46 op.add_option("--menus", dest="menus")
47 op.add_option("--ptable", dest="ptable", type="string") 47 op.add_option("--ptable", dest="ptable", choices=("msdos", "gpt"),
48 default="msdos")
48 return op 49 return op
49 50
diff --git a/scripts/lib/wic/plugins/source/bootimg-efi.py b/scripts/lib/wic/plugins/source/bootimg-efi.py
index 39ce9f375e..d3b8468c7b 100644
--- a/scripts/lib/wic/plugins/source/bootimg-efi.py
+++ b/scripts/lib/wic/plugins/source/bootimg-efi.py
@@ -60,13 +60,8 @@ class BootimgEFIPlugin(SourcePlugin):
60 60
61 kernel = "/bzImage" 61 kernel = "/bzImage"
62 62
63 if cr.ptable_format in ('msdos', 'gpt'):
64 rootstr = cr.rootdev
65 else:
66 raise ImageError("Unsupported partition table format found")
67
68 grubefi_conf += "linux %s root=%s rootwait %s\n" \ 63 grubefi_conf += "linux %s root=%s rootwait %s\n" \
69 % (kernel, rootstr, options) 64 % (kernel, cr.rootdev, options)
70 grubefi_conf += "}\n" 65 grubefi_conf += "}\n"
71 66
72 msger.debug("Writing grubefi config %s/hdd/boot/EFI/BOOT/grub.cfg" \ 67 msger.debug("Writing grubefi config %s/hdd/boot/EFI/BOOT/grub.cfg" \
@@ -104,16 +99,10 @@ class BootimgEFIPlugin(SourcePlugin):
104 99
105 kernel = "/bzImage" 100 kernel = "/bzImage"
106 101
107 if cr.ptable_format in ('msdos', 'gpt'):
108 rootstr = cr.rootdev
109 else:
110 raise ImageError("Unsupported partition table format found")
111
112 boot_conf = "" 102 boot_conf = ""
113 boot_conf += "title boot\n" 103 boot_conf += "title boot\n"
114 boot_conf += "linux %s\n" % kernel 104 boot_conf += "linux %s\n" % kernel
115 boot_conf += "options LABEL=Boot root=%s %s\n" \ 105 boot_conf += "options LABEL=Boot root=%s %s\n" % (cr.rootdev, options)
116 % (rootstr, options)
117 106
118 msger.debug("Writing gummiboot config %s/hdd/boot/loader/entries/boot.conf" \ 107 msger.debug("Writing gummiboot config %s/hdd/boot/loader/entries/boot.conf" \
119 % cr_workdir) 108 % cr_workdir)
diff --git a/scripts/lib/wic/plugins/source/bootimg-pcbios.py b/scripts/lib/wic/plugins/source/bootimg-pcbios.py
index dd49480141..5caffbc8e2 100644
--- a/scripts/lib/wic/plugins/source/bootimg-pcbios.py
+++ b/scripts/lib/wic/plugins/source/bootimg-pcbios.py
@@ -103,12 +103,8 @@ class BootimgPcbiosPlugin(SourcePlugin):
103 kernel = "/vmlinuz" 103 kernel = "/vmlinuz"
104 syslinux_conf += "KERNEL " + kernel + "\n" 104 syslinux_conf += "KERNEL " + kernel + "\n"
105 105
106 if cr.ptable_format in ('msdos', 'gpt'): 106 syslinux_conf += "APPEND label=boot root=%s %s\n" % \
107 rootstr = cr.rootdev 107 (cr.rootdev, options)
108 else:
109 raise ImageError("Unsupported partition table format found")
110
111 syslinux_conf += "APPEND label=boot root=%s %s\n" % (rootstr, options)
112 108
113 msger.debug("Writing syslinux config %s/hdd/boot/syslinux.cfg" \ 109 msger.debug("Writing syslinux config %s/hdd/boot/syslinux.cfg" \
114 % cr_workdir) 110 % cr_workdir)
diff --git a/scripts/lib/wic/plugins/source/rootfs_pcbios_ext.py b/scripts/lib/wic/plugins/source/rootfs_pcbios_ext.py
index 90dac05dca..533eaa7bd1 100644
--- a/scripts/lib/wic/plugins/source/rootfs_pcbios_ext.py
+++ b/scripts/lib/wic/plugins/source/rootfs_pcbios_ext.py
@@ -100,12 +100,8 @@ class RootfsPlugin(SourcePlugin):
100 syslinux_conf += "LABEL linux\n" 100 syslinux_conf += "LABEL linux\n"
101 syslinux_conf += " KERNEL /boot/bzImage\n" 101 syslinux_conf += " KERNEL /boot/bzImage\n"
102 102
103 if image_creator.ptable_format in ('msdos', 'gpt'): 103 syslinux_conf += " APPEND label=boot root=%s %s\n" % \
104 rootstr = image_creator.rootdev 104 (image_creator.rootdev, options)
105 else:
106 raise ImageError("Unsupported partition table format found")
107
108 syslinux_conf += " APPEND label=boot root=%s %s\n" % (rootstr, options)
109 105
110 syslinux_cfg = os.path.join(image_creator.rootfs_dir['ROOTFS_DIR'], "boot", "syslinux.cfg") 106 syslinux_cfg = os.path.join(image_creator.rootfs_dir['ROOTFS_DIR'], "boot", "syslinux.cfg")
111 msger.debug("Writing syslinux config %s" % syslinux_cfg) 107 msger.debug("Writing syslinux config %s" % syslinux_cfg)
diff --git a/scripts/lib/wic/utils/partitionedfs.py b/scripts/lib/wic/utils/partitionedfs.py
index 1eb1f015d6..e093ec5778 100644
--- a/scripts/lib/wic/utils/partitionedfs.py
+++ b/scripts/lib/wic/utils/partitionedfs.py
@@ -122,10 +122,6 @@ class Image(object):
122 122
123 msger.debug("Assigning %s partitions to disks" % ptable_format) 123 msger.debug("Assigning %s partitions to disks" % ptable_format)
124 124
125 if ptable_format not in ('msdos', 'gpt'):
126 raise ImageError("Unknown partition table format '%s', supported " \
127 "formats are: 'msdos'" % ptable_format)
128
129 if self._partitions_layed_out: 125 if self._partitions_layed_out:
130 return 126 return
131 127