Error regenerating kernel via `dracut`

I was once again trying to solve this issue with the provided solution.

sudo su
dracut -f --regenerate-all

But not I got this

/etc/dracut.conf.d/facetimehd.conf: line 1: /usr/lib/firmware/facetimehd/firmware.bin: Permission denied
/etc/dracut.conf.d/facetimehd.conf: line 1: /usr/lib/firmware/facetimehd/firmware.bin: Permission denied
/etc/dracut.conf.d/facetimehd.conf: line 1: /usr/lib/firmware/facetimehd/firmware.bin: Permission denied
/etc/dracut.conf.d/facetimehd.conf: line 1: /usr/lib/firmware/facetimehd/firmware.bin: Permission denied
dracut[F]: Can't write to /boot/efi/86450415b918464bbe12bdbae2867b4b/6.15.9-201.fc42.x86_64: Directory /boot/efi/86450415b918464bbe12bdbae2867b4b/6.15.9-201.fc42.x86_64 does not exist or is not accessible.

The facetime thng was there before and it doesn’t seem to matter. But now there’s this Can't write error. How should I fix this?

Make sure it isn’t full or read only.

You can check both with:

  • df -h /boot/efi
  • findmnt /boot/efi
df -h /boot/efi
Filesystem      Size  Used Avail Use% Mounted on
/dev/nvme0n1p1  599M   20M  580M   4% /boot/efi

findmnt /boot/efi
TARGET    SOURCE         FSTYPE OPTIONS
/boot/efi /dev/nvme0n1p1 vfat   rw,relatime,fmask=0077,dmask=0077,codepage=437,iocharset=ascii,shortname=winnt,errors=remount-ro

On a default Fedora system, dracut shouldn’t be writing anything to /boot/efi, only to /boot.

So (unless you’ve intentionally set up systemd-boot) something is wrong here.

My guess is it may relate to this issue: F39 kernels fail to install when /boot/efi/$machineid is present

Can you run tree /boot/efi and we can see what is in there? This may give some pointers to the issue.

tree /boot/efi
/boot/efi  [error opening dir]

0 directories, 1 file

Try it with sudo if you got β€œ[error opening dir]”

/boot/efi
β”œβ”€β”€ EFI
β”‚   β”œβ”€β”€ BOOT
β”‚   β”‚   β”œβ”€β”€ BOOTIA32.EFI
β”‚   β”‚   β”œβ”€β”€ BOOTX64.EFI
β”‚   β”‚   β”œβ”€β”€ fbia32.efi
β”‚   β”‚   └── fbx64.efi
β”‚   └── fedora
β”‚       β”œβ”€β”€ BOOTIA32.CSV
β”‚       β”œβ”€β”€ BOOTX64.CSV
β”‚       β”œβ”€β”€ gcdia32.efi
β”‚       β”œβ”€β”€ gcdx64.efi
β”‚       β”œβ”€β”€ grub.cfg
β”‚       β”œβ”€β”€ grubia32.efi
β”‚       β”œβ”€β”€ grubx64.efi
β”‚       β”œβ”€β”€ mmia32.efi
β”‚       β”œβ”€β”€ mmx64.efi
β”‚       β”œβ”€β”€ shim.efi
β”‚       β”œβ”€β”€ shimia32.efi
β”‚       └── shimx64.efi
β”œβ”€β”€ mach_kernel
└── System
    └── Library
        └── CoreServices
            └── SystemVersion.plist

7 directories, 18 files

Thanks! So this is not the same as the issue I suspected and linked to. You don’t seem to have anything extraneous currently in your /boot/efi but for some reason dracut is trying to write new data there.

I’m not 100% sure the right next step to investigate, but could you try sudo kernel-install? This lists some of the relevant configuration around installing kernels so it might show up anything else that’s weird.

sudo kernel-install
        Machine ID: 86450415b918464bbe12bdbae2867b4b
 Kernel Image Type: pe
            Layout: other
         Boot Root: /boot
  Entry Token Type: machine-id
       Entry Token: 86450415b918464bbe12bdbae2867b4b
   Entry Directory: /boot/86450415b918464bbe12bdbae2867b4b/6.15.10-200.fc42.x86_64
    Kernel Version: 6.15.10-200.fc42.x86_64
            Kernel: /usr/lib/modules/6.15.10-200.fc42.x86_64/vmlinuz
           Initrds: (unset)                                                       
  Initrd Generator: (unset)                                                       
     UKI Generator: (unset)                                                       
           Plugins: /usr/lib/kernel/install.d/10-devicetree.install
                    /usr/lib/kernel/install.d/20-grub.install
                    /usr/lib/kernel/install.d/40-dkms.install
                    /usr/lib/kernel/install.d/50-depmod.install
                    /usr/lib/kernel/install.d/50-dracut.install
                    /usr/lib/kernel/install.d/51-dracut-rescue.install
                    /usr/lib/kernel/install.d/60-kdump.install
                    /usr/lib/kernel/install.d/90-loaderentry.install
                    /usr/lib/kernel/install.d/90-uki-copy.install
                    /usr/lib/kernel/install.d/92-crashkernel.install
                    /usr/lib/kernel/install.d/92-tuned.install
                    /usr/lib/kernel/install.d/95-kernel-hooks.install
                    /usr/lib/kernel/install.d/99-grub-mkconfig.install
Plugin Environment: LC_COLLATE=C.UTF-8
                    KERNEL_INSTALL_VERBOSE=0
                    KERNEL_INSTALL_IMAGE_TYPE=pe
                    KERNEL_INSTALL_MACHINE_ID=86450415b918464bbe12bdbae2867b4b
                    KERNEL_INSTALL_ENTRY_TOKEN=86450415b918464bbe12bdbae2867b4b
                    KERNEL_INSTALL_BOOT_ROOT=/boot
                    KERNEL_INSTALL_LAYOUT=other
                    KERNEL_INSTALL_INITRD_GENERATOR=
                    KERNEL_INSTALL_UKI_GENERATOR=
                    KERNEL_INSTALL_STAGING_AREA=/tmp/kernel-install.staging.XXXXXX
  Plugin Arguments: add|remove
                    6.15.10-200.fc42.x86_64
                    /boot/86450415b918464bbe12bdbae2867b4b/6.15.10-200.fc42.x86_64
                    /usr/lib/modules/6.15.10-200.fc42.x86_64/vmlinuz
                    [INITRD...]

Thanks. That looks normal and I’m afraid I can’t see what’s wrong :slightly_frowning_face:

The mystery is still this:

dracut[F]: Can't write to /boot/efi/86450415b918464bbe12bdbae2867b4b/6.15.9-201.fc42.x86_64: Directory /boot/efi/86450415b918464bbe12bdbae2867b4b/6.15.9-201.fc42.x86_64 does not exist or is not accessible.

Dracut shouldn’t be attempting to write there, or anywhere on /boot/efi.

I wonder if there is a very old (rescue?) kernel. file /boot/vm* will tell us about the installed kernels

file /boot/vm*
/boot/vmlinuz-0-rescue-86450415b918464bbe12bdbae2867b4b: Linux kernel x86 boot executable, bzImage, version 6.11.4-301.fc41.x86_64 (mockbuild@9b6b61418589428cb880a7020233b56f) #1 SMP PREEMPT_DYNAMIC Sun Oct 20 15:02:33 UTC 2024, RO-rootFS, Normal VGA, setup size 512*39, syssize 0xf8520, jump 0x26c 0x8cd88ec0fc8cd239 instruction, protocol 2.15, from protected-mode code at offset 0x2cc 0xf4dd2d bytes ZST compressed, relocatable, handover offset 0xf72130, legacy 64-bit entry point, can be above 4G, 32-bit EFI handoff entry point, 64-bit EFI handoff entry point, EFI kexec boot support, xloadflags bit 5, max cmdline size 2047, init_size 0x44be000
/boot/vmlinuz-6.15.10-200.fc42.x86_64:                   Linux kernel x86 boot executable, bzImage, version 6.15.10-200.fc42.x86_64 (mockbuild@14a33d64645143cab3659d1335d9f80c) #1 SMP PREEMPT_DYNAMIC Fri Aug 15 15:57:06 UTC 2025, RO-rootFS, Normal VGA, setup size 512*39, syssize 0x10b320, jump 0x26c 0x8cd88ec0fc8cd239 instruction, protocol 2.15, from protected-mode code at offset 0x2cc 0x107a8c1 bytes ZST compressed, relocatable, handover offset 0x10a40a0, legacy 64-bit entry point, can be above 4G, 32-bit EFI handoff entry point, 64-bit EFI handoff entry point, EFI kexec boot support, xloadflags bit 5, max cmdline size 2047, init_size 0x46d9000
/boot/vmlinuz-6.15.8-200.fc42.x86_64:                    Linux kernel x86 boot executable, bzImage, version 6.15.8-200.fc42.x86_64 (mockbuild@93f30e7b946b413d81e83e0dc19ac3a8) #1 SMP PREEMPT_DYNAMIC Thu Jul 24 13:26:52 UTC 2025, RO-rootFS, Normal VGA, setup size 512*39, syssize 0x10b120, jump 0x26c 0x8cd88ec0fc8cd239 instruction, protocol 2.15, from protected-mode code at offset 0x2cc 0x107964c bytes ZST compressed, relocatable, handover offset 0x10a2c90, legacy 64-bit entry point, can be above 4G, 32-bit EFI handoff entry point, 64-bit EFI handoff entry point, EFI kexec boot support, xloadflags bit 5, max cmdline size 2047, init_size 0x46d8000

There is another report with dracut trying to use /boot/efi/<machine id> on a system that previously used arch linux with systemd-boot.

I would not trust output of kernel-install. On my system, it shows Boot_Root as /boot/efi but kernels and initramfs are def. in /boot not /boot/efi!
No idea why it reports /boot/efi

# kernel-install 
        Machine ID: 567c7e0e03b242e4b5d672cc22fffe54
 Kernel Image Type: pe
            Layout: other
         Boot Root: /boot/efi
  Entry Token Type: machine-id
       Entry Token: 567c7e0e03b242e4b5d672cc22fffe54
   Entry Directory: /boot/efi/567c7e0e03b242e4b5d672cc22fffe54/6.16.3-200.fc42.x86_64
    Kernel Version: 6.16.3-200.fc42.x86_64
            Kernel: /usr/lib/modules/6.16.3-200.fc42.x86_64/vmlinuz
           Initrds: (unset)                                                          
  Initrd Generator: (unset)                                                          
     UKI Generator: (unset)                                                          
           Plugins: /usr/lib/kernel/install.d/10-devicetree.install
                    /usr/lib/kernel/install.d/20-grub.install
                    /usr/lib/kernel/install.d/50-depmod.install
                    /usr/lib/kernel/install.d/50-dracut.install
                    /usr/lib/kernel/install.d/51-dracut-rescue.install
                    /usr/lib/kernel/install.d/60-kdump.install
                    /usr/lib/kernel/install.d/90-loaderentry.install
                    /usr/lib/kernel/install.d/90-uki-copy.install
                    /usr/lib/kernel/install.d/92-crashkernel.install
                    /usr/lib/kernel/install.d/92-tuned.install
                    /usr/lib/kernel/install.d/95-akmodsposttrans.install
                    /usr/lib/kernel/install.d/95-kernel-hooks.install
                    /usr/lib/kernel/install.d/99-grub-mkconfig.install
Plugin Environment: LC_COLLATE=C.UTF-8
                    KERNEL_INSTALL_VERBOSE=0
                    KERNEL_INSTALL_IMAGE_TYPE=pe
                    KERNEL_INSTALL_MACHINE_ID=567c7e0e03b242e4b5d672cc22fffe54
                    KERNEL_INSTALL_ENTRY_TOKEN=567c7e0e03b242e4b5d672cc22fffe54
                    KERNEL_INSTALL_BOOT_ROOT=/boot/efi
                    KERNEL_INSTALL_LAYOUT=other
                    KERNEL_INSTALL_INITRD_GENERATOR=
                    KERNEL_INSTALL_UKI_GENERATOR=
                    KERNEL_INSTALL_STAGING_AREA=/tmp/kernel-install.staging.XXXXXX
  Plugin Arguments: add|remove
                    6.16.3-200.fc42.x86_64
                    /boot/efi/567c7e0e03b242e4b5d672cc22fffe54/6.16.3-200.fc42.x86_64
                    /usr/lib/modules/6.16.3-200.fc42.x86_64/vmlinuz
                    [INITRD...]

# ll /boot/vmlinuz-*
-rwxr-xr-x. 1 root root 17533288 Aug 21 05:30 /boot/vmlinuz-0-rescue-567c7e0e03b242e4b5d672cc22fffe54
-rwxr-xr-x. 1 root root 17533288 Aug 15 02:00 /boot/vmlinuz-6.15.10-200.fc42.x86_64
-rwxr-xr-x. 1 root root 17521000 Aug  2 02:00 /boot/vmlinuz-6.15.9-201.fc42.x86_64
-rwxr-xr-x. 1 root root 17647976 Aug 20 02:00 /boot/vmlinuz-6.16.2-200.fc42.x86_64
-rwxr-xr-x. 1 root root 17647976 Aug 23 02:00 /boot/vmlinuz-6.16.3-200.fc42.x86_64

This laptop runs Fedora from the start. It was a fresh install.

As long as you have KERNEL_INSTALL_LAYOUT=other Boot Root is ignored. Boot Root is set to /boot/efi unless /boot has the bls_boot flag set.