Skip to main content
Topic: init (Read 1851 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

init

Hi guys,

I have a simple question.After last upgrade, I get following message on boot.Maybe can somebody explain what does it mean.
Code: [Select]
/init: line 5: tmpfiles: not found

I use openrc as init and have whole disk encryption in legacy mode.

Thanks

Re: init

Reply #1
Hello, we need more details.

Does it only print this one line and boot up normally after? Or does it not boot?

Do you have a /init file? If so, what's in it?

Re: init

Reply #2
Hello,

Sorry for late reply. I have this file /usr/lib/initcpio/init.
Here is its content
Code: [Select]
#!/usr/bin/ash
# SPDX-License-Identifier: GPL-2.0-only

export PATH='/usr/local/sbin:/usr/local/bin:/usr/bin'

udevd_running=0
mount_handler=default_mount_handler
init=/sbin/init
rd_logmask=0

. /init_functions

mount_setup

# parse the kernel command line
parse_cmdline </proc/cmdline

# setup logging as early as possible
rdlogger_start

# busybox ash supports string replacements
# shellcheck disable=SC3060
# assigned by parse_cmdline
# shellcheck disable=SC2154
for d in ${disablehooks//,/ }; do
    [ -e "/hooks/$d" ] && chmod 644 "/hooks/$d"
done

# shellcheck disable=SC1091
. /config

# We rely on word splitting
# shellcheck disable=SC2086
run_hookfunctions 'run_earlyhook' 'early hook' $EARLYHOOKS

if [ -n "$earlymodules$MODULES" ]; then
    # busybox ash supports string replacements
    # shellcheck disable=SC3060,SC2086
    modprobe -qab ${earlymodules//,/ } $MODULES
fi

# We rely on word splitting
# shellcheck disable=SC2086
run_hookfunctions 'run_hook' 'hook' $HOOKS

# honor the old behavior of break=y as a synonym for break=premount
# assigned by parse_cmdline
# shellcheck disable=SC2154
if [ "${break}" = "y" ] || [ "${break}" = "premount" ]; then
    # shellcheck disable=SC2086
    run_hookfunctions 'run_emergencyhook' 'emergency hook' $EMERGENCYHOOKS
    echo ":: Pre-mount break requested, type 'exit' to resume operation"
    launch_interactive_shell
fi

if rootdev="$(resolve_device "$root")"; then
    # If the tag is supported by util-linux mount, pass it as is.
    # Otherwise, use the resolved device path.
    case "$root" in
        'UUID='* | 'LABEL='* | 'PARTUUID='* | 'PARTLABEL='*) : ;;
        *) root="$rootdev" ;;
    esac
fi
unset rootdev

fsck_root

# Mount root at /new_root
"$mount_handler" /new_root

# We rely on word splitting
# shellcheck disable=SC2086
run_hookfunctions 'run_latehook' 'late hook' $LATEHOOKS

# We rely on word splitting
# shellcheck disable=SC2086
run_hookfunctions 'run_cleanuphook' 'cleanup hook' $CLEANUPHOOKS

if [ "$(stat -c %D /)" = "$(stat -c %D /new_root)" ]; then
    # Nothing got mounted on /new_root. This is the end, we don't know what to do anymore
    # We fall back into a shell, but the shell has now PID 1
    # This way, manual recovery is still possible.
    # shellcheck disable=SC2086
    run_hookfunctions 'run_emergencyhook' 'emergency hook' $EMERGENCYHOOKS
    err "Failed to mount the real root device."
    echo "Bailing out, you are on your own. Good luck."
    echo
    launch_interactive_shell --exec
elif [ ! -x "/new_root${init}" ]; then
    # Successfully mounted /new_root, but ${init} is missing
    # The same logic as above applies
    # shellcheck disable=SC2086
    run_hookfunctions 'run_emergencyhook' 'emergency hook' $EMERGENCYHOOKS
    err "Root device mounted successfully, but ${init} does not exist."
    echo "Bailing out, you are on your own. Good luck."
    echo
    launch_interactive_shell --exec
fi

if [ "${break}" = "postmount" ]; then
    # shellcheck disable=SC2086
    run_hookfunctions 'run_emergencyhook' 'emergency hook' $EMERGENCYHOOKS
    echo ":: Post-mount break requested, type 'exit' to resume operation"
    launch_interactive_shell
fi

# this should always be the last thing we do before the switch_root.
rdlogger_stop

exec env -i \
    "TERM=$TERM" \
    /usr/bin/switch_root /new_root "$init" "$@"

# vim: set ft=sh ts=4 sw=4 et:

Do not know, if it is the right file?

Thank you

Re: init

Reply #3
The init here should be /sbin/init. If so, it is not a script file. What's your pacman -Qkk openrc?

Re: init

Reply #4
Hello,

thank you for answer.The command gives following output>
Code: [Select]
pacman -Qkk openrc
backup file: openrc: /etc/conf.d/hostname (Modification time mismatch)
backup file: openrc: /etc/conf.d/hostname (Size mismatch)
backup file: openrc: /etc/conf.d/hostname (MD5 checksum mismatch)
backup file: openrc: /etc/conf.d/hostname (SHA256 checksum mismatch)
openrc: 361 total files, 0 altered files


What else i should check?

thanks

Re: init

Reply #5
Hello,

So I used Googles Bard to find a solution. And the it gave following output.
Quote
The error message "/init: line 5: tmpfiles: not found" indicates that the OpenRC init system is unable to locate the "tmpfiles" utility. This utility is responsible for creating and managing temporary files and directories during the system boot process. Without "tmpfiles" in place, the boot process will not be able to proceed correctly.

This error is typically encountered when the OpenRC package has been removed or corrupted, or when the initrd image has been built without the necessary dependencies for "tmpfiles". To resolve this issue, you will need to reinstall the OpenRC package and rebuild the initrd image.

Here's how to fix the error:

1. **Reinstall the OpenRC package:**
```
sudo pacman -S openrc
```

2. **Rebuild the initrd image:**
```
sudo mkinitcpio -p linux
```

After rebuilding the initrd image, the boot process should proceed normally without encountering the "tmpfiles" error.



Can anybody tell if this procedure is correct , is it save to invoke those commands?

Thanks

Re: init

Reply #6
Can anybody tell if this procedure is correct , is it save to invoke those commands?

AFAIK in artix there is no "tmpfiles" utility. There is etmpfiles, which is invoked by openrc on boot. Maybe you have some outdated or misconfigured initscript in you /etc/init.d? Try to find like
Code: [Select]
grep -w tmpfiles /etc/init.d/*

Re: init

Reply #7
Well,

If there is something corrupted, maybe. But I did not do anything but upgrading.
Code: [Select]

grep -w tmpfiles /etc/init.d/*
/etc/init.d/etmpfiles-dev:description="Set up tmpfiles.d entries for /dev"
/etc/init.d/etmpfiles-dev: provide tmpfiles-dev tmpfiles.dev
/etc/init.d/etmpfiles-dev: ebegin "Setting up tmpfiles.d entries for /dev"
/etc/init.d/etmpfiles-setup:description="Set up tmpfiles.d entries"
/etc/init.d/etmpfiles-setup: provide tmpfiles-setup tmpfiles.setup
/etc/init.d/etmpfiles-setup: ebegin "Setting up tmpfiles.d entries"
/etc/init.d/kmod-static-nodes: before tmpfiles.dev dev
/etc/init.d/kmod-static-nodes: checkpath -q -d /run/tmpfiles.d
/etc/init.d/kmod-static-nodes: kmod static-nodes --format=tmpfiles --output=/run/tmpfiles.d/kmod.conf


I am not very smart of this. Any idea?

Thanks

Re: init

Reply #8
It's exactly alike mine output, so it's not a reason. Maybe we can start from the beginning? I'd try to find that boot message in logs:

Code: [Select]
sudo grep "tmpfiles: not found" /var/log/*

Re: init

Reply #9
Here is the output>
Code: [Select]

sudo grep "tmpfiles: not found" /var/log/*

grep: /var/log/README: No such file or directory
grep: /var/log/atop: Is a directory
grep: /var/log/audit: Is a directory
/var/log/auth.log:Dec 17 20:58:04 deepwater sudo:   tokaro : TTY=pts/1 ; PWD=/var/log ; USER=root ; COMMAND=/usr/bin/grep 'tmpfiles: not found' /var/log/README /var/log/Xorg.0.log /var/log/Xorg.0.log.old /var/log/Xorg.1.log /var/log/atop /var/log/audit /var/log/auth.log /var/log/btmp /var/log/clamav /var/log/crond.log /var/log/daemon.log /var/log/dmesg /var/log/errors.log /var/log/everything.log /var/log/faillog /var/log/gufw.log /var/log/iptables.log /var/log/kernel.log /var/log/lastlog /var/log/lightdm /var/log/lynis-report.dat /var/log/lynis.log /var/log/messages.log /var/log/old /var/log/pacman.log /var/log/rc.log /var/log/rkhunter.log /var/log/rkhunter.log.old /var/log/sa /var/log/sddm.log /var/log/syslog.log /var/log/timeshift /var/log/ufw.log /var/log/usbguard /var/log/user.log /var/log/wtmp
/var/log/auth.log:Dec 18 15:53:37 deepwater sudo:   tokaro : TTY=pts/1 ; PWD=/home/tokaro ; USER=root ; COMMAND=/usr/bin/grep 'tmpfiles: not found' /var/log/README /var/log/Xorg.0.log /var/log/Xorg.0.log.old /var/log/Xorg.1.log /var/log/atop /var/log/audit /var/log/auth.log /var/log/btmp /var/log/clamav /var/log/crond.log /var/log/daemon.log /var/log/dmesg /var/log/errors.log /var/log/everything.log /var/log/faillog /var/log/gufw.log /var/log/iptables.log /var/log/kernel.log /var/log/lastlog /var/log/lightdm /var/log/lynis-report.dat /var/log/lynis.log /var/log/messages.log /var/log/old /var/log/pacman.log /var/log/rc.log /var/log/rkhunter.log /var/log/rkhunter.log.old /var/log/sa /var/log/sddm.log /var/log/syslog.log /var/log/timeshift /var/log/ufw.log /var/log/usbguard /var/log/user.log /var/log/wtmp
/var/log/auth.log:Dec 18 16:38:40 deepwater sudo:   tokaro : TTY=pts/1 ; PWD=/home/tokaro ; USER=root ; COMMAND=/usr/bin/grep 'tmpfiles: not found' /var/log/README /var/log/Xorg.0.log /var/log/Xorg.0.log.old /var/log/Xorg.1.log /var/log/atop /var/log/audit /var/log/auth.log /var/log/btmp /var/log/clamav /var/log/crond.log /var/log/daemon.log /var/log/dmesg /var/log/errors.log /var/log/everything.log /var/log/faillog /var/log/gufw.log /var/log/iptables.log /var/log/kernel.log /var/log/lastlog /var/log/lightdm /var/log/lynis-report.dat /var/log/lynis.log /var/log/messages.log /var/log/old /var/log/pacman.log /var/log/rc.log /var/log/rkhunter.log /var/log/rkhunter.log.old /var/log/sa /var/log/sddm.log /var/log/syslog.log /var/log/timeshift /var/log/ufw.log /var/log/usbguard /var/log/user.log /var/log/wtmp
grep: /var/log/clamav: Is a directory
grep: /var/log/lightdm: Is a directory
grep: /var/log/old: Is a directory
grep: /var/log/sa: Is a directory
grep: /var/log/timeshift: Is a directory
grep: /var/log/usbguard: Is a directory





Re: init

Reply #10
Nothing. ok, maybe try to find line with this command in the whole filesystem?

Where do you see error message? Among openrc boot lines?

What is your system btw? Is it pure artix install or migration from arch?

Re: init

Reply #11
The grep does not check files recursively. Should be:
Code: [Select]
sudo find /var/log -type f -exec grep -HIn 'foo' \{\} \;
Also, do you log dmesg to files?

Re: init

Reply #12
The grep does not check files recursively.

Nowadays GNU grep has "-r" switch, but you're right, I should thought about it. In my (weak) excuse I personally don't have subdirectories in /var/log or /etc/init.d.

Re: init

Reply #13
First I want to thank you that you want to help.
My system has following specs>
Full disk encryption in legacy mode - MBR + LUKS+LVM. I use GRUB as bootloader which decrypts HDD.So when I boot the pc I have to enter the password 2 times.
First the Grub asks for password after that the Grub menu is displayed,  so I choose Artix in menu.After that the

init /   - message is displayed.

Just below that the passphrase has to be entered for second time.

After that Openrc boots without a issue.

So I think it may or may not be related to Openrc.

I suspect Openrc because of the contents of the message.

Re: init

Reply #14
I suspect the problem may be in your initramfs image file. Is it generated in artix? Check your mkinitcpio configuration.