One of the things in Ubuntu that has always driven me crazy is the addition of new items into the grub menu without removing the old entries that likely don’t even work anymore. I’m sure most experienced Ubuntu users already know how to do this, but here’s the method anyway.

Ubuntu中一直令我着迷的一件事是在grub菜单中添加了新项目,而没有删除可能甚至无法使用的旧条目。 我敢肯定,大多数经验丰富的Ubuntu用户已经知道如何执行此操作,但是无论如何,这就是方法。

Important: If you’re using a newer version of Ubuntu with grub 2 (like Ubuntu 9.10 or later), you’ll need to read about how to clean up the New boot menu instead.

重要提示:如果您正在使用带有grub 2的较新版本的Ubuntu(例如Ubuntu 9.10或更高版本),则需要阅读有关如何清理New boot菜单的信息

I just installed this box recently, and then did an upgrade…. already there are 7 items in the menu.

我最近刚刚安装了此盒子,然后进行了升级…。 菜单中已经有7个项目。

升级后清理Ubuntu Grub引导菜单

To remove these entries, we’ll need to edit the file /boot/grub/menu.lst. You can do this by using Alt+F2 and then typing in the following command:

要删除这些条目,我们需要编辑文件/boot/grub/menu.lst。 您可以使用Alt + F2,然后输入以下命令来执行此操作:

gksu gedit /boot/grub/menu.lst

gksu gedit /boot/grub/menu.lst

升级后清理Ubuntu Grub引导菜单

Now that we’ve got the file open, scroll down to the bottom of the file where it says “End Default Options”, and you’ll find all the menu entries for the various kernels in here. You can just select and delete the ones you don’t want.

现在我们已经打开了文件,向下滚动到文件底部,显示“ End Default Options”,然后您将在此处找到各个内核的所有菜单项。 您可以选择并删除不需要的内容。

升级后清理Ubuntu Grub引导菜单

Save the file, and then the next time you boot up you’ll see a much nicer set of options.

保存文件,然后在下次启动时,会看到一组更好的选项。

升级后清理Ubuntu Grub引导菜单

I’m guessing it would also be prudent to clean up the other unused kernel files that are sitting out there… I’m sure there’s some automated tool to do that, but I’ve not taken the time to figure it out yet.

我猜想清理坐在那里的其他未使用的内核文件也是明智的……我确定有一些自动工具可以做到这一点,但是我还没有花时间来弄清楚它。

翻译自: https://www.howtogeek.com/howto/ubuntu/clean-up-ubuntu-grub-boot-menu-after-upgrades/

相关文章:

  • 2022-12-23
  • 2021-05-17
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-09
猜你喜欢
  • 2022-01-10
  • 2021-08-20
  • 2021-09-09
  • 2021-10-17
  • 2022-12-23
  • 2021-11-25
  • 2021-08-18
相关资源
相似解决方案