Grub update wrong path can't change

when i use grub-editenv, there always error wrong file ‘//boot/grub/grubenv.new’.
i can’t find the grub config file and delete the ’/‘ with right file ‘/boot/grub/grubenv.new’,so what do i do. thanks for your help.

Have you heard of XY problems?

Be sure that this is not that.

man grub-editenv
or
grub-editenv --help
tells that there is no “delete” - remove the file

It is created from what is in /etc/default/grub

If you insist on editing it - list the values, then remove the file, then set the variables again

for example:

grub-editenv /boot/grub/grubenv list

menu_auto_hide=1
boot_success=1
saved_entry=gnulinux-simple-704bc629-68c8-4d64-945a-7d808b904809

… save the text somewhere, remove the file and set the variables correctly using the saved values


also be sure that it even makes sense to try and use:
/boot/grub/grubenv.new

the only file I have is:
/boot/grub/grubenv
and I never needed to touch it.

1 Like