mirror of
https://github.com/kairos-io/immucore.git
synced 2025-09-26 06:06:06 +00:00
2599 (#336)
This commit is contained in:
@@ -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
|
||||
}))...)
|
||||
|
Reference in New Issue
Block a user