Skip to content

oldkern appears before current entry in systemd-boot interface #44

@Juhan280

Description

@Juhan280

Problem

This is normally not an issue because kernelstub sets the default to current here:

with open(
'%s/loader.conf' % self.loader_dir, mode='w') as loader:
default_line = 'default %s-current\n' % self.opsys.name
loader.write(default_line)

But when not using that as default, e.g. dual booting with windows and setting windows as default, if I press l during boot to boot into linux or 1 to select the first entry, it boots into the oldkern, since oldkern appears first in the list.

The sorting order is specified here: https://uapi-group.org/specifications/specs/boot_loader_specification/#sorting, basically, when sort-key doesn't exist, it compares the filename using version sort. And according to that current < oldkern, so oldkern becomes the first entry.

Possible fix

  • One very quick way to resolve this is to use rename the files such a way that the current entry appears higher than oldkern. But this might not be desirable.
  • The proper way of addressing this is to follow boot loader specification and provide the necessary entry keys (sort-key and version) so that the boot manager sorts them properly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions