Re: grub2-editenv: error: environment block too small after kernel install

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Apr 23, 2019 at 7:20 PM Chris Murphy <lists@xxxxxxxxxxxxxxxxx> wrote:
On Tue, Apr 23, 2019 at 8:38 AM Richard Shaw <hobbes1069@xxxxxxxxx> wrote:
>
> I made the mistake of editing my grubenv while converting my system from BIOS to UEFI.
>
> I have since manually used grub2-editenv successfully but I still get "grub2-editenv: error: environment block too small." on kernel upgrades. I've even tried manually re-padding the file with # to get to 1024 bytes.
>
> I have also filed and issue upstream that grub2-editenv is too fragile. It should be able to automatically re-pad the file to 1024 bytes.
>
> How do I "fix" this?

Is it really 1024 bytes?
# stat /boot/efi/EFI/fedora/grubenv

# stat /boot/efi/EFI/fedora/grubenv
  File: /boot/efi/EFI/fedora/grubenv
  Size: 1024            Blocks: 8          IO Block: 4096   regular file
Device: 10301h/66305d   Inode: 299         Links: 1
Access: (0700/-rwx------)  Uid: (    0/    root)   Gid: (    0/    root)
Context: system_u:object_r:dosfs_t:s0
Access: 2019-04-22 19:00:00.000000000 -0500
Modify: 2019-04-23 09:29:08.000000000 -0500
Change: 2019-04-23 09:29:09.510000000 -0500

 
I'm not exactly sure when we started doing this, but..

# ls -ls /boot/grub2
total 4
4 lrwxrwxrwx. 1 root root 25 Apr 18 11:34 grubenv -> ../efi/EFI/fedora/grubenv

It's actually a symlink on both BIOS and UEFI. This file will be on
the /boot volume (typically ext4) on BIOS systems, and it will be on
the EFI System partition (FAT16 if anaconda creates it) on UEFI. But
if you did a conversion from BIOS to UEFI, it's possible this symlink
is broken and that's why you're getting the error.

I reinstalled all the efi related packages so things would get "created" properly.

# file grub2/grubenv
grub2/grubenv: symbolic link to ../efi/EFI/fedora/grubenv

# parted -l | grep EFI
 1      1049kB  211MB   210MB   fat16        EFI System Partition  boot, esp


If the real grub env on /boot/efi doesn't actually exist then you
might need to do:

#grub2-editenv /boot/efi/EFI/fedora/grubenv create

I may move mine to a backup and try that anyway.

Thanks,
Richard
_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Users]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]

  Powered by Linux