This commit is contained in:
Itxaka
2024-06-13 12:08:37 +02:00
committed by GitHub
parent 906bfdae73
commit 3042aae185
2 changed files with 22 additions and 9 deletions

View File

@@ -160,10 +160,7 @@ func (s *State) UKIMountBaseSystem(g *herd.Graph) error {
// Now that we have all the mounts, check if we got secureboot enabled
if !efi.GetSecureBoot() && len(internalUtils.ReadCMDLineArg("rd.immucore.securebootdisabled")) == 0 {
internalUtils.Log.Error().Msg("Secure boot is not enabled. Aborting boot.")
// Sleep forever.
// We dont want to exit and print panics or kernel panic, so we print our message and wait for the user to ctrl+alt+del
select {}
internalUtils.RebootOrWait("Secure boot is not enabled", nil)
}
return err
},
@@ -396,11 +393,7 @@ func (s *State) UKIUnlock(g *herd.Graph, opts ...herd.OpOption) error {
internalUtils.Log.Debug().Msg("Will now try to unlock partitions")
err := kcrypt.UnlockAllWithLogger(true, internalUtils.Log)
if err != nil {
internalUtils.Log.Info().Msg(s.WriteDAG(g))
internalUtils.Log.Err(err).Msg("Unlocking partitions")
internalUtils.Log.Warn().Msg("Unlocking partitions failed, waiting 10 seconds and rebooting")
time.Sleep(10 * time.Second)
return syscall.Reboot(syscall.LINUX_REBOOT_CMD_RESTART)
internalUtils.RebootOrWait("Unlocking partitions failed", err)
}
return nil
}))...)