fix: change where grub_device gets defined, add partition for BIOS builds, change conditional for BIOS builds

This commit is contained in:
AJ Schroeder
2024-06-29 10:47:36 -05:00
parent ab445dd2b7
commit 2441ef2ebf

View File

@@ -21,16 +21,21 @@
path: /dev/${device} path: /dev/${device}
wipe: superblock wipe: superblock
preserve: false preserve: false
name: ''
%{ if vm_bios == "ovmf" ~}
grub_device: false
%{ endif ~}
%{ if vm_bios == "seabios" ~} %{ if vm_bios == "seabios" ~}
grub_device: true grub_device: true
%{ endif ~} %{ endif ~}
type: disk type: disk
id: disk-${device} id: disk-${device}
# BIOS boot partition %{if vm_bios == "seabios" ~}
- device: disk-${device}
size: 1M
flag: bios_grub
number: 1
preserve: false
type: partition
id: partition-grub
%{ endif ~}
%{ for index, partition in partitions ~} %{ for index, partition in partitions ~}
- device: disk-${device} - device: disk-${device}
%{ if partition.size != -1 ~} %{ if partition.size != -1 ~}
@@ -40,7 +45,7 @@
%{ endif ~} %{ endif ~}
wipe: superblock wipe: superblock
preserve: false preserve: false
%{ if partition.name == "bios_grub" && vm_bios == "seabios" && index == 0 ~} %{ if partition.mount.path == "/boot" && vm_bios == "seabios" && index == 0 ~}
flag: bios_grub flag: bios_grub
grub_device: false grub_device: false
%{ endif ~} %{ endif ~}
@@ -57,7 +62,6 @@
label: ${partition.format.label} label: ${partition.format.label}
fstype: ${partition.format.fstype} fstype: ${partition.format.fstype}
%{ endif ~} %{ endif ~}
# Don't create a mount for the GRUB partition when using BIOS
%{ if partition.volume_group == "" && partition.name != "bios_grub" ~} %{ if partition.volume_group == "" && partition.name != "bios_grub" ~}
- id: mount-${partition.name} - id: mount-${partition.name}
type: mount type: mount