Skip to content

Commit

Permalink
Fix boot selection on uki
Browse files Browse the repository at this point in the history
Seems like systemd-boot identifies entries by the ID whcih doesnt show
anywhere, and that Id is the entry conf name minus the boot assesment

Signed-off-by: Itxaka <[email protected]>
  • Loading branch information
Itxaka committed Dec 10, 2024
1 parent 694cdff commit c8f49a4
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions pkg/action/bootentries.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,13 +133,9 @@ func selectBootEntrySystemd(cfg *config.Config, entry string) error {
if err != nil {
return err
}
assessment, err := utils.ReadAssessmentFromEntry(cfg.Fs, bootFileName, cfg.Logger)
if err != nil {
cfg.Logger.Logger.Err(err).Str("entry", entry).Str("boot file name", bootFileName).Msg("could not read assessment from entry")
return err
}
bootName := fmt.Sprintf("%s%s.conf", bootFileName, assessment)
bootName := fmt.Sprintf("%s.conf", bootFileName)
// Set the default entry to the selected entry
// This is the file name of the entry to be set as default, boot assesment doesnt seem to count as it uses the ID which is the config name
systemdConf["default"] = bootName
err = utils.SystemdBootConfWriter(cfg.Fs, filepath.Join(efiPartition.MountPoint, "loader/loader.conf"), systemdConf)
if err != nil {
Expand Down

0 comments on commit c8f49a4

Please sign in to comment.