[supervisor.os.manager] Home Assistant Operating System update failed with: Installation error: Failed marking slot kernel.1 non-bootable: Failed marking slot kernel.1 as bad: grub backend: Failed to run grub-editenv: Child process exited with code 1

Tried to update from 14.2 to 15.1:

2025-03-31 21:01:17.010 INFO (MainThread) [supervisor.api.middleware.security] /os/info access from core_ssh
2025-03-31 21:04:39.871 INFO (MainThread) [supervisor.api.middleware.security] /os/info access from core_ssh
2025-03-31 21:14:43.215 INFO (MainThread) [supervisor.api.middleware.security] /hardware/info access from core_ssh
2025-03-31 21:15:07.997 INFO (MainThread) [supervisor.api.middleware.security] /hardware/info access from core_ssh
2025-03-31 21:15:51.662 INFO (MainThread) [supervisor.api.middleware.security] /os/info access from core_ssh
2025-03-31 21:19:38.231 INFO (SyncWorker_4) [supervisor.docker.manager] Stopping addon_core_ssh application
2025-03-31 21:19:41.398 INFO (SyncWorker_4) [supervisor.docker.manager] Cleaning addon_core_ssh application
2025-03-31 21:19:41.600 INFO (MainThread) [supervisor.docker.addon] Starting Docker add-on homeassistant/amd64-addon-ssh with version 9.16.0
2025-03-31 21:20:11.302 INFO (SyncWorker_0) [supervisor.docker.manager] Stopping addon_core_ssh application
2025-03-31 21:20:14.424 INFO (SyncWorker_0) [supervisor.docker.manager] Cleaning addon_core_ssh application
2025-03-31 21:20:14.613 INFO (MainThread) [supervisor.docker.addon] Starting Docker add-on homeassistant/amd64-addon-ssh with version 9.16.0
2025-03-31 21:21:30.648 INFO (SyncWorker_3) [supervisor.docker.manager] Stopping addon_core_ssh application
2025-03-31 21:21:33.769 INFO (SyncWorker_3) [supervisor.docker.manager] Cleaning addon_core_ssh application
2025-03-31 21:21:33.961 INFO (MainThread) [supervisor.docker.addon] Starting Docker add-on homeassistant/amd64-addon-ssh with version 9.16.0
2025-03-31 21:22:07.056 INFO (MainThread) [supervisor.homeassistant.api] Updated Home Assistant API token
2025-03-31 21:22:16.748 INFO (SyncWorker_5) [supervisor.docker.manager] Stopping addon_core_ssh application
2025-03-31 21:22:19.883 INFO (SyncWorker_5) [supervisor.docker.manager] Cleaning addon_core_ssh application
2025-03-31 21:22:20.083 INFO (MainThread) [supervisor.docker.addon] Starting Docker add-on homeassistant/amd64-addon-ssh with version 9.16.0
2025-03-31 21:23:58.537 INFO (SyncWorker_6) [supervisor.docker.manager] Stopping addon_core_ssh application
2025-03-31 21:24:01.756 INFO (SyncWorker_6) [supervisor.docker.manager] Cleaning addon_core_ssh application
2025-03-31 21:24:01.959 INFO (MainThread) [supervisor.docker.addon] Starting Docker add-on homeassistant/amd64-addon-ssh with version 9.16.0
2025-03-31 21:24:13.283 INFO (SyncWorker_0) [supervisor.docker.manager] Stopping addon_core_ssh application
2025-03-31 21:24:16.473 INFO (SyncWorker_0) [supervisor.docker.manager] Cleaning addon_core_ssh application
2025-03-31 21:24:16.680 INFO (MainThread) [supervisor.docker.addon] Starting Docker add-on homeassistant/amd64-addon-ssh with version 9.16.0
2025-03-31 21:24:27.169 INFO (MainThread) [supervisor.api.middleware.security] /network/info access from core_ssh
2025-03-31 21:24:27.171 INFO (MainThread) [supervisor.api.middleware.security] /network/info access from core_ssh
2025-03-31 21:24:27.173 INFO (MainThread) [supervisor.api.middleware.security] /host/info access from core_ssh
2025-03-31 21:24:27.176 INFO (MainThread) [supervisor.api.middleware.security] /core/info access from core_ssh
2025-03-31 21:25:16.540 INFO (MainThread) [supervisor.api.middleware.security] /network/info access from core_ssh
2025-03-31 21:25:16.542 INFO (MainThread) [supervisor.api.middleware.security] /network/info access from core_ssh
2025-03-31 21:25:16.545 INFO (MainThread) [supervisor.api.middleware.security] /host/info access from core_ssh
2025-03-31 21:25:16.549 INFO (MainThread) [supervisor.api.middleware.security] /core/info access from core_ssh
2025-03-31 21:26:09.462 INFO (MainThread) [supervisor.api.middleware.security] /os/info access from core_ssh
2025-03-31 21:40:41.988 INFO (MainThread) [supervisor.os.manager] Fetch OTA update from https://os-artifacts.home-assistant.io/15.1/haos_generic-x86-64-15.1.raucb
2025-03-31 21:40:48.793 INFO (MainThread) [supervisor.os.manager] Completed download of OTA update file /data/tmp/hassos-15.1.raucb
2025-03-31 21:40:48.888 ERROR (MainThread) [supervisor.os.manager] Home Assistant Operating System update failed with: Installation error: Failed marking slot kernel.1 non-bootable: Failed marking slot kernel.1 as bad: grub backend: Failed to run grub-editenv: Child process exited with code 1

Did some digging in Grok and added SSH access. I don’t seem to have access to any normal bash command despite having root access.

[core-ssh ~]$ ha os info
board: generic-x86-64
boot: A
boot_slots:
  A:
    state: booted
    status: bad
    version: "14.2"
  B:
    state: inactive
    status: bad
    version: null
data_disk: SAMSUNG-MZNTY128HDHP-000L1-S2YRNB0H927859
update_available: true
version: "14.2"
version_latest: "15.1"

[core-ssh ~]$ lsblk
-bash: lsblk: command not found

Any idea where to start on this?

The OS dev’s topic: Home Assistant OS 15.0 - no need to skip

Thanks - that RC did not work. I waited on 15.0 and my upgrade was an attempt to 15.1 as I was trying to avoid upgrade issues :rofl:

The version is not important. Did you read about the reasons for the failures and how to solve them?

You haven’t mentioned your hardware or install type so I can’t tell you which one.

x86 NUC - just realized that the triangle was a disclosure.

[core-ssh ~]$ ha os info
board: generic-x86-64

The fix is to add libata.force=nolpm to the kernel command line options, which can be done either temporarily through the GRUB menu or to the cmdline.txt file in the boot partition.

Ok - before I start hooking up monitors / key board to this headless machine is the cmdline.txt file just added to the ./ directory of HA?

This is not my area of expertise so you should probably ask in the other topic but I think it is:

/mnt/boot/cmdline.txt

Grok to the rescue - corrupted grubenv:

Recreate fully:

rm /mnt/boot/EFI/BOOT/grubenv
grub-editenv /mnt/boot/EFI/BOOT/grubenv create
 // Set variables:
grub-editenv /mnt/boot/EFI/BOOT/grubenv set ORDER="A B"
grub-editenv /mnt/boot/EFI/BOOT/grubenv set A_OK=1
grub-editenv /mnt/boot/EFI/BOOT/grubenv set A_TRY=1
grub-editenv /mnt/boot/EFI/BOOT/grubenv set B_OK=0
grub-editenv /mnt/boot/EFI/BOOT/grubenv set B_TRY=0