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
|
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
|
||||||
# Clear the Master Boot Record
|
|
||||||
zerombr
|
|
||||||
# Partition clearing information
|
|
||||||
clearpart --all
|
|
||||||
# Disk partitioning information
|
|
||||||
part / --fstype="ext4" --size=4000
|
|
||||||
part swap --size=1000
|
|
||||||
|
|
||||||
%post
|
%post
|
||||||
# Remove root password
|
# Remove root password
|
||||||
|
@ -31,9 +31,6 @@ timezone US/Eastern
|
|||||||
bootloader --location=mbr
|
bootloader --location=mbr
|
||||||
# Clear the Master Boot Record
|
# Clear the Master Boot Record
|
||||||
zerombr
|
zerombr
|
||||||
# Partition clearing information
|
|
||||||
clearpart --all
|
|
||||||
# Disk partitioning information
|
|
||||||
|
|
||||||
%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
|
||||||
|
@ -27,8 +27,6 @@ timezone US/Eastern
|
|||||||
bootloader --location=mbr
|
bootloader --location=mbr
|
||||||
# Clear the Master Boot Record
|
# Clear the Master Boot Record
|
||||||
zerombr
|
zerombr
|
||||||
# Partition clearing information
|
|
||||||
clearpart --all
|
|
||||||
|
|
||||||
%post
|
%post
|
||||||
# Remove root password
|
# Remove root password
|
||||||
@ -42,12 +40,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
|
||||||
|
@ -27,8 +27,6 @@ timezone US/Eastern
|
|||||||
bootloader --location=mbr
|
bootloader --location=mbr
|
||||||
# Clear the Master Boot Record
|
# Clear the Master Boot Record
|
||||||
zerombr
|
zerombr
|
||||||
# Partition clearing information
|
|
||||||
clearpart --all
|
|
||||||
|
|
||||||
%post
|
%post
|
||||||
# Remove root password
|
# Remove root password
|
||||||
@ -41,13 +39,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
|
||||||
|
@ -23,12 +23,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=mbr
|
bootloader --location=none
|
||||||
# Clear the Master Boot Record
|
|
||||||
zerombr
|
|
||||||
# Partition clearing information
|
|
||||||
clearpart --all
|
|
||||||
|
|
||||||
%post
|
%post
|
||||||
# Remove root password
|
# 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)
|
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\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))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user