You are not logged in.

#1 2022-06-01 18:27:26

sarch2022
Member
Registered: 2022-05-13
Posts: 13

efi mount point is full of files. how can i tell what is not needed?

Hi, i have had Arch installed for a while and have messed the boot loader up a few times along the way and i have also removed other no longer in use OS's and i'm looking to remove some folders/files from the EFI to keep it clean

here is my mount point for the EFI - /Dev/sdc1 /boot/efi

and here is what i ran to install grub

grub-install --efi-directory=/boot/efi --target=x86_64-efi /dev/sdc

if i run

find ./ -type d -ls

i get the following -

  525313      4 drwxr-xr-x   4 root     root         4096 Jun  1 19:01 ./
  5396698      4096 May 25 23:40 ./grub
  5398412      4096 Feb 16 10:25 ./grub/themes
  5398416      4096 Sep 23  2021 ./grub/themes/starfield
  5398415      4096 Feb 16 10:25 ./grub/themes/Vimix
  5398417      4096 Feb 16 10:25 ./grub/themes/Vimix/icons
  5398411      4096 Jun  1 18:41 ./grub/locale
  5398414      4096 Sep 23  2021 ./grub/fonts
  5398413     20480 Jun  1 18:41 ./grub/x86_64-efi
        1      4 drwxr-xr-x   4 root     root         4096 Jan  1  1970 ./efi
        3      4 drwxr-xr-x   7 root     root         4096 Jun  1 18:21 ./efi/EFI
        5      4 drwxr-xr-x   2 root     root         4096 Dec  8 09:18 ./efi/EFI/Boot
        7      4 drwxr-xr-x   2 root     root         4096 Dec  6 11:29 ./efi/EFI/arch
       10      4 drwxr-xr-x   2 root     root         4096 Sep 23  2021 ./efi/EFI/grub_uefi
        6      4 drwxr-xr-x   3 root     root         4096 May 31 22:50 ./efi/EFI/EFI
       42      4 drwxr-xr-x   2 root     root         4096 May 31 22:50 ./efi/EFI/EFI/arch
        8      4 drwxr-xr-x   2 root     root         4096 May 31 23:06 ./efi/EFI/grub
        4      4 drwxr-xr-x   7 root     root         4096 May 26 23:19 ./efi/grub
       29      4 drwxr-xr-x   2 root     root         4096 May 25 22:16 ./efi/grub/fonts
       30      4 drwxr-xr-x   2 root     root         4096 May 25 22:19 ./efi/grub/i386-pc
       31      8 drwxr-xr-x   2 root     root         8192 May 31 22:50 ./efi/grub/locale
       32      4 drwxr-xr-x   3 root     root         4096 May 25 22:16 ./efi/grub/themes
      369      4 drwxr-xr-x   2 root     root         4096 May 25 22:16 ./efi/grub/themes/starfield
       33     40 drwxr-xr-x   2 root     root        40960 May 31 22:50 ./efi/grub/x86_64-efi 

there seems to be multiple grub folders and multiple folders in /boot/efi such as Boot, arch, grub_uefi, grub.

do i need all these or have i duplicated them by reinstalling the boot loader so many times? its mostly the /efi/EFI folder i'm concerned about

if i can remove any how can i figure out what folders are in use and what ones aren't?

Thanks!

Last edited by sarch2022 (2022-06-01 18:30:38)

Offline

#2 2022-06-01 18:45:20

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,285

Re: efi mount point is full of files. how can i tell what is not needed?

In which dir did you run that find command?

The only thing you actually need with a GRUB installed this way (fwiw passing an actual disk device is not needed but will hopefully not have done anything due to the target line) is /boot/efi/EFI/GRUB/grubx64.efi (vfat doesn't have case sensitivity so in your case  the EFI/grub seems lowercase, and /boot/grub/ ( and the contents therein, which should be a directory on your root partition and not the ESP).

Assuming you ran that from /boot, remove everything under ./efi except for ./efi/EFI/Boot and ./efi/EFI/grub. FWIW the worst that can happen is that you kill your grub in which case you can just install it again, so if you want to be sure sure you could also just nuke everything under /boot/efi.

Offline

#3 2022-06-01 19:02:13

sarch2022
Member
Registered: 2022-05-13
Posts: 13

Re: efi mount point is full of files. how can i tell what is not needed?

Thanks for the info and i did run the command from /boot. ill have a go at removing some of the folders now.
there are also 6 kernel files in my /boot and the exact same files in /boot/efi would these also be safe to remove 3 of them are have "fallback" at the end in both directorys if that makes any difference?

Offline

Board footer

Powered by FluxBB