Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 13 additions & 7 deletions subiquity/models/filesystem.py
Original file line number Diff line number Diff line change
Expand Up @@ -800,6 +800,7 @@ class Disk(_Device):
preserve: bool = False
name: str = ""
grub_device: bool = False
skip_bootloader: bool = False
device_id: Optional[str] = None

_info: StorageInfo = attributes.for_api()
Expand Down Expand Up @@ -2146,8 +2147,8 @@ def render(self, mode: ActionRenderMode = ActionRenderMode.DEFAULT):
config["swap"] = self.swap
elif not self.should_add_swapfile():
config["swap"] = {"size": 0}
if self.grub is not None:
config["grub"] = self.grub
# if self.grub is not None:
# config["grub"] = self.grub
return config

def load_probe_data(self, probe_data):
Expand Down Expand Up @@ -2398,11 +2399,16 @@ def needs_bootloader_partition(self):
elif self.bootloader == Bootloader.BIOS:
return self._one(type="disk", grub_device=True) is None
elif self.bootloader == Bootloader.UEFI:
for esp in self._all(type="partition", grub_device=True):
if esp.fs() and esp.fs().mount():
if esp.fs().mount().path == "/boot/efi":
return False
return True
return False
# if len(self._all(type="disk")) > 0 and len(self._all(type="disk")) == len(
# self._all(type="disk", grub_device=False)
# ):
# return False
# for esp in self._all(type="partition", grub_device=True):
# if esp.fs() and esp.fs().mount():
# if esp.fs().mount().path == "/boot/efi":
# return False
# return True
elif self.bootloader == Bootloader.PREP:
return self._one(type="partition", grub_device=True) is None
else:
Expand Down
12 changes: 6 additions & 6 deletions subiquity/models/subiquity.py
Original file line number Diff line number Diff line change
Expand Up @@ -457,12 +457,12 @@ def _machine_id(self):

def render(self):
config = {
"grub": {
"terminal": "unmodified",
"probe_additional_os": True,
"reorder_uefi": False,
"remove_old_uefi_loaders": False,
},
# "grub": {
# "terminal": "unmodified",
# "probe_additional_os": True,
# "reorder_uefi": False,
# "remove_old_uefi_loaders": False,
# },
"install": {
"unmount": "disabled",
"save_install_config": False,
Expand Down