You are not logged in.
when loading up arch i got the error:
error: file 'initramfs-linux.img' not found.
i had gotten this before and knew the fix so went into a liveboot, mounted everything and then did
mkinitcpio -p linux
but after i did this, i got the error of the subject
full log:
==> Building image from preset: /etc/mkinitcpio.d/linux.preset: 'default'
==> Using default configuration file: '/etc/mkinitcpio.conf'
-> -k /boot/vmlinuz-linux -g /boot/initramfs-linux.img --microcode /boot/amd-ucode.img
mktemp: invalid option -- '-'
Unknown option --
NAME
mktemp - Create a temporary file or directory
SYNOPSIS
mktemp [OPTIONS]... [TEMPLATE]
DESCRIPTION
Create a temporary file or directory using TEMPLATE or "tmp.XXXXXX" in $TMPDIR or
/tmp if $TMPDIR is unset or empty then print its path to stdout.
OPTIONS
-d
Create a directory instead of a file.
-h
Print this help message and exit.
-v
Print the version and exit.
==> ERROR: Failed to create temporary working directory in /tmp
==> Building image from preset: /etc/mkinitcpio.d/linux.preset: 'fallback'
==> Using default configuration file: '/etc/mkinitcpio.conf'
-> -k /boot/vmlinuz-linux -g /boot/initramfs-linux-fallback.img -S autodetect --microcode /boot/amd-ucode.img
mktemp: invalid option -- '-'
Unknown option --
NAME
mktemp - Create a temporary file or directory
SYNOPSIS
mktemp [OPTIONS]... [TEMPLATE]
DESCRIPTION
Create a temporary file or directory using TEMPLATE or "tmp.XXXXXX" in $TMPDIR or
/tmp if $TMPDIR is unset or empty then print its path to stdout.
OPTIONS
-d
Create a directory instead of a file.
-h
Print this help message and exit.
-v
Print the version and exit.
==> ERROR: Failed to create temporary working directory in /tmp
lsblk:
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
loop0 7:0 0 688.5M 1 loop
sda 8:0 0 931.5G 0 disk
├─sda1 8:1 0 511M 0 part /boot
└─sda2 8:2 0 931G 0 part
└─encrypted 254:1 0 931G 0 crypt /var/log
/var/cache/pacman/pkg
/home
/.snapshots
also /tmp permissions:
drwxrwxrwt 2 root root 40 Sep 25 15:13 tmp
Last edited by worbgge (2023-09-25 16:52:27)
Offline
type mktemp
pacman -Qikk mkinitcpio
This isn't a permission problem, mktemp gets invoked w/ a bogus parameter.
In doubt
bash -x /usr/bin/mkinitcpio -p linux
to see where
Online
type mktemp
mktemp is /usr/local/bin/mktemp
pacman -Qikk mkinitcpio
Name : mkinitcpio
Version : 36-1
Description : Modular initramfs image creation utility
Architecture : any
URL : https://gitlab.archlinux.org/archlinux/mkinitcpio/mkinitcpio
Licenses : GPL
Groups : None
Provides : initramfs
Depends On : awk mkinitcpio-busybox>=1.19.4-2 kmod util-linux>=2.23 libarchive coreutils bash binutils diffutils findutils grep filesystem>=2011.10-1 zstd systemd
Optional Deps : gzip: Use gzip compression for the initramfs image [installed]
xz: Use lzma or xz compression for the initramfs image [installed]
bzip2: Use bzip2 compression for the initramfs image [installed]
lzop: Use lzo compression for the initramfs image
lz4: Use lz4 compression for the initramfs image [installed]
mkinitcpio-nfs-utils: Support for root filesystem on NFS
Required By : linux
Optional For : None
Conflicts With : None
Replaces : None
Installed Size : 144.18 KiB
Packager : Morten Linderud <foxboron@archlinux.org>
Build Date : Mon May 29 22:59:11 2023
Install Date : Fri Jun 2 00:01:44 2023
Install Reason : Installed as a dependency for another package
Install Script : Yes
Validated By : Signature
backup file: mkinitcpio: /etc/mkinitcpio.conf (Modification time mismatch)
backup file: mkinitcpio: /etc/mkinitcpio.conf (Size mismatch)
backup file: mkinitcpio: /etc/mkinitcpio.conf (MD5 checksum mismatch)
backup file: mkinitcpio: /etc/mkinitcpio.conf (SHA256 checksum mismatch)
mkinitcpio: 84 total files, 0 altered files
This isn't a permission problem, mktemp gets invoked w/ a bogus parameter.
In doubt
bash -x /usr/bin/mkinitcpio -p linux
to see where
+ declare -r version=36
+ shopt -s extglob
+ _f_functions=/usr/lib/initcpio/functions
+ _f_config=/etc/mkinitcpio.conf
+ _d_config=/etc/mkinitcpio.conf.d
+ _d_hooks=/etc/initcpio/hooks:/usr/lib/initcpio/hooks
+ _d_install=/etc/initcpio/install:/usr/lib/initcpio/install
+ _d_post=/etc/initcpio/post:/usr/lib/initcpio/post
+ _d_flag_hooks=
+ _d_flag_install=
+ _d_flag_post=
+ _d_firmware=({/usr,}/lib/firmware/updates {/usr,}/lib/firmware)
+ _d_presets=/etc/mkinitcpio.d
+ _optmoduleroot=
+ _optgenimg=
+ _optcompress=
+ _opttargetdir=
+ _optosrelease=
+ _optuki=
+ _optmicrocode=()
+ _optcmdline=
+ _optsplash=
+ _optkernelimage=
+ _optuefistub=
+ _optshowautomods=0
+ _optsavetree=0
+ _optshowmods=0
+ _optremove=0
+ _optnocmdline=0
+ _optquiet=1
+ _optcolor=1
+ _optconfd=1
+ _optskiphooks=()
+ _optaddhooks=()
+ _hooks=()
+ _optpreset=()
+ _tmpfiles=()
+ _generated=()
+ declare -A _runhooks _addedmodules _modpaths _autodetect_cache
+ export PATH=/usr/local/sbin:/usr/local/bin:/usr/bin
+ PATH=/usr/local/sbin:/usr/local/bin:/usr/bin
+ unset GREP_OPTIONS CDPATH
+ . /usr/lib/initcpio/functions
++ shopt -s extglob
+ trap cleanup EXIT
+ _opt_short=A:c:D:g:H:hk:nLMPp:Rr:S:sd:t:U:Vvz:
+ _opt_long=('add:' 'addhooks:' 'config:' 'generate:' 'hookdir': 'hookhelp:' 'help' 'kernel:' 'listhooks' 'automods' 'moduleroot:' 'nocolor' 'allpresets' 'preset:' 'remove' 'skiphooks:' 'save' 'generatedir:' 'builddir:' 'version' 'verbose' 'compress:' 'uki:' 'uefi:' 'microcode:' 'splash:' 'kernelimage:' 'uefistub:' 'cmdline:' 'osrelease:' 'no-cmdline')
+ parseopts A:c:D:g:H:hk:nLMPp:Rr:S:sd:t:U:Vvz: add: addhooks: config: generate: hookdir: hookhelp: help kernel: listhooks automods moduleroot: nocolor allpresets preset: remove skiphooks: save generatedir: builddir: version verbose compress: uki: uefi: microcode: splash: kernelimage: uefistub: cmdline: osrelease: no-cmdline -- -p linux
+ local opt= optarg= i= shortopts=A:c:D:g:H:hk:nLMPp:Rr:S:sd:t:U:Vvz:
+ longopts=()
+ unused_argv=()
+ local -a longopts unused_argv
+ shift
+ [[ -n add: ]]
+ [[ add: != \-\- ]]
+ longopts+=("$1")
+ shift
+ [[ -n addhooks: ]]
+ [[ addhooks: != \-\- ]]
+ longopts+=("$1")
+ shift
+ [[ -n config: ]]
+ [[ config: != \-\- ]]
+ longopts+=("$1")
+ shift
+ [[ -n generate: ]]
+ [[ generate: != \-\- ]]
+ longopts+=("$1")
+ shift
+ [[ -n hookdir: ]]
+ [[ hookdir: != \-\- ]]
+ longopts+=("$1")
+ shift
+ [[ -n hookhelp: ]]
+ [[ hookhelp: != \-\- ]]
+ longopts+=("$1")
+ shift
+ [[ -n help ]]
+ [[ help != \-\- ]]
+ longopts+=("$1")
+ shift
+ [[ -n kernel: ]]
+ [[ kernel: != \-\- ]]
+ longopts+=("$1")
+ shift
+ [[ -n listhooks ]]
+ [[ listhooks != \-\- ]]
+ longopts+=("$1")
+ shift
+ [[ -n automods ]]
+ [[ automods != \-\- ]]
+ longopts+=("$1")
+ shift
+ [[ -n moduleroot: ]]
+ [[ moduleroot: != \-\- ]]
+ longopts+=("$1")
+ shift
+ [[ -n nocolor ]]
+ [[ nocolor != \-\- ]]
+ longopts+=("$1")
+ shift
+ [[ -n allpresets ]]
+ [[ allpresets != \-\- ]]
+ longopts+=("$1")
+ shift
+ [[ -n preset: ]]
+ [[ preset: != \-\- ]]
+ longopts+=("$1")
+ shift
+ [[ -n remove ]]
+ [[ remove != \-\- ]]
+ longopts+=("$1")
+ shift
+ [[ -n skiphooks: ]]
+ [[ skiphooks: != \-\- ]]
+ longopts+=("$1")
+ shift
+ [[ -n save ]]
+ [[ save != \-\- ]]
+ longopts+=("$1")
+ shift
+ [[ -n generatedir: ]]
+ [[ generatedir: != \-\- ]]
+ longopts+=("$1")
+ shift
+ [[ -n builddir: ]]
+ [[ builddir: != \-\- ]]
+ longopts+=("$1")
+ shift
+ [[ -n version ]]
+ [[ version != \-\- ]]
+ longopts+=("$1")
+ shift
+ [[ -n verbose ]]
+ [[ verbose != \-\- ]]
+ longopts+=("$1")
+ shift
+ [[ -n compress: ]]
+ [[ compress: != \-\- ]]
+ longopts+=("$1")
+ shift
+ [[ -n uki: ]]
+ [[ uki: != \-\- ]]
+ longopts+=("$1")
+ shift
+ [[ -n uefi: ]]
+ [[ uefi: != \-\- ]]
+ longopts+=("$1")
+ shift
+ [[ -n microcode: ]]
+ [[ microcode: != \-\- ]]
+ longopts+=("$1")
+ shift
+ [[ -n splash: ]]
+ [[ splash: != \-\- ]]
+ longopts+=("$1")
+ shift
+ [[ -n kernelimage: ]]
+ [[ kernelimage: != \-\- ]]
+ longopts+=("$1")
+ shift
+ [[ -n uefistub: ]]
+ [[ uefistub: != \-\- ]]
+ longopts+=("$1")
+ shift
+ [[ -n cmdline: ]]
+ [[ cmdline: != \-\- ]]
+ longopts+=("$1")
+ shift
+ [[ -n osrelease: ]]
+ [[ osrelease: != \-\- ]]
+ longopts+=("$1")
+ shift
+ [[ -n no-cmdline ]]
+ [[ no-cmdline != \-\- ]]
+ longopts+=("$1")
+ shift
+ [[ -n -- ]]
+ [[ -- != \-\- ]]
+ shift
+ (( 2 ))
+ case "$1" in
+ (( i = 1 ))
+ (( i < 2 ))
+ opt=p
+ [[ A:c:D:g:H:hk:nLMPp:Rr:S:sd:t:U:Vvz: != *p* ]]
+ OPTRET+=("-$opt")
+ [[ A:c:D:g:H:hk:nLMPp:Rr:S:sd:t:U:Vvz: == *\p\:* ]]
+ (( i < 2 - 1 ))
+ (( i == 2 - 1 ))
+ [[ -n linux ]]
+ OPTRET+=("$2")
+ shift
+ break
+ shift
+ (( 0 ))
+ OPTRET+=('--' "${unused_argv[@]}" "$@")
+ unset longoptmatch
+ return 0
+ set -- -p linux --
+ unset _opt_short _opt_long OPTRET
+ :
+ case "$1" in
+ shift
+ _optpreset+=("$1")
+ shift
+ :
+ case "$1" in
+ shift
+ break 2
+ OPTREST=("$@")
+ [[ -t 1 ]]
+ (( _optremove && 1 ))
+ [[ -n '' ]]
+ [[ -n '' ]]
+ [[ -e /proc/self/mountinfo ]]
+ [[ -e /dev/fd ]]
+ (( 1 ))
+ map process_preset linux
+ local r=0
+ for _ in "${@:2}"
+ process_preset linux
+ local preset=linux preset_image= preset_options=
+ local -a preset_mkopts preset_cmd preset_remove_cmd
+ [[ -n '' ]]
+ [[ linux != */* ]]
+ printf -v preset %s/%s.preset /etc/mkinitcpio.d linux
+ . /etc/mkinitcpio.d/linux.preset
++ ALL_kver=/boot/vmlinuz-linux
++ ALL_microcode=(/boot/*-ucode.img)
++ PRESETS=('default' 'fallback')
++ default_image=/boot/initramfs-linux.img
++ fallback_image=/boot/initramfs-linux-fallback.img
++ fallback_options='-S autodetect'
+ (( ! 2 ))
+ (( _optquiet ))
+ (( _optcolor ))
+ (( _optsavetree ))
+ ret=0
+ for p in "${PRESETS[@]}"
+ (( _optremove ))
+ msg 'Building image from preset: /etc/mkinitcpio.d/linux.preset: '\''default'\'''
+ local 'mesg=Building image from preset: /etc/mkinitcpio.d/linux.preset: '\''default'\'''
+ shift
+ printf '==> Building image from preset: /etc/mkinitcpio.d/linux.preset: '\''default'\''\n'
==> Building image from preset: /etc/mkinitcpio.d/linux.preset: 'default'
+ preset_cmd=("${preset_mkopts[@]}")
+ preset_remove_cmd=()
+ preset_kver=default_kver
+ [[ -n /boot/vmlinuz-linux ]]
+ preset_cmd+=(-k "${!preset_kver:-$ALL_kver}")
+ preset_config=default_config
+ [[ -n '' ]]
+ msg 'Using default configuration file: '\''%s'\''' /etc/mkinitcpio.conf
+ local 'mesg=Using default configuration file: '\''%s'\'''
+ shift
+ printf '==> Using default configuration file: '\''%s'\''\n' /etc/mkinitcpio.conf
==> Using default configuration file: '/etc/mkinitcpio.conf'
+ preset_uki=default_uki
+ [[ ! -v default_uki ]]
+ [[ -v default_efi_image ]]
+ [[ -n '' ]]
+ preset_image=default_image
+ [[ -n /boot/initramfs-linux.img ]]
+ preset_cmd+=(-g "${!preset_image}")
+ preset_remove_cmd+=("${!preset_image}")
+ local -n preset_options=default_options
+ [[ '' == *a* ]]
+ [[ -n '' ]]
+ local -n preset_microcode=default_microcode
+ [[ -n '' ]]
+ [[ -n /boot/amd-ucode.img ]]
+ mapfile -d '' -O 4 -t preset_cmd
++ printf -- '--microcode\0%s\0' /boot/amd-ucode.img
+ (( _optremove ))
+ local preset_name=linux.preset
+ preset_name=linux-default
+ preset_cmd+=("${OPTREST[@]}")
+ msg2 '-k /boot/vmlinuz-linux -g /boot/initramfs-linux.img --microcode /boot/amd-ucode.img'
+ local 'mesg=-k /boot/vmlinuz-linux -g /boot/initramfs-linux.img --microcode /boot/amd-ucode.img'
+ shift
+ printf ' -> -k /boot/vmlinuz-linux -g /boot/initramfs-linux.img --microcode /boot/amd-ucode.img\n'
-> -k /boot/vmlinuz-linux -g /boot/initramfs-linux.img --microcode /boot/amd-ucode.img
+ MKINITCPIO_PROCESS_PRESET=linux-default
+ /usr/bin/mkinitcpio -k /boot/vmlinuz-linux -g /boot/initramfs-linux.img --microcode /boot/amd-ucode.img
mktemp: invalid option -- '-'
Unknown option --
NAME
mktemp - Create a temporary file or directory
SYNOPSIS
mktemp [OPTIONS]... [TEMPLATE]
DESCRIPTION
Create a temporary file or directory using TEMPLATE or "tmp.XXXXXX" in $TMPDIR or
/tmp if $TMPDIR is unset or empty then print its path to stdout.
OPTIONS
-d
Create a directory instead of a file.
-h
Print this help message and exit.
-v
Print the version and exit.
==> ERROR: Failed to create temporary working directory in /tmp
+ (( 1 ))
+ ret=1
+ for p in "${PRESETS[@]}"
+ (( _optremove ))
+ msg 'Building image from preset: /etc/mkinitcpio.d/linux.preset: '\''fallback'\'''
+ local 'mesg=Building image from preset: /etc/mkinitcpio.d/linux.preset: '\''fallback'\'''
+ shift
+ printf '==> Building image from preset: /etc/mkinitcpio.d/linux.preset: '\''fallback'\''\n'
==> Building image from preset: /etc/mkinitcpio.d/linux.preset: 'fallback'
+ preset_cmd=("${preset_mkopts[@]}")
+ preset_remove_cmd=()
+ preset_kver=fallback_kver
+ [[ -n /boot/vmlinuz-linux ]]
+ preset_cmd+=(-k "${!preset_kver:-$ALL_kver}")
+ preset_config=fallback_config
+ [[ -n '' ]]
+ msg 'Using default configuration file: '\''%s'\''' /etc/mkinitcpio.conf
+ local 'mesg=Using default configuration file: '\''%s'\'''
+ shift
+ printf '==> Using default configuration file: '\''%s'\''\n' /etc/mkinitcpio.conf
==> Using default configuration file: '/etc/mkinitcpio.conf'
+ preset_uki=fallback_uki
+ [[ ! -v fallback_uki ]]
+ [[ -v fallback_efi_image ]]
+ [[ -n '' ]]
+ preset_image=fallback_image
+ [[ -n /boot/initramfs-linux-fallback.img ]]
+ preset_cmd+=(-g "${!preset_image}")
+ preset_remove_cmd+=("${!preset_image}")
+ local -n preset_options=fallback_options
+ [[ '' == *a* ]]
+ [[ -n -S autodetect ]]
+ mapfile -d ' ' -O 4 -t preset_cmd
++ printf %s '-S autodetect'
+ local -n preset_microcode=fallback_microcode
+ [[ -n '' ]]
+ [[ -n /boot/amd-ucode.img ]]
+ mapfile -d '' -O 6 -t preset_cmd
++ printf -- '--microcode\0%s\0' /boot/amd-ucode.img
+ (( _optremove ))
+ local preset_name=linux.preset
+ preset_name=linux-fallback
+ preset_cmd+=("${OPTREST[@]}")
+ msg2 '-k /boot/vmlinuz-linux -g /boot/initramfs-linux-fallback.img -S autodetect --microcode /boot/amd-ucode.img'
+ local 'mesg=-k /boot/vmlinuz-linux -g /boot/initramfs-linux-fallback.img -S autodetect --microcode /boot/amd-ucode.img'
+ shift
+ printf ' -> -k /boot/vmlinuz-linux -g /boot/initramfs-linux-fallback.img -S autodetect --microcode /boot/amd-ucode.img\n'
-> -k /boot/vmlinuz-linux -g /boot/initramfs-linux-fallback.img -S autodetect --microcode /boot/amd-ucode.img
+ MKINITCPIO_PROCESS_PRESET=linux-fallback
+ /usr/bin/mkinitcpio -k /boot/vmlinuz-linux -g /boot/initramfs-linux-fallback.img -S autodetect --microcode /boot/amd-ucode.img
mktemp: invalid option -- '-'
Unknown option --
NAME
mktemp - Create a temporary file or directory
SYNOPSIS
mktemp [OPTIONS]... [TEMPLATE]
DESCRIPTION
Create a temporary file or directory using TEMPLATE or "tmp.XXXXXX" in $TMPDIR or
/tmp if $TMPDIR is unset or empty then print its path to stdout.
OPTIONS
-d
Create a directory instead of a file.
-h
Print this help message and exit.
-v
Print the version and exit.
==> ERROR: Failed to create temporary working directory in /tmp
+ (( 1 ))
+ ret=1
+ exit 1
+ (( 2 > 255 ? r=1 : ++r ))
+ return 1
+ exit
+ cleanup
+ local err=1
+ (( 0 ))
+ [[ -n '' ]]
+ exit 1
Offline
seth wrote:type mktemp
mktemp is /usr/local/bin/mktemp
Full stop. Why are you overriding the system mktemp?
Online
worbgge wrote:seth wrote:type mktemp
mktemp is /usr/local/bin/mktemp
Full stop. Why are you overriding the system mktemp?
idk, didn't mean to do it myself
Offline
Arch doesn't put things in /usr/local/. YOU put something(s) in there that override the Arch packaged versions. See what's there and figure out what you did and why.
Online
Arch doesn't put things in /usr/local/. YOU put something(s) in there that override the Arch packaged versions. See what's there and figure out what you did and why.
it looks like the usual mktemp binary, can i just mv it back to the /usr/bin? or should i remove the /usr/local/ version and re-download the binary
Offline
ok removed the /usr/local version, ran mkinitcpio -p linux and now it seems to work, thank you for the help (marking solved)
Offline