Also refuse to do it on unkown media

Signed-off-by: Itxaka <itxaka@kairos.io>
This commit is contained in:
Itxaka 2024-03-07 12:46:33 +01:00
parent 40da5fa451
commit 009c7a6677

View File

@ -151,7 +151,7 @@ See https://kairos.io/docs/upgrade/manual/ for documentation.
return err
}
if bootFromLiveMedia() {
return fmt.Errorf("cannot upgrade from live media")
return fmt.Errorf("cannot upgrade from live media/unknown boot state")
}
return checkRoot()
@ -846,7 +846,7 @@ func bootFromLiveMedia() bool {
if err != nil {
return false
}
if r.BootState == state.LiveCD {
if r.BootState == state.LiveCD || r.BootState == state.Unknown {
return true
}