3

I've recently installed Manjaro on my PC. I booted, installed and updated my operating system.

However when I boot my computer after the updates I get below error:

 error: invalid environment block
 Press any key to continue

My PC then hangs on a black screen

I've read about several people who have has this error and the common answer is "delete save_env recordfail" but I have no such line.

Does anybody know why this happened? How can I fix this?

telcoM
  • 87,318
  • 3
  • 112
  • 232
user11376058
  • 31
  • 1
  • 3

1 Answers1

2

The error message might refer to GRUB2 environment block, located usually in /boot/grub/grubenv. It should contain readable text, so have a look at it.

Hanging on black screen might be caused by many things. Perhaps your distribution sets up GRUB in such a way that some essential setting is stored in the environment block, and the problem in the environment block also causes the boot to fail. Or perhaps it's caused by something different, like BIOS detecting the disks in a different order than expected by the grub-install program.

The updates to the Manjaro OS may have included an update to GRUB, causing it to automatically re-install it. If you had to do any special steps in installing GRUB when you originally installed Manjaro, you may have to do them again now.

Or if you added any new disks to the system after installing the OS and updating it, you might not originally have needed any special steps, but might need them now... and that could be what tripped up the automatic update.

If your system uses classic BIOS rather than the new UEFI firmware, the root cause is likely the fact that there is no guaranteed way for the OS to identify the disks that would be meaningful to the BIOS. Without further information from the system administrator, the grub-install command will have to essentially guess in which order the BIOS will detect the disks at boot time.

If the /boot/grub/device.map file exists, it describes the current information/guess GRUB has on the BIOS boot order; if you add/remove/change disks on the system, you should also update this file to match the new state, or else an automatic GRUB update might cause exactly the kind of situation you're experiencing right now. To fix, correct the current device.map file to match how your BIOS actually sees the disks, then use grub-install to reinstall GRUB.

telcoM
  • 87,318
  • 3
  • 112
  • 232