OPINIONATED OMARCHY
TROUBLESHOOTING CORPUS
790
RECORDS
790
AUDITED
0
UNCHECKED
2388
SOURCES
LIVE
boot-kernel high occasional DISPUTE

/boot became read-only mid-session, so the kernel update could not write the new image

archomarchyendeavouroscachyosmanjarouefiliminegrubsystemd-boot
CORRECTED An auditor found the fix wrong or incomplete and rewrote it. · checked against Omarchy omarchy 4.0.4-1 on 2026-10-05
AUDIT NOTE

Confirmed on this workstation: the ESP fstab line carries errors=remount-ro (archinstall's genfstab output on an Omarchy install), /usr/bin/limine-update runs limine-install --no-efi-register then limine-mkinitcpio, and fsck.fat is from dosfstools 4.2. Forum thread 298530 supports the symptom lines (install: cannot create regular file '/boot/vmlinuz-linux', fat_free_clusters, set read-only) and the NVMe link, but the 'Volume was not properly unmounted' line in that thread was for dm-1 and sda1, not the ESP, and thread 249657 shows it only as an fsck dirty-bit prompt. Two defects in the fix. First, the source thread's own mount output was 'source write-protected, mounted read-only' and the expert reply says recovery most likely needs a reboot into the install ISO and a chroot. The record's online umount/fsck/remount path cannot work when the device itself refuses writes, and the record had no branch for that, leaving the reader told not to reboot with no way forward. Second, the plain Arch 'pacman -S linux' does not guarantee the same version: it takes whatever the sync database holds, so it was replaced with a pacman -U from the package cache at the installed version. The Omarchy branch now also notes that 4.0.4 machines carry two kernels (linux and linux-omarchy) and limine-update rebuilds both. Not exercised: no ESP was repaired, /boot is root-only here and was not listed.

The cause above was not rewritten and may still contain the error described. The fix below is the corrected version.
RISK

fsck.fat -a picks the least destructive repair, but it can still truncate or drop damaged files on the ESP, which holds the boot loader, the kernel image and other systems' loaders. Copy the ESP first, as shown. Rebooting before the image is rewritten can leave the machine unbootable.

Symptom

An update prints something like:


install: cannot create regular file '/boot/vmlinuz-linux': Read-only file system

or fails while writing the UKI to /boot/EFI/Linux/. dmesg shows the ESP's FAT filesystem tripping:


FAT-fs (nvme0n1p1): error, fat_free_clusters: deleting FAT entry beyond EOF
FAT-fs (nvme0n1p1): Filesystem has been set read-only

Earlier in the log there may be FAT-fs (nvme0n1p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.

Cause

The ESP is normally mounted with errors=remount-ro. Omarchy's own fstab line carries it, and so do most genfstab outputs. When the kernel's FAT driver hits an inconsistency, it silently remounts /boot read-only. Nothing tells you until something tries to write there, which is usually the next kernel update. The package's files under /usr/lib/modules are replaced, the boot image is not, and the next reboot starts a stale kernel against missing modules. The inconsistency comes from an unclean shutdown, a crash during an ESP write, or NVMe controller faults (see the NVMe APST record).

Fix

**Do not reboot until /boot is repaired and the kernel image is rewritten, unless step 2 says the device itself is refusing writes.**

  1. Confirm what happened:

sudo dmesg | grep -iE 'FAT-fs|nvme'
findmnt -n -o SOURCE,OPTIONS /boot        # 'ro,' at the start means it was remounted read-only
  1. Back up the ESP, unmount it, repair it, and remount it:

sudo mkdir -p /root/esp-backup && sudo cp -a /boot/. /root/esp-backup/
esp=$(findmnt -n -o SOURCE /boot)
sudo umount /boot
sudo fsck.fat -v -a "$esp"
sudo fsck.fat -n "$esp"                   # second pass, check only
sudo mount /boot
findmnt -n -o OPTIONS /boot               # must start with rw

If fsck.fat cannot write, or mount prints WARNING: source write-protected, mounted read-only, the drive is refusing writes (often an NVMe controller fault, see nvme-apst-controller-down-will-reset). It cannot be fixed from this session. Boot the install USB, run fsck.fat -a on the ESP there, then chroot and rebuild the boot image as below (see chroot-recovery-btrfs-missing-subvol).

  1. Rewrite the boot image.

Omarchy 4 (rebuilds every installed kernel, including both linux and linux-omarchy on 4.0.4):


sudo limine-update      # limine-install --no-efi-register, then limine-mkinitcpio

Plain Arch: reinstall the exact kernel version that is installed, from the package cache, so its hooks run again and no newer version is pulled in:


sudo pacman -U "/var/cache/pacman/pkg/linux-$(pacman -Q linux | cut -d' ' -f2)-x86_64.pkg.tar.zst"

If that file is not in the cache, sudo pacman -S linux works only when the sync database has not been refreshed since the failed update. Never use -Sy here.

Verify

findmnt -n -o OPTIONS /boot starts with rw, sudo fsck.fat -n "$(findmnt -n -o SOURCE /boot)" reports no errors, and the boot image's timestamp is current: sudo ls -l /boot/EFI/Linux/ on Omarchy, ls -l /boot/vmlinuz-linux on Arch.

Sources

boot-esp-read-only-fat-errors-kernel-not-written