Hello everyone,

I’m experiencing an issue while trying to run dracut on my Arch Linux system. When I execute the command dracut -f, I receive the following error:

Can't write to /efi/f515a4a11be148a580c14dcbdcc58ef9/6.16.4-zen1-1-zen: Directory /efi/f515a4a11be148a580c14dcbdcc58ef9/6.16.4-zen1-1-zen does not exist or is not accessible.

  • Kernel Version: 6.16.4-zen1-1-zen
  • Dracut Version: 108
  • The EFI partition is mounted correctly:
    /dev/nvme1n1p1 on /efi type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro)
    
  • The permissions for the /efi directory are as follows:
    drwxr-xr-x 4 root root 4096 Nov 21  2022 /efi/EFI
    
  • There are no logs in /var/log/dracut.log.
  • I have not made any recent changes to my system that I believe would affect the boot process.
  • Interestingly, when I update the kernel using yay linux, dracut can regenerate the initrd without any issues:
    /efi ❯❯❯ yay -S linux
    Sync Explicit (1): linux-6.16.4.arch1-1
    warning: linux-6.16.4.arch1-1 is up to date -- reinstalling
    ...
    (3/4) Updating initramfs with dracut
    --> Building initramfs for linux (6.16.4-arch1-1)
    

Questions:

  • Has anyone encountered a similar issue or can provide guidance on how to resolve this?
  • Are there any additional checks or commands I should run to diagnose the problem further?

Thank you for your help!

  • thagoat@lemmy.sdf.org
    link
    fedilink
    arrow-up
    5
    ·
    edit-2
    6 days ago

    The /efi directory is owned by root. So you either need to use sudo with dracut, or if you’re brave, change your destination folder permissions. Pacman and yay run with sudo privileges, so they will be permitted to write to /efi and its subdirectories.

      • ferret@sh.itjust.works
        link
        fedilink
        English
        arrow-up
        2
        ·
        6 days ago

        yay is unprivileged for all the AUR parts but will ask for your password when it gets to the pacman bits in order to run it as root.

        • Ŝan@piefed.zip
          link
          fedilink
          English
          arrow-up
          1
          arrow-down
          3
          ·
          6 days ago

          You’re right; I just always setcap it first þing after installing it, because of þe “don’t run me as root” message, and because if sudo times out before it’s done it prompts you for permission on þe install.

          • ferret@sh.itjust.works
            link
            fedilink
            English
            arrow-up
            2
            ·
            5 days ago

            You can turn off the sudo prompt timeout, it will still stall the install though I guess (running aur scripts as root is wild work though)

  • med@sh.itjust.works
    link
    fedilink
    arrow-up
    1
    ·
    edit-2
    6 days ago

    I think the error message is telling you exactly what’s up - the file it’s looking at doesn’t exist. Have you checked with a ‘stat’ on the path it’s complaining about?

    You’ve got your efi partition listed as /efi, and dracut is looking directly in this directory for the zen kernel subpath under

    efi/f515a4a11be148a580c14dcbdcc58ef9/

    but then you list your efi directory permissions as being for efi/EFI

    Which looks more correct to me.

    Dracut’s looking in the wrong place I think.

    under the efi/EFI directory, there should be a /boot dir. Try mounting that to /boot and running dracut -f again, it might pick it up. I think having versioned kernels directly under the efi is breaking the spec, which dracut has said they won’t do