Should I delete /boot/grub folder after installing UEFI?

I followed successfully UEFI - Install Guide and I added /boot/efi to /etc/fstab.

At the moment I have two entries when booting
https://i.imgur.com/uLSf508.jpg

and my /boot folder looks like this:
https://i.imgur.com/xOBJXuS.png

I know that to remove entry from BIOS I need to edit efibootmgr. But do I need to uninstall anything or remove old configuration in any file to make sure kernels and my system updates properly?

Does editing efibootmgr (adding or removing entries) affects other configuration files, like grub.cfg or anything? Should I delete /boot/grub folder?

No. update-grub should be enough.

No, it only affects /boot/efi.

Only if you switch from BIOS/CSM to UEFI or vice versa. So remove this folder and run grub-install + all other parameters, which will recreate this folder.

I want to abandon Legacy/CSM completly and prepare my system to run on a new motherboard UEFI only.

Do you mean repeat this command:
sudo grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=manjaro --recheck

Hmm. I though grub folder is redundant if EFI partition is mounted to efi folder.

Will it recreate it with different configuration?

No — you are getting a few things mixed up.

GRUB is your boot loader. It loads the Linux kernel into memory, and it can also boot other operating systems.

The UEFI boot manager is part of the UEFI firmware. It works at a lower level and is intended to allow you to boot the computer from different storage media.

1 Like

In general, yes.

No. Grub places an EFI file on the EFI partition, which is like the MBR on BIOS. The UEFI Bootloader will load it and switch to the Grub Bootloader.

No. update-grub will create a new configuration grub.cfg.

2 Likes

The /boot/grub folder is needed! What may be redundant (i am not sure) might be the grub subfolder under EFI. My guess is it is a remnant of another previously installed linux distro.

BTW at least by me, i tried deleting an old ubuntu boot entry with efibootmgr and is was recreated from the firmware on reboot. I had to mount the EFI partition and delete the ubuntu subfolder, then the boot entry was removed automatically without the need of efibootmgr commands.

p.s. if you decide to play with the efi partition (i am not responsible if you break your system)

  1. open gparted and see which one it is, mine was nvme0n1p1
  2. sudo mount -t vfat /dev/nvme0n1p1 ~/myefi
  3. open thunar (maybe with root) and do what you want to do, like backing up and deleting
  4. sudo umount ~/myefi
1 Like

For reference, here is how mine looks - manjaro, Win11, and insyde is i do not know what, i guess firmware update tool from lenovo. Ubuntu is alredy deleted, so the other boot entry should also be manufacturer related like memtest or something.

p.s. and if you mess manjaro bootloader, restoring guide is here

2 Likes

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.