警告:当设置了 GRUB_HIDDEN_TIMEOUT 时,不再支持将 GRUB_TIMEOUT 设置为非零值。Ubuntu 16.04.5

警告:当设置了 GRUB_HIDDEN_TIMEOUT 时,不再支持将 GRUB_TIMEOUT 设置为非零值。Ubuntu 16.04.5
$ sudo apt-get install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  linux-headers-4.15.0-29 linux-headers-4.15.0-29-generic
  linux-image-4.15.0-29-generic linux-modules-4.15.0-29-generic
  linux-modules-extra-4.15.0-29-generic
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 7 not upgraded.

~$ sudo apt autoremove
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be REMOVED:
  linux-headers-4.15.0-29 linux-headers-4.15.0-29-generic
  linux-image-4.15.0-29-generic linux-modules-4.15.0-29-generic
  linux-modules-extra-4.15.0-29-generic
0 upgraded, 0 newly installed, 5 to remove and 7 not upgraded.
After this operation, 336 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 284481 files and directories currently installed.)
Removing linux-headers-4.15.0-29-generic (4.15.0-29.31~16.04.1) ...
Removing linux-headers-4.15.0-29 (4.15.0-29.31~16.04.1) ...
Removing linux-modules-extra-4.15.0-29-generic (4.15.0-29.31~16.04.1) ...
Removing linux-image-4.15.0-29-generic (4.15.0-29.31~16.04.1) ...
I: /vmlinuz.old is now a symlink to boot/vmlinuz-4.15.0-32-generic
I: /initrd.img.old is now a symlink to boot/initrd.img-4.15.0-32-generic
/etc/kernel/postrm.d/initramfs-tools:
update-initramfs: Deleting /boot/initrd.img-4.15.0-29-generic
/etc/kernel/postrm.d/zz-update-grub:
Generating grub configuration file ...
Warning: Setting GRUB_TIMEOUT to a non-zero value when GRUB_HIDDEN_TIMEOUT is set is no longer supported.
Found linux image: /boot/vmlinuz-4.15.0-33-generic
Found initrd image: /boot/initrd.img-4.15.0-33-generic
Found linux image: /boot/vmlinuz-4.15.0-32-generic
Found initrd image: /boot/initrd.img-4.15.0-32-generic
Adding boot menu entry for EFI firmware configuration
done

我该怎么做才能修复这个错误?

答案1

您看到的只是一个警告。这意味着它只是表明默认配置设置了一个选项,而另一个选项已设置,并且它不执行任何操作。

这里没有错误。 您可以从现在起忽略警告,直到永远,这都无关紧要。

这并不意味着有任何东西损坏,它只是一个关于某些功能不再受支持的警告消息,但它不会破坏您的系统或导致问题。

答案2

@ThomasWard 说得对,这只是一个警告,可以忽略。如果您想消除该警告,请将以下内容复制并粘贴到终端窗口:

sudo sed -i 's/GRUB_HIDDEN_TIMEOUT=0/#GRUB_HIDDEN_TIMEOUT=0/' /etc/default/grub
sudo update-grub

从现在起,该警告应该会消失。

相关内容