/ wtfudge wednesday

WTFudge Wednesday - Linux Boot Error: environment block too small

This is more an aide-memoire for me as I just had this error. But I thought that sharing it as a blog post would be handy just in case anyone else gets the issue.

So what happened?

My laptop just errored on boot.
The first error prevented the laptop booting and referred to a missing kernel.
The second error referred to

Error: environment block too small
Press any key to continue...

Laptop Details

Teclast F7
Ubuntu 18.04.2 x86_64

The issue?

So after a little Googling I found the cause of the issue. It seems that if the grubenv file is greater that 1024 bytes then the error will occurr. Typically this is caused by manually editing the file, but I have not done this so I guess an update has caused this issue.

The fix?

I can get past the error by pressing any key and with a little patience the system will boot as normal.

Warning: we are messing around with config files which may render your computer non bootable. Ensure you have backups, or a care free attitude to life. Do not try and blame me for data loss. You typed the commands in, not me!

Then I opened a terminal and did the following.

Delete the grubenv

sudo rm /boot/grub/grubenv

Create a new grubenv

sudo grub-editenv /boot/grub/grubenv create

I then rebooted and the error was gone :)

And all of this happened as I was drinking my first coffee!