Skip to contentSkip to conversation

initramfs-framework: drop redundant /var/lock directory creation

PATCH New Ricardo Salveti 1 participant 1 message Oct 17, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 initramfs-framework: drop redundant /var/lock directory creation

base-files already provides /var/lock as a symbolic link to /run/lock, and since /run is created and mounted as tmpfs during init, there is no need to explicitly create /var/lock within initramfs.

This avoids the following spurious error during boot:

mkdir: can't create directory '/var/lock': No such file or directory

---
 meta/recipes-core/initrdscripts/initramfs-framework/init | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
meta/recipes-core/initrdscripts/initramfs-framework/init +2 -2
index 5dd252219a..fe6e3cbf07 100755
@@ -80,8 +80,8 @@ EFI_DIR=/sys/firmware/efi  # place to store device firmware information
 # make mount stop complaining about missing /etc/fstab
 touch /etc/fstab
 
-# initialize /proc, /sys, /run/lock and /var/lock
-mkdir -p /proc /sys /run /var/lock
+# initialize /proc, /sys and /run/lock
+mkdir -p /proc /sys /run
 mount -t proc proc /proc
 mount -t sysfs sysfs /sys
 mount -t tmpfs tmpfs /run
Signature · 1 line
2.34.1