clan-cli: Fix disko template to not fail because of missing bootloader.
This commit is contained in:
@@ -138,6 +138,7 @@ def set_machine_disk_schema(
|
|||||||
# Use get disk schemas to get the placeholders and their options
|
# Use get disk schemas to get the placeholders and their options
|
||||||
placeholders: dict[str, str],
|
placeholders: dict[str, str],
|
||||||
force: bool = False,
|
force: bool = False,
|
||||||
|
allow_uknown_placeholders: bool = False,
|
||||||
) -> None:
|
) -> None:
|
||||||
"""
|
"""
|
||||||
Set the disk placeholders of the template
|
Set the disk placeholders of the template
|
||||||
@@ -182,7 +183,11 @@ def set_machine_disk_schema(
|
|||||||
)
|
)
|
||||||
|
|
||||||
# Invalid value. Check if the value is one of the provided options
|
# Invalid value. Check if the value is one of the provided options
|
||||||
if ph.options and placeholder_value not in ph.options:
|
if (
|
||||||
|
ph.options
|
||||||
|
and placeholder_value not in ph.options
|
||||||
|
and not allow_uknown_placeholders
|
||||||
|
):
|
||||||
msg = (
|
msg = (
|
||||||
f"Invalid value {placeholder_value} for placeholder {placeholder_name}"
|
f"Invalid value {placeholder_value} for placeholder {placeholder_name}"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,4 +1,8 @@
|
|||||||
{
|
{
|
||||||
|
|
||||||
|
boot.loader.grub.efiSupport = true;
|
||||||
|
boot.loader.grub.efiInstallAsRemovable = true;
|
||||||
|
boot.loader.grub.enable = true;
|
||||||
disko.devices = {
|
disko.devices = {
|
||||||
disk = {
|
disk = {
|
||||||
main = {
|
main = {
|
||||||
@@ -8,6 +12,11 @@
|
|||||||
content = {
|
content = {
|
||||||
type = "gpt";
|
type = "gpt";
|
||||||
partitions = {
|
partitions = {
|
||||||
|
"boot" = {
|
||||||
|
size = "1M";
|
||||||
|
type = "EF02"; # for grub MBR
|
||||||
|
priority = 1;
|
||||||
|
};
|
||||||
ESP = {
|
ESP = {
|
||||||
type = "EF00";
|
type = "EF00";
|
||||||
size = "500M";
|
size = "500M";
|
||||||
|
|||||||
Reference in New Issue
Block a user