Skip to content

[Solved] Error: invalid environment block. Press any key to continue...

Last Updated on 2021-06-16 by Clay

Today after I restart my computer, a mysterious error occur: "Error: invalid environment block. Press any key to continue…". The most tragic is, after I press any key, the system is no-response, it was die.

After I search some solution on internet, I found many people say I need to key in the terminal instructions. My God.

To solve this problem, I use the "Ubuntu Live USB" and enter the Ubuntu environment and I can use terminal! (maybe you can refer "A simple note to Make a Ubuntu 18.04 Live USB").

If you can key in instructions in black window, you will not be so troublesome.


Solution

If you also use Ubuntu Live USB to enter the Ubuntu desktop environment to open the terminal, now, you need to mount your boot disk.

And then, get the sudo permission:

sudo -i

Use the following instructions to try to fix grub (the path is the boot disk you mount):

cd /boot/grub
rm grubenv
grub-editenv grubenv create
grub-editenv grubenv set default=0
grub-editenv grubenv list
update-grub
reboot

The above instructions have been learned from StackExchange, and I have confirmed that using Ubuntu Live USB can also be used successfully.


References

Tags:

5 thoughts on “[Solved] Error: invalid environment block. Press any key to continue...”

Leave a ReplyCancel reply

Exit mobile version