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:
parent
4cb15e0a0f
commit
acc7b811b6
@ -23,15 +23,8 @@ logging --level=info
|
||||
shutdown
|
||||
# System timezone
|
||||
timezone US/Eastern
|
||||
# System bootloader configuration
|
||||
# System bootloader configuration (unpartitioned fs image doesn't use a bootloader)
|
||||
bootloader --location=none
|
||||
# Clear the Master Boot Record
|
||||
zerombr
|
||||
# Partition clearing information
|
||||
clearpart --all
|
||||
# Disk partitioning information
|
||||
part / --fstype="ext4" --size=4000
|
||||
part swap --size=1000
|
||||
|
||||
%post
|
||||
# Remove root password
|
||||
|
@ -31,9 +31,6 @@ timezone US/Eastern
|
||||
bootloader --location=mbr
|
||||
# Clear the Master Boot Record
|
||||
zerombr
|
||||
# Partition clearing information
|
||||
clearpart --all
|
||||
# Disk partitioning information
|
||||
|
||||
%post
|
||||
# FIXME: it'd be better to get this installed from a package
|
||||
|
@ -27,8 +27,6 @@ timezone US/Eastern
|
||||
bootloader --location=mbr
|
||||
# Clear the Master Boot Record
|
||||
zerombr
|
||||
# Partition clearing information
|
||||
clearpart --all
|
||||
|
||||
%post
|
||||
# Remove root password
|
||||
@ -42,12 +40,6 @@ rm /var/lib/systemd/random-seed
|
||||
kernel
|
||||
-dracut-config-rescue
|
||||
|
||||
shim
|
||||
shim-ia32
|
||||
grub2
|
||||
grub2-efi
|
||||
grub2-efi-*-cdboot
|
||||
grub2-efi-ia32
|
||||
efibootmgr
|
||||
|
||||
# NOTE lorax-composer will add the recipe packages below here, including the final %end
|
||||
|
@ -27,8 +27,6 @@ timezone US/Eastern
|
||||
bootloader --location=mbr
|
||||
# Clear the Master Boot Record
|
||||
zerombr
|
||||
# Partition clearing information
|
||||
clearpart --all
|
||||
|
||||
%post
|
||||
# Remove root password
|
||||
@ -41,13 +39,6 @@ rm /var/lib/systemd/random-seed
|
||||
%packages
|
||||
kernel
|
||||
-dracut-config-rescue
|
||||
|
||||
shim
|
||||
shim-ia32
|
||||
grub2
|
||||
grub2-efi
|
||||
grub2-efi-*-cdboot
|
||||
grub2-efi-ia32
|
||||
efibootmgr
|
||||
|
||||
# NOTE lorax-composer will add the recipe packages below here, including the final %end
|
||||
|
@ -23,12 +23,8 @@ logging --level=info
|
||||
shutdown
|
||||
# System timezone
|
||||
timezone US/Eastern
|
||||
# System bootloader configuration
|
||||
bootloader --location=mbr
|
||||
# Clear the Master Boot Record
|
||||
zerombr
|
||||
# Partition clearing information
|
||||
clearpart --all
|
||||
# System bootloader configuration (tar doesn't need a bootloader)
|
||||
bootloader --location=none
|
||||
|
||||
%post
|
||||
# Remove root password
|
||||
|
@ -339,6 +339,10 @@ def start_build(cfg, yumlock, gitlock, branch, recipe_name, compose_type, test_m
|
||||
log.debug("repo composer-%s = %s", 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\n')
|
||||
|
||||
# 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))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user