栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 系统运维 > 运维 > Linux

解决Linux开机提示 error: environment block too small

Linux 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

解决Linux开机提示 error: environment block too small

系统环境:
[OS]: Ubuntu 22.04 LTS

1. 问题 error: environment block too small.

很多时候我们需要修改 Linux 系统的启动项或者 Command line 来达到在系统启动前才能完成的一些操作。而这些操作大多是与内存相关,因此会经常导致出现这样的局面。
当我们修改完 Command line 后保存并执行 reboot 命令重启发现会有这样一句错误提示,“error: environment block too small.”,出现这个则说明修改的部分导致启动环境检测到内存分配的较小。然后开局就报错,这可咋整!

2. 解决

我们可以通过恢复启动环境来消除该错误。事实上通过以下方法同样可以解决启动时报错 “Error: invalid environment block.” 这个问题。

imaginemiracle:~$ cd /boot/grub/
imaginemiracle:grub$ sudo rm grubenv 
imaginemiracle:grub$ sudo grub-editenv grubenv create
imaginemiracle:grub$ sudo grub-editenv grubenv set default=0
imaginemiracle:grub$ sudo grub-editenv grubenv list
default=0
imaginemiracle:grub$ sudo update-grub
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.15.0-33-generic
Found initrd image: /boot/initrd.img-5.15.0-33-generic
Found linux image: /boot/vmlinuz-5.15.0-25-generic
Found initrd image: /boot/initrd.img-5.15.0-25-generic
Found memtest86+ image: /boot/memtest86+.elf
Found memtest86+ image: /boot/memtest86+.bin
Warning: os-prober will not be executed to detect other bootable partitions.
Systems on them will not be added to the GRUB boot configuration.
Check GRUB_DISABLE_OS_PROBER documentation entry.
done
3. 重启,问题解决!
转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/945664.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号