Skip to content

Conversation

@lslezak
Copy link
Contributor

@lslezak lslezak commented Oct 6, 2025

Problem

  • Originally we always booted the Agama installer, later that was changed to booting from harddisk.
  • But having a fixed boot option is not nice. If the system does not contain any OS then always booting from harddisk does not make sense. Or the other way round, booting the installer is probably not a good idea if a system is already installed.

Solution

  • Preselect the default boot option dynamically depending on the current system state.
  • If a SUSE OS is already installed then by default boot from harddisk. Assume that a system has been just installed. Unfortunately we cannot find which (open)SUSE distribution or version is installed. Ideally we should check for SLE16 or Leap 16 or Tumbleweed (probably any release), but that's not possible because Grub scripting is very limited. (Or we would have to implement our special Grub module for that.)
  • If a SUSE OS is not detected then preselect the installer option. That will apply in a completely clean system or in systems with Windows or other Linuxes (assume the user wants a dual boot with SUSE/openSUSE).

Notes

  • Still just a proof of concept
  • So far only for x86_64, but aarch64 should be the same, ppc64le is a question but hopefully should work the same way. Booting s390x is already black magic so I do not expect it is possible to do something similar there. Or it needs a real s390 expert. 😃
  • Does not handle encrypted partitions, might not work with RAIDs or LVMs (not tested)
  • We could make the check less strict, i.e. boot from harddisk if any Linux system is detected (probably by checking existence of /etc/passwd or similar file on any partition) or change the logic. This is just the initial proposal for testing the concept.

Testing

Tested manually with a locally built image in VirtualBox VMs.

No system installed yet

In a fresh and clean virtual machine by default the installer option is preselected in the boot menu.

UEFI boot:

agama-boot-empty-system-uefi

Classic BIOS boot:

agama-boot-empty-system-bios

Installed system

Tested with preinstalled SLES 16 (default installation, root with Btrfs, no RAID or LVM).

UEFI boot:

agama-boot-installed-system-uefi

Classic BIOS boot:

agama-boot-installed-system-bios

Summary

At the first boot in clean system the installer is selected, after installing the system in the next reboots it will always select booting from harddisk. I think this is how most users would expect it to behave.

- Boot from harddisk if any SUSE OS is installed in the system
- Otherwise boot the installer (to either install OS in
  a clean system or create dual boot with Windows or other
  Linux)

Note: Does not handle encrypted partitions, might not work
  with RAIDs or LVMs
@lslezak lslezak added enhancement New feature or request livecd agama-live labels Oct 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants