[Libosinfo] [libosinfo PATCH 1/4] fedora, kickstart: Use autopart when possible

Fabiano Fidêncio fidencio at redhat.com
Thu Mar 7 10:30:19 UTC 2019


Let's take advantage of "autopart" and stop setting up the partitions
manually.

autopart is available since Fedora3 according to its documentation:
https://pykickstart.readthedocs.io/en/latest/kickstart-docs.html#id3

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
---
 .../fedoraproject.org/fedora-kickstart-desktop.xml.in  |  7 +------
 .../fedoraproject.org/fedora-kickstart-jeos.xml.in     | 10 +++++++---
 2 files changed, 8 insertions(+), 9 deletions(-)

diff --git a/data/install-script/fedoraproject.org/fedora-kickstart-desktop.xml.in b/data/install-script/fedoraproject.org/fedora-kickstart-desktop.xml.in
index 7d21715..cd2d517 100644
--- a/data/install-script/fedoraproject.org/fedora-kickstart-desktop.xml.in
+++ b/data/install-script/fedoraproject.org/fedora-kickstart-desktop.xml.in
@@ -137,12 +137,7 @@ clearpart --all --drives=<xsl:call-template name="target-disk"/>
 
 firstboot --disable
 
-part biosboot --fstype=biosboot --size=1
-part /boot --fstype <xsl:call-template name="bootfs"/> --recommended --ondisk=<xsl:call-template name="target-disk"/>
-part pv.2 --size=1 --grow --ondisk=<xsl:call-template name="target-disk"/>
-volgroup VolGroup00 --pesize=32768 pv.2
-logvol swap --fstype swap --name=LogVol01 --vgname=VolGroup00 --size=768 --grow --maxsize=1536
-logvol / --fstype <xsl:call-template name="rootfs"/> --name=LogVol00 --vgname=VolGroup00 --size=1024 --grow
+autopart
 reboot
 
 <xsl:if test="script/installation-source = 'network' or contains(media/variant, 'netinst')">
diff --git a/data/install-script/fedoraproject.org/fedora-kickstart-jeos.xml.in b/data/install-script/fedoraproject.org/fedora-kickstart-jeos.xml.in
index 28c6628..7683b6a 100644
--- a/data/install-script/fedoraproject.org/fedora-kickstart-jeos.xml.in
+++ b/data/install-script/fedoraproject.org/fedora-kickstart-jeos.xml.in
@@ -136,14 +136,18 @@ zerombr <xsl:if test="os/version < 14">yes</xsl:if>
 
 clearpart --all --drives=<xsl:call-template name="target-disk"/>
 
-<xsl:if test="os/version > 15">
-part biosboot --fstype=biosboot --size=1
-</xsl:if>
+<xsl:choose>
+  <xsl:when test="os/version < 3">
 part /boot --fstype <xsl:call-template name="bootfs"/> --recommended --ondisk=<xsl:call-template name="target-disk"/>
 part pv.2 --size=1 --grow --ondisk=<xsl:call-template name="target-disk"/>
 volgroup VolGroup00 --pesize=32768 pv.2
 logvol swap --fstype swap --name=LogVol01 --vgname=VolGroup00 --size=768 --grow --maxsize=1536
 logvol / --fstype <xsl:call-template name="rootfs"/> --name=LogVol00 --vgname=VolGroup00 --size=1024 --grow
+  </xsl:when>
+  <xsl:otherwise>
+autopart
+  </xsl:otherwise>
+</xsl:choose>
 reboot
 
 <xsl:if test="script/installation-source='network' or contains(media/variant, 'netinst')">
-- 
2.20.1




More information about the Libosinfo mailing list