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
9c0af49bd1
commit
22a6852b44
@ -21,10 +21,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
|
||||
# Partition clearing information
|
||||
clearpart --all --initlabel
|
||||
|
||||
%post
|
||||
# Remove random-seed
|
||||
|
@ -27,8 +27,6 @@ services --disabled="network,sshd" --enabled="NetworkManager"
|
||||
timezone US/Eastern
|
||||
# System bootloader configuration
|
||||
bootloader --location=none
|
||||
# Partition clearing information
|
||||
clearpart --all --initlabel
|
||||
|
||||
%post
|
||||
# FIXME: it'd be better to get this installed from a package
|
||||
|
@ -23,8 +23,6 @@ shutdown
|
||||
timezone US/Eastern
|
||||
# System bootloader configuration
|
||||
bootloader --location=mbr
|
||||
# Partition clearing information
|
||||
clearpart --all --initlabel
|
||||
|
||||
%post
|
||||
# Remove random-seed
|
||||
@ -35,12 +33,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
|
||||
|
@ -23,8 +23,6 @@ shutdown
|
||||
timezone US/Eastern
|
||||
# System bootloader configuration
|
||||
bootloader --location=mbr
|
||||
# Partition clearing information
|
||||
clearpart --all --initlabel
|
||||
|
||||
%post
|
||||
# Remove root password
|
||||
@ -37,13 +35,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
|
||||
|
@ -21,10 +21,8 @@ logging --level=info
|
||||
shutdown
|
||||
# System timezone
|
||||
timezone US/Eastern
|
||||
# System bootloader configuration
|
||||
# System bootloader configuration (tar doesn't need a bootloader)
|
||||
bootloader --location=none
|
||||
# Partition clearing information
|
||||
clearpart --all --initlabel
|
||||
|
||||
%post
|
||||
# Remove random-seed
|
||||
|
@ -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)
|
||||
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)
|
||||
f.write('part / --fstype="ext4" --size=%d\n' % ceil(installed_size / 1024**2))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user