title: centos 7 kickstart - forcing single partition
body: <p>How can I force a single partition in cents 7 through the kickstart file?</p>
  
  <p>Sometimes disk size is small (virtual box builder, 50GB) sometimes large (v-sphere builder 1TB) how can I ensure that only a single partition is created for both cases?</p>
  
  <p>The regular <code>autopart</code> will create multiple partitions.</p>
  
  <p>The full kickstart file can be found here <a href="https://gist.github.com/geoHeil/e4944088c5350835672279ec3e7edd0b" rel="nofollow noreferrer">https://gist.github.com/geoHeil/e4944088c5350835672279ec3e7edd0b</a> the (as far as I think relevant subparts (of me trying  to achieve the goal as outlined) are:</p>
  
  <pre><code>clearpart --all --initlabel --drives=sda
  # Make the volgroup
  volgroup VolGroup --pesize=4096 pv.008002
  
  # Setup swap on the volgroup
  logvol swap --name=lv_swap --vgname=VolGroup --size=2016 --maxsize=2016
  
  # Make / on the volgroup
  logvol /  --name=lv_root --vgname=VolGroup --fstype=ext4 --grow --size=1
  
  # Setup the boot partition on the volgroup
  part /boot --fstype=ext4 --size=500
  </code></pre>
  
  <p>Currently, it does not work and not enough space is assigned for the partition when using the packer script of <a href="https://github.com/chef/bento/blob/master/centos/centos-7.4-x86_64.json" rel="nofollow noreferrer">https://github.com/chef/bento/blob/master/centos/centos-7.4-x86_64.json</a> with my modified kickstart file.</p>