Redundant directories & files in ESP?
Posted: Sat May 11, 2024 1:35 am
Lately I've been refamiliarising myself with BIU to prepare to install Ubuntu 24.04 LTS.
My BIU augmented system has been working A-OK since installing Win10 and Ubuntu 18.04 in 2019. In 2020 I reinstalled the Ubuntu 18.04 OS and added Ubuntu 20.04. There are, however, a few points of curiosity.
Over time new directories were added to the ESP when updates were applied to the Ubuntu installations, especially with Ubuntu 20.04 since it was the OS used for the lion's share of my computing needs. On most occasions when I saw new Linux headers appear in terminal output when running:
sudo apt update && sudo apt upgrade
... new Ubuntu boot items would subsequently appear BIU's boot menu window.
In the directory efi/EFI/BOOT/ there ended up being many ubuntu.nnn files (nnn = numerals). But there were only two Ubuntu OSs installed. The system had directories labelled ubuntu.001 all the way up to something like ubuntu.025.
A long while ago, after backing up the ESP I deleted most of the extra directories. Both Ubuntu 18.04 and Ubuntu 20.04 continued to boot normally from BIU from the respective boot items (two each - one by me, other by install process) that had been created during installation.
A similar thing has occurred with MS Windows. Win10 was the first OS installed to the system. Initially in efi/EFI/BOOT/ there was only Microsoft.001. Following system upgrade to Win11 in 2023 Microsoft.002 appeared as well. The Windows installation booted normally from both of these directories and their associated BIU boot items. Yesterday I upgraded Win11 to version 23H2 and Microsoft.003 appeared.
After removing Microsoft.003 from the efi/EFI/BOOT/ directory the system continued to boot normally from boot items linked to the other two Microsoft boot directories.
Since building this system with BIU I did not access directory efi/EFI/BOOT/ until yesterday. It contains a collection of files that seem to be related to Ubuntu installations. Filenames are as follows:
- BOOTX64.nnn - numbers 000 up to 025; sizes were initially 1.3MB, 960kB after March 2023.
- BOOTX64.EFI - only one instance.
- fbx64.nnn - numbers 000 up to 024; sizes initially 1.2MB, 88kB after Aug 2021.
- mmx64.efi - only one instance, 860kB.
- SHIMX64.DAT - only one instance, 860kB.
The two Ubuntu OSs were installed using an unorthodox method. Instead of directing the Ubuntu installer to put the boot loader into the ESP I pointed it to / (root). The method is outlined in this post:
viewtopic.php?p=18914#p18914
As Brian K noted at the time, the boot loader was still placed in the ESP. While my unorthodox intstallation routine produced a bootable OS Brian noted that it doesn't work if Secure Boot is enabled.
IIRC new Ubuntu boot items appeared in BIU's boot menu after Linux headers were updated. BIU usually needed to be reactivated following updates that included Linux headers.
With so many new Ubuntu boot items appearing in BIU I began to think my unorthodox installation method might have been the cause. Is that possible or is this expected behaviour?
For the installation of Ubuntu 24.04 I intend to follow an orthodox installation using BIU and direct the Ubuntu installer to place boot loader in ESP. This OS will be installed to the partition presently occupied by Ubuntu 18.04.
Are the multiple BOOTX64.nnn and fbx64.nnn files superfluous and redundant? Will it be safe to delete them too?
My aim is to tidy up ESP directories as much as possible while still being able to boot Win11, Ubuntu 20.04, the new Ubuntu 24.04, and the old Ubuntu 18.04 should the unlikely need arise to restore it.
Guidance and advice will be appreciated.
My BIU augmented system has been working A-OK since installing Win10 and Ubuntu 18.04 in 2019. In 2020 I reinstalled the Ubuntu 18.04 OS and added Ubuntu 20.04. There are, however, a few points of curiosity.
Over time new directories were added to the ESP when updates were applied to the Ubuntu installations, especially with Ubuntu 20.04 since it was the OS used for the lion's share of my computing needs. On most occasions when I saw new Linux headers appear in terminal output when running:
sudo apt update && sudo apt upgrade
... new Ubuntu boot items would subsequently appear BIU's boot menu window.
In the directory efi/EFI/BOOT/ there ended up being many ubuntu.nnn files (nnn = numerals). But there were only two Ubuntu OSs installed. The system had directories labelled ubuntu.001 all the way up to something like ubuntu.025.
A long while ago, after backing up the ESP I deleted most of the extra directories. Both Ubuntu 18.04 and Ubuntu 20.04 continued to boot normally from BIU from the respective boot items (two each - one by me, other by install process) that had been created during installation.
A similar thing has occurred with MS Windows. Win10 was the first OS installed to the system. Initially in efi/EFI/BOOT/ there was only Microsoft.001. Following system upgrade to Win11 in 2023 Microsoft.002 appeared as well. The Windows installation booted normally from both of these directories and their associated BIU boot items. Yesterday I upgraded Win11 to version 23H2 and Microsoft.003 appeared.
After removing Microsoft.003 from the efi/EFI/BOOT/ directory the system continued to boot normally from boot items linked to the other two Microsoft boot directories.
Since building this system with BIU I did not access directory efi/EFI/BOOT/ until yesterday. It contains a collection of files that seem to be related to Ubuntu installations. Filenames are as follows:
- BOOTX64.nnn - numbers 000 up to 025; sizes were initially 1.3MB, 960kB after March 2023.
- BOOTX64.EFI - only one instance.
- fbx64.nnn - numbers 000 up to 024; sizes initially 1.2MB, 88kB after Aug 2021.
- mmx64.efi - only one instance, 860kB.
- SHIMX64.DAT - only one instance, 860kB.
The two Ubuntu OSs were installed using an unorthodox method. Instead of directing the Ubuntu installer to put the boot loader into the ESP I pointed it to / (root). The method is outlined in this post:
viewtopic.php?p=18914#p18914
As Brian K noted at the time, the boot loader was still placed in the ESP. While my unorthodox intstallation routine produced a bootable OS Brian noted that it doesn't work if Secure Boot is enabled.
IIRC new Ubuntu boot items appeared in BIU's boot menu after Linux headers were updated. BIU usually needed to be reactivated following updates that included Linux headers.
With so many new Ubuntu boot items appearing in BIU I began to think my unorthodox installation method might have been the cause. Is that possible or is this expected behaviour?
For the installation of Ubuntu 24.04 I intend to follow an orthodox installation using BIU and direct the Ubuntu installer to place boot loader in ESP. This OS will be installed to the partition presently occupied by Ubuntu 18.04.
Are the multiple BOOTX64.nnn and fbx64.nnn files superfluous and redundant? Will it be safe to delete them too?
My aim is to tidy up ESP directories as much as possible while still being able to boot Win11, Ubuntu 20.04, the new Ubuntu 24.04, and the old Ubuntu 18.04 should the unlikely need arise to restore it.
Guidance and advice will be appreciated.