Kernel does not install in efi partition

I changed to a nvme drive, so I reinstalled cachyos. I used the defaults of the install on partition section and FS types, except changed / to be btrfs. I noticed after the initial install when I updated, the kernel image and initrd disappeared from /boot. Also tried installing linux-cachyos-bore kernel and it does not get installed to /boot nor does a mkinitcpio preset gets installed. What would cause this issue? My ESP isn’t full btw

Edit: Update, linux-zen when I tested installing it, it showed up in my ESP partition

Which boot manager are you using? Also show me your partition table.

can you provide

inxi -Mxx
sudo parted -l 

Was using systemd-boot but went back to grub as I’m use to it.
Inxi: termbin.com/ek916

Parted: termbin.com/hzw3

Also I figured out linux-zen would install in /boot but not linux-cachyos{-bore}

Can you give me a long listing of /boot? ls -la /boot and ls -la /boot/efi.

ls -la /boot
drwxr-xr-x - root 31 Dec 1969  .
drwxr-xr-x - root 16 Dec 04:22  …
drwxr-xr-x - root 9 Dec 21:07  2fa08ec140964eda85c061c49e12c691
drwxr-xr-x - root 16 Dec 04:05  EFI
drwxr-xr-x - root 18 Dec 04:13  grub
drwxr-xr-x - root 13 Dec 03:01  loader
.rwxr-xr-x 139M root 18 Dec 00:36  initramfs-linux-cachyos.img
.rwxr-xr-x 14M root 16 Dec 04:19  vmlinuz-linux-cachyos

The images above for linux-cachyos is the ones I copied from the /lib/modules/linux-cachyos… dir

ls -la /boot/efi
drwxr-xr-x - root 16 Dec 04:05  .
drwxr-xr-x - root 31 Dec 1969  …
drwxr-xr-x - root 16 Dec 04:05  arch
drwxr-xr-x - root 10 Dec 15:06  BOOT
drwxr-xr-x - root 9 Dec 21:07  Linux
drwxr-xr-x - root 10 Dec 15:06  systemd

I think for one thing, your partition table is wrong for GRUB. The partition where it keeps the kernel images must be separate from the EFI partition, which is your current boot. Whether it’s the reason for the underlying issue is unclear. Can you give me the install log of the bore kernel?

sudo pacman -S linux-cachyos-bore <and-others>

That is not true:

Model: KINGSTON SNV2S1000G (nvme)
Disk /dev/nvme0n1: 1000GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system  Name  Flags
 1      2097kB  2150MB  2147MB  fat32              boot, esp
 2      2150MB  1000GB  998GB   btrfs        root

GPT and esp boot in fat32, about 2G size.
The question is, where is it mounted?

It SHOULD be mounted at /boot or /efi not at the discouraged /boot/efi
Please see: EFI system partition - ArchWiki

As for grub, it works perfectly fine to install with the normal flags that will install it inside /boot, but the user have to make sure that boot is ALWAYS mounted ofc.
Please see: GRUB - ArchWiki

Output of /etc/fstab and logs from running sudo mkinitcpio -P would be very useful.

Origionally I was using systemd-boot and the partition table setup was done by the installer.

linux-cachyos-bore-6.12.5-1-x86_64_v3 143.1 MiB 6.06 MiB/s 00:24 [----------------------------------------] 100%
(2/2) checking keys in keyring [----------------------------------------] 100%
(2/2) checking package integrity [----------------------------------------] 100%
(2/2) loading package files [----------------------------------------] 100%
(2/2) checking for file conflicts [----------------------------------------] 100%
:: Processing package changes…
(1/2) installing linux-cachyos-bore [----------------------------------------] 100%
Optional dependencies for linux-cachyos-bore
wireless-regdb: to set the correct wireless channels of your country [installed]
linux-firmware: firmware images needed for some devices [installed]
modprobed-db: Keeps track of EVERY kernel module that has ever been probed - useful for those of us who make
localmodconfig
scx-scheds: to use sched-ext schedulers [installed]
(2/2) installing linux-zen [----------------------------------------] 100%
Optional dependencies for linux-zen
linux-firmware: firmware images needed for some devices [installed]
scx-scheds: to use sched-ext schedulers [installed]
wireless-regdb: to set the correct wireless channels of your country [installed]
:: Running post-transaction hooks…
(1/5) Arming ConditionNeedsUpdate…
(2/5) Updating module dependencies…
(3/5) Updating initramfs…
:: Building initramfs for linux-cachyos-bore (6.12.5-1-cachyos-bore)
dracut[I]: Executing: /usr/bin/dracut --force --hostonly --no-hostonly-cmdline /boot/initramfs-linux-cachyos-bore.img 6.12.5-1-cachyos-bore
dracut[I]: 95nfs: Could not find any command of ‘rpcbind portmap’!
dracut[I]: 95nfs: Could not find any command of ‘rpcbind portmap’!
dracut[I]: *** Including module: systemd ***
dracut[I]: *** Including module: systemd-ask-password ***
dracut[I]: *** Including module: systemd-initrd ***
dracut[I]: *** Including module: systemd-journald ***
dracut[I]: *** Including module: systemd-modules-load ***
dracut[I]: *** Including module: systemd-sysctl ***
dracut[I]: *** Including module: systemd-sysusers ***
dracut[I]: *** Including module: systemd-tmpfiles ***
dracut[I]: *** Including module: systemd-udevd ***
dracut[I]: *** Including module: i18n ***
dracut[I]: *** Including module: drm ***
dracut[I]: *** Including module: plymouth ***
dracut[I]: *** Including module: btrfs ***
dracut[I]: *** Including module: kernel-modules ***
dracut[I]: *** Including module: kernel-modules-extra ***
dracut[I]: *** Including module: pcmcia ***
dracut[I]: *** Including module: systemd-boot-snapshots ***
dracut[I]: *** Including module: btrfs-snapshot-overlay ***
dracut[I]: *** Including module: hwdb ***
dracut[I]: *** Including module: rootfs-block ***
dracut[I]: *** Including module: terminfo ***
dracut[I]: *** Including module: udev-rules ***
dracut[I]: *** Including module: dracut-systemd ***
dracut[I]: *** Including module: usrmount ***
dracut[I]: *** Including module: base ***
dracut[I]: *** Including module: fs-lib ***
dracut[I]: *** Including module: shutdown ***
dracut[I]: *** Including modules done ***
dracut-install: Failed to find module ‘nvidia_drm’
dracut[E]: FAILED: /usr/lib/dracut/dracut-install -D /var/tmp/dracut.hYb2Bt/initramfs --kerneldir /lib/modules/6.12.5-1-cachyos-bore/ -m nvidia_drm
dracut[I]: *** Installing kernel module dependencies ***
dracut[I]: *** Installing kernel module dependencies done ***
dracut[I]: *** Resolving executable dependencies ***
dracut[I]: *** Resolving executable dependencies done ***
dracut[I]: *** Hardlinking files ***
dracut[I]: *** Hardlinking files done ***
dracut[I]: *** Generating early-microcode cpio image ***
dracut[I]: *** Store current command line parameters ***
dracut[I]: *** Stripping files ***
dracut[I]: *** Stripping files done ***
dracut[I]: *** Creating image file ‘/boot/initramfs-linux-cachyos-bore.img’ ***
dracut[I]: Using auto-determined compression method ‘zstd’
dracut[I]: *** Creating initramfs image file ‘/boot/initramfs-linux-cachyos-bore.img’ done ***
:: Building initramfs for linux-zen (6.12.5-zen1-1-zen)
dracut[I]: Executing: /usr/bin/dracut --force --hostonly --no-hostonly-cmdline /boot/initramfs-linux-zen.img 6.12.5-zen1-1-zen
dracut[I]: 95nfs: Could not find any command of ‘rpcbind portmap’!
dracut[I]: 95nfs: Could not find any command of ‘rpcbind portmap’!
dracut[I]: *** Including module: systemd ***
dracut[I]: *** Including module: systemd-ask-password ***
dracut[I]: *** Including module: systemd-initrd ***
dracut[I]: *** Including module: systemd-journald ***
dracut[I]: *** Including module: systemd-modules-load ***
dracut[I]: *** Including module: systemd-sysctl ***
dracut[I]: *** Including module: systemd-sysusers ***
dracut[I]: *** Including module: systemd-tmpfiles ***
dracut[I]: *** Including module: systemd-udevd ***
dracut[I]: *** Including module: i18n ***
dracut[I]: *** Including module: drm ***
dracut[I]: *** Including module: plymouth ***
dracut[I]: *** Including module: btrfs ***
dracut[I]: *** Including module: kernel-modules ***
dracut[I]: *** Including module: kernel-modules-extra ***
dracut[I]: *** Including module: pcmcia ***
dracut[I]: *** Including module: systemd-boot-snapshots ***
dracut[I]: *** Including module: btrfs-snapshot-overlay ***
dracut[I]: *** Including module: hwdb ***
dracut[I]: *** Including module: rootfs-block ***
dracut[I]: *** Including module: terminfo ***
dracut[I]: *** Including module: udev-rules ***
dracut[I]: *** Including module: dracut-systemd ***
dracut[I]: *** Including module: usrmount ***
dracut[I]: *** Including module: base ***
dracut[I]: *** Including module: fs-lib ***
dracut[I]: *** Including module: shutdown ***
dracut[I]: *** Including modules done ***
dracut-install: Failed to find module ‘nvidia_drm’
dracut[E]: FAILED: /usr/lib/dracut/dracut-install -D /var/tmp/dracut.3k0iqg/initramfs --kerneldir /lib/modules/6.12.5-zen1-1-zen/ -m nvidia_drm
dracut[I]: *** Installing kernel module dependencies ***
dracut[I]: *** Installing kernel module dependencies done ***
dracut[I]: *** Resolving executable dependencies ***
dracut[I]: *** Resolving executable dependencies done ***
dracut[I]: *** Hardlinking files ***
dracut[I]: *** Hardlinking files done ***
dracut[I]: *** Generating early-microcode cpio image ***
dracut[I]: *** Store current command line parameters ***
dracut[I]: *** Stripping files ***
dracut[I]: *** Stripping files done ***
dracut[I]: *** Creating image file ‘/boot/initramfs-linux-zen.img’ ***
dracut[I]: Using auto-determined compression method ‘zstd’
dracut[I]: *** Creating initramfs image file ‘/boot/initramfs-linux-zen.img’ done ***
(4/5) Updating linux initcpios…
call to execv failed (No such file or directory)
error: command failed to execute correctly
(5/5) Updating systemd-boot entries

Switched to dracut, but here is fstab https://termbin.com/qfi0

Edit: ATM it seems to be working fine now, the only change I’ve made was to switch to dracut

Your choice of bootloader does not change how mkinitcpio works, so it should have changed nothing. Something else must have changed as well.
Dracut allthough, I guess it could have been mkinitcpio that is corrupted somehow.

One thought:

# /dev/nvme0n1p1
UUID=18C6-D88C      	/boot     	vfat      	rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro	0 2

errors=remount-ro
Have you made sure your boot does not remount sometimes due to some error, therefore making it read only?

You did not provide the logs from the failing sudo mkinitcpio -P, it would have been very useful to see what errors it threw when not able to write, or if it writes them to wrong location or smthn.
The installation uses the correct path:

dracut[I]: *** Creating image file ‘/boot/initramfs-linux-zen.img’ ***
dracut[I]: Using auto-determined compression method ‘zstd’
dracut[I]: *** Creating initramfs image file ‘/boot/initramfs-linux-zen.img’ done ***

But I guess if it suddenly “just works” and you are fine with that, nothing more to do I guess.

Edit
Do you have the correct config and driver for nvidia? Kernel parameters and such?

dracut-install: Failed to find module ‘nvidia_drm’
dracut[E]: FAILED: /usr/lib/dracut/dracut-install -D /var/tmp/dracut.3k0iqg/initramfs --kerneldir /lib/modules/6.12.5-zen1-1-zen/ -m nvidia_drm

Removed the remount part, and changed the add_modules in dracut for nvidia