Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(storage): add option to explicitly omit the bootloader installation #2126

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
5 changes: 5 additions & 0 deletions subiquity/models/filesystem.py
Original file line number Diff line number Diff line change
Expand Up @@ -792,6 +792,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 @@ -2360,6 +2361,10 @@ 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:
if len(self._all(type="disk")) > 0 and len(self._all(type="disk")) == len(
self._all(type="disk", skip_bootloader=True)
):
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":
Expand Down
Loading