You are not logged in.
Hello all!
since about a month I get the the following error messages on boot:
/init: line 212: can't create /tmp/cmdline: nonexistent directory
/init: line 212: can't create /tmp/cmdline: nonexistent directory
/init: line 212: can't create /tmp/cmdline: nonexistent directory
/init: line 212: can't create /tmp/cmdline: nonexistent directory
/init: line 212: can't create /tmp/cmdline: nonexistent directory
/init: line 212: can't create /tmp/cmdline: nonexistent directory
/init: line 212: can't create /tmp/cmdline: nonexistent directory
/init: line 212: can't create /tmp/cmdline: nonexistent directory
/init: line 212: can't create /tmp/cmdline: nonexistent directory
/init: line 212: can't create /tmp/cmdline: nonexistent directory
/init: line 212: can't create /tmp/cmdline: nonexistent directory
:: running early hook [udev]
Starting systemd-udev version <version of systemd>
:: running hook [udev]
:: Triggering uevents...
:: running hook [keymap]
:: Loading keymap...done.
:: running hook [scencrypt]
I have never had this before. Before the only boot messages were:
Starting systemd-udev version <version of systemd>
I'm running Arch on a ASUS G14 with LUKS full disk encryption (except /efi), Secure Boot, Unified kernel image and BTRFS. My fstab is as follows:
UUID=9201f887-1f6d-4870-b785-95aceaa17487 / btrfs defaults,noatime,nodiratime,compress=zstd:3,ssd,discard,space_cache,subvolid=256,subvol=root 0 0
UUID=9201f887-1f6d-4870-b785-95aceaa17487 /home btrfs defaults,nosuid,nodev,noatime,nodiratime,compress=zstd:3,ssd,discard,space_cache,subvolid=257,subvol=home 0 0
UUID=9201f887-1f6d-4870-b785-95aceaa17487 /var btrfs defaults,nosuid,nodev,noexec,noatime,nodiratime,compress=zstd:3,ssd,discard,space_cache,subvolid=258,subvol=var 0 0
UUID=9201f887-1f6d-4870-b785-95aceaa17487 /var/vm btrfs defaults,nosuid,nodev,noexec,noatime,nodiratime,nodatacow,ssd,discard,space_cache,subvolid=259,subvol=vm 0 0
UUID=9201f887-1f6d-4870-b785-95aceaa17487 /swap btrfs defaults,nosuid,nodev,noexec,noatime,nodiratime,nodatacow,ssd,discard,space_cache,subvolid=260,subvol=swap 0 0
UUID=983E-9914 /efi vfat defaults,nosuid,nodev,noexec,noatime,nodiratime,fmask=0077,dmask=0077,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro 0 2
/swap/swapfile none swap defaults 0 0
tmpfs /tmp tmpfs defaults,nodev,nosuid,noexec,size=4G 0 0
Does anyone have an idea what has changed?
With kind regards
cassowarry
Last edited by cassowarry (2024-06-23 19:35:44)
Offline
It would seem that the /init in the initramfs isn't systemd but some script?
You could extract it and inspect the file - might hint where it's coming from.
Offline
It is a regular Arch install with systemd. It worked without the error message since installing Arch two years ago. But since an system update a month or two ago the error messages show up. It looks like the problem lies in init_functions of the standard mkinitcpio and came with commit 56228734a16bc69eaca7bc2c9feb91eb2d7206dd. I tried to open a ticket but I can't get an account because account creation is temporarily disabled.
Offline
Sanity check:
sudo lsinitcpio /boot/initramfs-linux*.img | grep tmp
Offline
$ sudo lsinitcpio /boot/initramfs-linux-zen.img | grep tmp
usr/bin/systemd-tmpfiles
Offline
Explains the error but why's there no tmp/ dir?
mkinitcpio.conf and what's the output of "mkinitcpio -P"?
Offline
mkinitcpio.conf:
# vim:set ft=sh
# MODULES
# The following modules are loaded before any boot hooks are
# run. Advanced users may wish to specify all system modules
# in this array. For instance:
# MODULES=(usbhid xhci_hcd)
MODULES=(btrfs amdgpu)
# BINARIES
# This setting includes any additional binaries a given user may
# wish into the CPIO image. This is run last, so it may be used to
# override the actual binaries included by a given hook
# BINARIES are dependency parsed, so you may safely ignore libraries
BINARIES=()
# FILES
# This setting is similar to BINARIES above, however, files are added
# as-is and are not parsed in any way. This is useful for config files.
FILES=()
# HOOKS
# This is the most important setting in this file. The HOOKS control the
# modules and scripts added to the image, and what happens at boot time.
# Order is important, and it is recommended that you do not change the
# order in which HOOKS are added. Run 'mkinitcpio -H <hook name>' for
# help on a given hook.
# 'base' is _required_ unless you know precisely what you are doing.
# 'udev' is _required_ in order to automatically load modules
# 'filesystems' is _required_ unless you specify your fs modules in MODULES
# Examples:
## This setup specifies all modules in the MODULES setting above.
## No RAID, lvm2, or encrypted root is needed.
# HOOKS=(base)
#
## This setup will autodetect all modules for your system and should
## work as a sane default
# HOOKS=(base udev autodetect modconf block filesystems fsck)
#
## This setup will generate a 'full' image which supports most systems.
## No autodetection is done.
# HOOKS=(base udev modconf block filesystems fsck)
#
## This setup assembles a mdadm array with an encrypted root file system.
## Note: See 'mkinitcpio -H mdadm_udev' for more information on RAID devices.
# HOOKS=(base udev modconf keyboard keymap consolefont block mdadm_udev encrypt filesystems fsck)
#
## This setup loads an lvm2 volume group.
# HOOKS=(base udev modconf block lvm2 filesystems fsck)
#
## This will create a systemd based initramfs which loads an encrypted root filesystem.
# HOOKS=(base systemd autodetect modconf kms keyboard sd-vconsole sd-encrypt block filesystems fsck)
#
## NOTE: If you have /usr on a separate partition, you MUST include the
# usr and fsck hooks.
HOOKS=(base udev autodetect microcode block kms keyboard keymap scencrypt fsck)
# COMPRESSION
# Use this to compress the initramfs image. By default, zstd compression
# is used for Linux ≥ 5.9 and gzip compression is used for Linux < 5.9.
# Use 'cat' to create an uncompressed image.
#COMPRESSION="zstd"
#COMPRESSION="gzip"
#COMPRESSION="bzip2"
#COMPRESSION="lzma"
#COMPRESSION="xz"
#COMPRESSION="lzop"
#COMPRESSION="lz4"
# COMPRESSION_OPTIONS
# Additional options for the compressor
#COMPRESSION_OPTIONS=()
# MODULES_DECOMPRESS
# Decompress loadable kernel modules and their firmware during initramfs
# creation. Switch (yes/no).
# Enable to allow further decreasing image size when using high compression
# (e.g. xz -9e or zstd --long --ultra -22) at the expense of increased RAM usage
# at early boot.
# Note that any compressed files will be placed in the uncompressed early CPIO
# to avoid double compression.
#MODULES_DECOMPRESS="no"
Offline
mkinitcpio -P:
$ sudo mkinitcpio -P
==> Using default configuration file: '/etc/mkinitcpio.conf'
-> -k /boot/vmlinuz-linux-zen -g /boot/initramfs-linux-zen.img
==> Using drop-in configuration file: 'asus.conf'
==> Starting build: '6.9.5-zen1-1-zen'
-> Running build hook: [base]
-> Running build hook: [udev]
-> Running build hook: [autodetect]
-> Running build hook: [microcode]
-> Running build hook: [block]
==> WARNING: Possibly missing firmware for module: 'xhci_pci'
-> Running build hook: [kms]
-> Running build hook: [keyboard]
-> Running build hook: [keymap]
-> Running build hook: [scencrypt]
==> WARNING: Possibly missing firmware for module: 'qat_420xx'
gpg: Die "Keybox" `/tmp/mkinitcpio.bVLGko/root/etc/initcpio/gpg/pubring.kbx' wurde erstellt
gpg: /tmp/mkinitcpio.bVLGko/root/etc/initcpio/gpg/trustdb.gpg: trust-db erzeugt
gpg: Schlüssel AC762A4885C5E584: Öffentlicher Schlüssel "(redacted)" importiert
gpg: Anzahl insgesamt bearbeiteter Schlüssel: 1
gpg: importiert: 1
gpg: Schlüssel CA9D8D2A06819EF8: Öffentlicher Schlüssel "(redacted)" importiert
gpg: Anzahl insgesamt bearbeiteter Schlüssel: 1
gpg: importiert: 1
-> Running build hook: [fsck]
==> Generating module dependencies
==> Creating zstd-compressed initcpio image: '/boot/initramfs-linux-zen.img'
-> Early uncompressed CPIO image generation successful
==> Initcpio image generation successful
==> Building image from preset: /etc/mkinitcpio.d/linux-zen.preset: 'fallback'
==> Using default configuration file: '/etc/mkinitcpio.conf'
-> -k /boot/vmlinuz-linux-zen -g /boot/initramfs-linux-zen-fallback.img -S autodetect
==> Using drop-in configuration file: 'asus.conf'
==> Starting build: '6.9.5-zen1-1-zen'
-> Running build hook: [base]
-> Running build hook: [udev]
-> Running build hook: [microcode]
-> Running build hook: [block]
==> WARNING: Possibly missing firmware for module: 'aic94xx'
==> WARNING: Possibly missing firmware for module: 'bfa'
==> WARNING: Possibly missing firmware for module: 'qed'
==> WARNING: Possibly missing firmware for module: 'qla1280'
==> WARNING: Possibly missing firmware for module: 'qla2xxx'
==> WARNING: Possibly missing firmware for module: 'wd719x'
==> WARNING: Possibly missing firmware for module: 'xhci_pci'
-> Running build hook: [kms]
==> WARNING: Possibly missing firmware for module: 'ast'
-> Running build hook: [keyboard]
-> Running build hook: [keymap]
-> Running build hook: [scencrypt]
==> WARNING: Possibly missing firmware for module: 'qat_420xx'
gpg: Die "Keybox" `/tmp/mkinitcpio.bbhbPt/root/etc/initcpio/gpg/pubring.kbx' wurde erstellt
gpg: /tmp/mkinitcpio.bbhbPt/root/etc/initcpio/gpg/trustdb.gpg: trust-db erzeugt
gpg: Schlüssel AC762A4885C5E584: Öffentlicher Schlüssel "(redacted)" importiert
gpg: Anzahl insgesamt bearbeiteter Schlüssel: 1
gpg: importiert: 1
gpg: Schlüssel CA9D8D2A06819EF8: Öffentlicher Schlüssel "(redacted)" importiert
gpg: Anzahl insgesamt bearbeiteter Schlüssel: 1
gpg: importiert: 1
-> Running build hook: [fsck]
==> Generating module dependencies
==> Creating zstd-compressed initcpio image: '/boot/initramfs-linux-zen-fallback.img'
-> Early uncompressed CPIO image generation successful
==> Initcpio image generation successful
Last edited by cassowarry (2024-06-20 15:57:50)
Offline
initramfs still has not tmp/ dir?
The only things that stick out are the yubikey scencrypt hook and the "drop-in configuration file: 'asus.conf'" - what is the latter and does removing that and scencrypt add a tmp/ dir?
What if you explicitly add "FILES=(/tmp/foo)" to the mkinitcpio.conf and
echo bar > /tmp/foo
before you generate it?
Do you get tmp/ and tmp/foo?
Offline
Thank you @seth for your help. asus.conf is supplied from asus-linux and is fairly simple:
MODULES+=(hid_asus asus_wmi asus_nb_wmi)
I removed it and still no tmp/ dir.
Offline
I removed the hook scencrypt and the directory tmp/ was in the initramfs. I think you found the culprit. Thank you. Now I need to figure out what needs to be changed to have scencrypt and tmp/.
Offline
Offline
Thank you @seth for pointing this out. It solved the problem.
Offline
You probably want to file a bug for this at https://github.com/fuhry/initramfs-scencrypt/issues
Offline