Need help with dracut not writing to /var/tmp

After resolving my issue with my broken linux kernel by updating my system via chroot on a live usb I ran into a new issue.fs
When i boot into grub after decrypting I get an error message letting me know that initramfs.img is missing.
After a bit of research online and rebooting the live media, I took a look at the filesystem and determined that the initramfs is indeed missing. I’m using a linux-lts kernel, and on my prior rebuild dracut was not able to build initramfs due to this error:

in my non-media drive as chroot i ran pacman -Syu and dracut-rebuild, both giving me the following error:

dracut-install : Errot cannot map ’ /var/tmp/dracut.dhgZTxm/initramfs/usr/bin/fsck.exfat’: Invalid argument

any help would greatly be appreciated, as I am a novice, non code literate, but determined to learn.

Thank you

I am sorry but your instructions about using mkinicpio doesn’t apply here. Please read the op more carefully before proceeding to give advice.

Personally, I would try the following in chroot:

  1. checking that /var/tmp exists
  2. installing/reinstalling exfatprogs
  3. reinstall my kernels

running mkinitcpio after installing it did infact give the the .img file, however when rebooting i receive the following error:
waiting 10 seconds for device /dev/disc/by-uuid/xyz
error device not found skipping fsck
mounting uuid on real root
mount: /new_root: cant find uuid
error failed to mount uuid on real root

you are now being dropped into an emergency shell

@cactux /var/tmp does exist and i deleted everything in there before trying again, as i thought it might be a conflict. Dolphin says I have write permissions, so i think i should be able to write to it.

i will try pacman exfatprogs and then reinstalling the kernel

thanks

You shouldn’t be mixing dracut and mkinitcpio.

If your system was installed with dracut, you should stick with that. Remove mkinitcpio from the system.

If you would like to switch to mkinitcpio, you would need to follow a procedure.

Anyhow, don’t mix them together. It’s one or the other.

2 Likes

Logically, you’re right.

1 Like

attempting to reinstall the kernel through pacman runs dracut which gives the same error.
If it helps i use luks encryption. decrypted through cryptsetup LuksOpen, as well as decrypted through dolphin by clicking on my drive.

I found this which may be the problem:

One common cause is an incorrect or missing root= parameter in the kernel command line, which is essential for dracut to locate the root filesystem. If the root= argument is missing or malformed, dracut may fail with a “FATAL: No or empty root= argument” error, leading to a kernel panic. This can be resolved by ensuring the correct device path is specified in the bootloader configuration, such as root=/dev/mapper/vg00-lvol1

my config says root=’ cryptouuid/xyzseriesofnumbers
can I go through in a text editor and switch it to /dev/mapper/luks-xyzseriesofnumbers ?

However, that is not the error you have been seeing.

Please don’t take any further step before the real root cause of the issue is known. Without that knowledge anything you do may deteriorate the situation and complicate troubleshooting even more.

Be patient and wait for other forum members with more advanced knowledge in this field to assist you.

In the meantime, please post the following from chroot:

findmnt

pacman -Q | grep -E "dracut|grub|mkinitcpio”

cat /etc/fstab

ls /boot

pacman -Qs exfatprogs

pacman -Q | grep linux

Has nothing to do with logic :wink: :grinning_face_with_smiling_eyes:

Okay. How can you say I’m not capable of this now?
It’s already…
I think I’d better stay in the background and watch it all.:confused:

And let’s hope they will arrive soon to resolve OP’s issue :wink:

Took your advice and didnt alter the grub.cfg
I remember an error a while ago using yay where there was an incompatability with versions of something called ‘kinit’ if it helps, but i was able to boot for a few months after that.

here are my logs:

[root@EndeavourOS /]# findmnt
TARGET SOURCE FSTYPE OPTIONS
/ /dev/mapper/luks-8802ba5b-b190-4b7c-a674-90a54cec88af
│ ext4 rw,relatime,errors=remount-ro
├─/proc
│ proc proc rw,nosuid,nodev,noexec,relatime
├─/sys sys sysfs ro,nosuid,nodev,noexec,relatime
├─/dev udev devtmpfs rw,nosuid,relatime,size=16335620k,nr_inodes=4083905,mode=755,inode64
│ ├─/dev/pts
│ │ devpts devpts rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000
│ └─/dev/shm
│ shm tmpfs rw,nosuid,nodev,relatime,inode64
├─/run run tmpfs rw,nosuid,nodev,relatime,mode=755,inode64
├─/tmp tmp tmpfs rw,nosuid,nodev,inode64
└─/etc/resolv.conf
airootfs[/etc/resolv.conf]
overlay rw,relatime,lowerdir=/run/archiso/airootfs,upperdir=/run/archiso/cowspace

[root@EndeavourOS /]# pacman -Q | grep -E “dracut|grub|mkinitcpio”
dracut 108_eos-1
eos-dracut 1.7-1
grub 2:2.12.r418.g6b5c671d-1

[root@EndeavourOS /]# cat /etc/fstab

/etc/fstab: static file system information.
Use ‘blkid’ to print the universally unique identifier for a device; this may
be used with UUID= as a more robust way to name devices that works even if
disks are added and removed. See fstab(5).
/dev/mapper/luks-8802ba5b-b190-4b7c-a674-90a54cec88af / ext4 noatime 0 1
/dev/mapper/luks-ef6b151f-8762-41cc-a5e6-48d931d34810 swap swap defaults 0 0
tmpfs /tmp tmpfs defaults,noatime,mode=1777 0 0
[root@EndeavourOS /]#

[root@EndeavourOS /]# ls /boot
grub initramfs-linux.img initramfs-linux-lts.img vmlinuz-linux
initramfs-linux-fallback.img initramfs-linux-lts-fallback.img intel-ucode.img vmlinuz-linux-lts
[root@EndeavourOS /]#

[root@EndeavourOS /]# pacman -Qs exfatprogs
local/exfatprogs 1.3.0-1

[root@EndeavourOS /]# pacman -Q | grep linux
archlinux-appstream-data 20250825-1
archlinux-keyring 20251012-1
lib32-util-linux 2.41.2-1
linux 6.17.3.arch2-1
linux-api-headers 6.16-2
linux-firmware 20251011-1
linux-firmware-amdgpu 20251011-1
linux-firmware-atheros 20251011-1
linux-firmware-broadcom 20251011-1
linux-firmware-cirrus 20251011-1
linux-firmware-intel 20251011-1
linux-firmware-mediatek 20251011-1
linux-firmware-nvidia 20251011-1
linux-firmware-other 20251011-1
linux-firmware-radeon 20251011-1
linux-firmware-realtek 20251011-1
linux-firmware-whence 20251011-1
linux-headers 6.17.3.arch2-1
linux-lts 6.12.53-1
linux-lts-headers 6.12.53-1
util-linux 2.41.2-1
util-linux-libs 2.41.2-1
[root@EndeavourOS /]#

1 Like

Could you please rerun the dracut-rebuild command and post the whole output as well?

One oddity I am seeing in your /etc/fstab is that you don’t have any entry for ESP (which may have nothing to do with the actual issue).

Is yours a Legacy/Bios installation?

it is a legacy/bios installation
Also /var/tmp is writeable from the terminal. I ran mkdir /var/tmp/test and it made a file.
heres the logs for dracut-rebuild. same result if i sudo.

[root@EndeavourOS /]# dracut-rebuild
:: Building initramfs for linux-lts (6.12.53-1-lts)
dracut[I]: Detected container-other container.
dracut[I]: Executing: /usr/bin/dracut --force --hostonly --no-hostonly-cmdline /boot/initramfs-linux-lts.img 6.12.53-1-lts
dracut[I]: *** Including module: bash ***
dracut[I]: *** Including module: systemd ***
dracut[I]: *** Including module: systemd-ask-password ***
dracut[I]: *** Including module: systemd-battery-check ***
dracut[I]: *** Including module: systemd-cryptsetup ***
dracut[I]: *** Including module: systemd-initrd ***
dracut[I]: *** Including module: systemd-journald ***
dracut[I]: *** Including module: systemd-modules-load ***
dracut[I]: *** Including module: systemd-pcrphase ***
dracut[I]: *** Including module: systemd-sysctl ***
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: systemd-sysusers ***
dracut[I]: *** Including module: btrfs ***
dracut[I]: *** Including module: crypt ***
dracut[I]: *** Including module: dm ***
dracut[I]: *** Including module: fs-lib ***
dracut[I]: *** Including module: kernel-modules ***
dracut[I]: *** Including module: kernel-modules-extra ***
dracut[I]: *** Including module: lvm ***
dracut[I]: *** Including module: mdraid ***
dracut[I]: *** Including module: qemu ***
dracut[I]: *** Including module: qemu-net ***
dracut[I]: *** Including module: hwdb ***
dracut[I]: *** Including module: lunmask ***
dracut[I]: *** Including module: resume ***
dracut[I]: *** Including module: rootfs-block ***
dracut[I]: *** Including module: terminfo ***
dracut[I]: *** Including module: udev-rules ***
dracut[I]: *** Including module: virtiofs ***
dracut[I]: *** Including module: dracut-systemd ***
dracut[I]: *** Including module: initqueue ***
dracut[I]: *** Including module: usrmount ***
dracut[I]: *** Including module: base ***
dracut[I]: *** Including module: shell-interpreter ***
dracut[I]: *** Including module: shutdown ***
dracut[I]: *** Including module: btrfs-snapshot-overlay ***
dracut[I]: *** Including modules done ***
dracut[I]: *** Installing kernel module dependencies ***
dracut[I]: *** Installing kernel module dependencies done ***
dracut[I]: *** Resolving executable dependencies ***
dracut-install: ERROR: cannot mmap ‘/var/tmp/dracut.d5aFknx/initramfs/usr/bin/fsck.exfat’: Invalid argument
dracut[F]: Resolving executable dependencies failed

1 Like

Okay. How can you say I’m not capable of this now?
It’s already…
I think I’d better stay in the background and watch it all.:confused:

You don’t need to use sudo when in chroot. You are already in /root directory of your installed system.

This is strange. You have alreadyexfatprogs which provides /usr/bin/fsck.exfat :thinking:

Now I start wondering what issues you were trying to resolve here and how did you resolve them. That may give us a clue as to the new issue you have run into.

In any case, personally if I were to resolve this issue, I would reinstall all the installed packages in my system to make sure nothing is missing. I am not sure that it would resolve the issue. Nor am I suggesting you to do so.

However that is something I would try in chroot: pacman -Qqn | pacman -S -

I interrupted yay after my pc froze and by doing so I was missing my /boot/vmlinuz-linux-its file causing my grub to not boot into EnOs informing me that I was missing the file.
I for the first time learned what chroot-ing was, went on a live usb and unlocked my drive in the terminal, found the directory with gparted, which wasnt /dev/sda1 it was instead in /dev/mapper.
I mounted the drive, chrooted into the drive, and then did pacman -syu.
This wrote a new kernel where there was none before, and in that -Syu I ran into the same dracut error.
I rebooted into the drive (2 partitions my main partition which has the boot, and an 8gp swap partition sda2) where now grub prompted me into a kernel panic.
After resolving the kernel panic with running mkinitcpio, I now boot into an emergency shell which has the error ‘failed to mount uuid on real root’

here is the log:
it listed all of my installed programs and then – reinstalling
after a while:
resolving dependencies…
looking for conflicting packages…
warning: dependency cycle detected:
warning: pam will be installed before its systemd-libs dependency
warning: dependency cycle detected:
warning: mesa will be installed before its libglvnd dependency
warning: dependency cycle detected:
warning: librsvg will be installed before its gdk-pixbuf2 dependency
warning: dependency cycle detected:
warning: qt6-multimedia-ffmpeg will be installed before its qt6-multimedia dependency
warning: dependency cycle detected:
warning: qt6-multimedia-gstreamer will be installed before its qt6-multimedia dependency
warning: dependency cycle detected:
warning: xdg-desktop-portal-kde will be installed before its plasma-workspace dependency
warning: dependency cycle detected:
warning: python-incremental will be installed before its python-twisted dependency
warning: dependency cycle detected:
warning: lib32-keyutils will be installed before its lib32-krb5 dependency
warning: dependency cycle detected:
warning: lib32-pam will be installed before its lib32-systemd dependency
warning: dependency cycle detected:
warning: lib32-mesa will be installed before its lib32-libglvnd dependency
warning: dependency cycle detected:
warning: python-soupsieve will be installed before its python-beautifulsoup4 dependency
warning: dependency cycle detected:
warning: tesseract-data-afr will be installed before its tesseract dependency

warning: insufficient columns available for table display
Packages (1792)

I proceeded with installation (Y)

it went through an exhaustive list and returned:

Errors occurred, no packages were upgraded.

The warnings you could ignore.

The interesting part would have been to see where the errors had occurred and what they were about.

You can use a pastein service and post the link.

Also, as a last resort, IF there is no exFAT partition in your system you could try to instruct dracut to exclude its module in initramfs. Or just omit fsck.exfat.

It feels like a dirty fix but it may get your system to a bootable state after all so further troubleshooting can be made.