Configure Fedora Cloud with GPT with Hybrid Boot
Fedora Cloud is now set up so that it builds the disk with GPT partitioning and has a specific partitioning layout so that the resulting images are equipped to boot either with legacy BIOS or UEFI. Reference: https://fedoraproject.org/wiki/Changes/FedoraCloudHybridBoot Signed-off-by: Neal Gompa <ngompa13@gmail.com>
This commit is contained in:
parent
c970f81e4e
commit
611edda149
@ -9,7 +9,7 @@
|
||||
# Don't show bootloader as it's impossible for the user to get to it in time
|
||||
# So we might as well not waste the 1 second on each boot.
|
||||
# https://cloud.google.com/compute/docs/import/import-existing-image
|
||||
bootloader --timeout=0 --append="no_timer_check net.ifnames=0 console=ttyS0,38400n8d"
|
||||
bootloader --timeout=0 --location=mbr --append="no_timer_check net.ifnames=0 console=ttyS0,38400n8d"
|
||||
|
||||
# redefine `services` here to drop cloud-init systemd unit enablements from
|
||||
# fedora-cloud-base.ks since we don't use them.
|
||||
|
@ -19,7 +19,7 @@ rootpw vagrant
|
||||
# even on VirtualBox virt, we get a primary network device with "eth0" as the name
|
||||
# This simplifies things and allows a single disk image for both supported Vagrant
|
||||
# platforms (virtualbox and kvm)
|
||||
bootloader --timeout=1 --append="no_timer_check console=tty1 console=ttyS0,115200n8 net.ifnames=0 biosdevname=0"
|
||||
bootloader --timeout=1 --location=mbr --append="no_timer_check console=tty1 console=ttyS0,115200n8 net.ifnames=0 biosdevname=0"
|
||||
|
||||
%packages
|
||||
# The default koji Vagrantfile configuration uses rsync to sync files between
|
||||
|
@ -32,13 +32,19 @@ rootpw --lock --iscrypted locked
|
||||
firewall --disabled
|
||||
|
||||
# We pass net.ifnames=0 because we always want to use eth0 here on all the cloud images.
|
||||
bootloader --timeout=1 --append="no_timer_check net.ifnames=0 console=tty1 console=ttyS0,115200n8"
|
||||
bootloader --timeout=1 --location=mbr --append="no_timer_check net.ifnames=0 console=tty1 console=ttyS0,115200n8"
|
||||
|
||||
services --enabled=sshd,cloud-init,cloud-init-local,cloud-config,cloud-final
|
||||
|
||||
zerombr
|
||||
clearpart --all
|
||||
autopart --type=btrfs --noswap
|
||||
# Configure for gpt with bios+uefi
|
||||
clearpart --all --initlabel --disklabel=gpt
|
||||
part biosboot --size=1 --fstype=biosboot
|
||||
part /boot/efi --size=100 --fstype=efi
|
||||
part /boot --size=500 --fstype=ext4 --label=boot
|
||||
part btrfs.007 --size=2000 --fstype=btrfs --grow
|
||||
btrfs none --label=fedora btrfs.007
|
||||
btrfs /home --subvol --name=home LABEL=fedora
|
||||
btrfs / --subvol --name=root LABEL=fedora
|
||||
|
||||
%include fedora-repo.ks
|
||||
|
||||
@ -87,6 +93,10 @@ qemu-guest-agent
|
||||
##### begin kickstart post ###########################################
|
||||
%post --erroronfail
|
||||
|
||||
# Blivet sets pmbr_boot flag erroneously and we need to purge it
|
||||
# otherwise it'll fail to boot
|
||||
parted /dev/vda disk_set pmbr_boot off
|
||||
|
||||
# linux-firmware is installed by default and is quite large. As of mid 2020:
|
||||
# Total download size: 97 M
|
||||
# Installed size: 268 M
|
||||
|
Loading…
Reference in New Issue
Block a user