Move disklabel and UEFI support to compose.py

Currently we are making MBR disk images for qcow2 and partitioned disk,
so the UEFI packages aren't required at this point.

Move the clearpart command into compose.py so that in the futute it can
use clearpart --disklabel to create a GPT image, and add the required
packages to the package set.
This commit is contained in:
Brian C. Lane 2018-08-08 08:44:01 -07:00
parent 9c0af49bd1
commit 22a6852b44
6 changed files with 6 additions and 25 deletions

View File

@ -21,10 +21,8 @@ logging --level=info
shutdown shutdown
# System timezone # System timezone
timezone US/Eastern timezone US/Eastern
# System bootloader configuration # System bootloader configuration (unpartitioned fs image doesn't use a bootloader)
bootloader --location=none bootloader --location=none
# Partition clearing information
clearpart --all --initlabel
%post %post
# Remove random-seed # Remove random-seed

View File

@ -27,8 +27,6 @@ services --disabled="network,sshd" --enabled="NetworkManager"
timezone US/Eastern timezone US/Eastern
# System bootloader configuration # System bootloader configuration
bootloader --location=none bootloader --location=none
# Partition clearing information
clearpart --all --initlabel
%post %post
# FIXME: it'd be better to get this installed from a package # FIXME: it'd be better to get this installed from a package

View File

@ -23,8 +23,6 @@ shutdown
timezone US/Eastern timezone US/Eastern
# System bootloader configuration # System bootloader configuration
bootloader --location=mbr bootloader --location=mbr
# Partition clearing information
clearpart --all --initlabel
%post %post
# Remove random-seed # Remove random-seed
@ -35,12 +33,6 @@ rm /var/lib/systemd/random-seed
kernel kernel
-dracut-config-rescue -dracut-config-rescue
shim
shim-ia32
grub2 grub2
grub2-efi
grub2-efi-*-cdboot
grub2-efi-ia32
efibootmgr
# NOTE lorax-composer will add the recipe packages below here, including the final %end # NOTE lorax-composer will add the recipe packages below here, including the final %end

View File

@ -23,8 +23,6 @@ shutdown
timezone US/Eastern timezone US/Eastern
# System bootloader configuration # System bootloader configuration
bootloader --location=mbr bootloader --location=mbr
# Partition clearing information
clearpart --all --initlabel
%post %post
# Remove root password # Remove root password
@ -37,13 +35,6 @@ rm /var/lib/systemd/random-seed
%packages %packages
kernel kernel
-dracut-config-rescue -dracut-config-rescue
shim
shim-ia32
grub2 grub2
grub2-efi
grub2-efi-*-cdboot
grub2-efi-ia32
efibootmgr
# NOTE lorax-composer will add the recipe packages below here, including the final %end # NOTE lorax-composer will add the recipe packages below here, including the final %end

View File

@ -21,10 +21,8 @@ logging --level=info
shutdown shutdown
# System timezone # System timezone
timezone US/Eastern timezone US/Eastern
# System bootloader configuration # System bootloader configuration (tar doesn't need a bootloader)
bootloader --location=none bootloader --location=none
# Partition clearing information
clearpart --all --initlabel
%post %post
# Remove random-seed # Remove random-seed

View File

@ -334,6 +334,10 @@ def start_build(cfg, dnflock, gitlock, branch, recipe_name, compose_type, test_m
log.debug("repo composer-%s = %s", idx, ks_repo) log.debug("repo composer-%s = %s", idx, ks_repo)
f.write('repo --name="composer-%s" %s\n' % (idx, ks_repo)) f.write('repo --name="composer-%s" %s\n' % (idx, ks_repo))
# Setup the disk for booting
# TODO Add GPT and UEFI boot support
f.write('clearpart --all --initlabel\n')
# Write the root partition and it's size in MB (rounded up) # Write the root partition and it's size in MB (rounded up)
f.write('part / --fstype="ext4" --size=%d\n' % ceil(installed_size / 1024**2)) f.write('part / --fstype="ext4" --size=%d\n' % ceil(installed_size / 1024**2))