You are not logged in.

#1 2022-04-01 05:40:52

Pinochet
Member
From: Syria
Registered: 2022-04-01
Posts: 10

[SOLVED] mkinitcpio fails to generate initramfs

After an update, mkinitcpio fails to generate the initramfs every time.

$ sudo mkinitcpio -P
==> Building image from preset: /etc/mkinitcpio.d/linux-hardened.preset: 'default'
  -> -k /boot/vmlinuz-linux-hardened -c /etc/mkinitcpio.conf -g /boot/initramfs-linux-hardened.img
==> ERROR: invalid kernel specified: `/boot/vmlinuz-linux-hardened'
==> Building image from preset: /etc/mkinitcpio.d/linux-hardened.preset: 'fallback'
  -> -k /boot/vmlinuz-linux-hardened -c /etc/mkinitcpio.conf -g /boot/initramfs-linux-hardened-fallback.img -S autodetect
==> ERROR: invalid kernel specified: `/boot/vmlinuz-linux-hardened'
==> Building image from preset: /etc/mkinitcpio.d/linux.preset: 'default'
  -> -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux.img
==> ERROR: invalid kernel specified: `/boot/vmlinuz-linux'
==> Building image from preset: /etc/mkinitcpio.d/linux.preset: 'fallback'
  -> -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux-fallback.img -S autodetect
==> ERROR: invalid kernel specified: `/boot/vmlinuz-linux'

After searching around, I found a tempoary solution that will generate a working image.

$ ls /lib/modules/
5.16.18-hardened1-1-hardened  5.17.1-arch1-1

$ sudo mkinitcpio -k 5.17.1-arch1-1 -c /etc/mkinitcpio.conf -g /boot/initramfs-linux.img
==> Starting build: 5.17.1-arch1-1
  -> Running build hook: [base]
  -> Running build hook: [udev]
  -> Running build hook: [autodetect]
  -> Running build hook: [modconf]
  -> Running build hook: [block]
  -> Running build hook: [filesystems]
  -> Running build hook: [keyboard]
  -> Running build hook: [fsck]
==> Generating module dependencies
==> Creating zstd-compressed initcpio image: /boot/initramfs-linux.img
==> Image generation successful

Boot directory:

$ ls -lah /boot
total 28M
drwxr-xr-x  3 root root 1.0K Apr  1 01:09 .
drwxr-xr-x 16 root root 4.0K Mar 29 09:09 ..
drwxr-xr-x  6 root root 1.0K Apr  1 01:11 grub
-rw-------  1 root root 8.6M Apr  1 01:09 initramfs-linux.img -- from temporary solution
-rw-r--r--  1 root root  11M Apr  1 00:31 vmlinuz-linux
-rw-r--r--  1 root root 8.8M Apr  1 00:31 vmlinuz-linux-hardened

System boots fine with the temporary solution.
Already tried reinstalling linux and mkinitcpio, running mkinitcpio from arch-chroot gives the same errors.

Last edited by Pinochet (2022-04-01 15:17:33)


stunna hollywood star (ya allah!!)

Offline

#2 2022-04-01 06:40:10

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,705

Offline

#3 2022-04-01 12:41:16

Pinochet
Member
From: Syria
Registered: 2022-04-01
Posts: 10

Re: [SOLVED] mkinitcpio fails to generate initramfs

$ type hexdump
hexdump is /usr/bin/hexdump

I already saw that post, that is not the issue.

Last edited by Pinochet (2022-04-01 12:42:09)


stunna hollywood star (ya allah!!)

Offline

#4 2022-04-01 12:50:25

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,705

Re: [SOLVED] mkinitcpio fails to generate initramfs

Inject "set -x" at the top of mkinitcpio and trace the failure.

Offline

#5 2022-04-01 12:55:36

Pinochet
Member
From: Syria
Registered: 2022-04-01
Posts: 10

Re: [SOLVED] mkinitcpio fails to generate initramfs

$ ( set -x ; sudo mkinitcpio -P )
+/bin/zsh:12> sudo mkinitcpio -P
==> Building image from preset: /etc/mkinitcpio.d/linux-hardened.preset: 'default'
  -> -k /boot/vmlinuz-linux-hardened -c /etc/mkinitcpio.conf -g /boot/initramfs-linux-hardened.img
==> ERROR: invalid kernel specified: `/boot/vmlinuz-linux-hardened'
==> Building image from preset: /etc/mkinitcpio.d/linux-hardened.preset: 'fallback'
  -> -k /boot/vmlinuz-linux-hardened -c /etc/mkinitcpio.conf -g /boot/initramfs-linux-hardened-fallback.img -S autodetect
==> ERROR: invalid kernel specified: `/boot/vmlinuz-linux-hardened'
==> Building image from preset: /etc/mkinitcpio.d/linux.preset: 'default'
  -> -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux.img
==> ERROR: invalid kernel specified: `/boot/vmlinuz-linux'
==> Building image from preset: /etc/mkinitcpio.d/linux.preset: 'fallback'
  -> -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux-fallback.img -S autodetect
==> ERROR: invalid kernel specified: `/boot/vmlinuz-linux'

Doesn't look like it gave much.


stunna hollywood star (ya allah!!)

Offline

#6 2022-04-01 13:29:08

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,705

Re: [SOLVED] mkinitcpio fails to generate initramfs

Because that approach won't work - you're setting for the running zsh, not mkinitcpio.
The latter is a shell script, edit it and "set -x" there.

Offline

#7 2022-04-01 13:35:57

Pinochet
Member
From: Syria
Registered: 2022-04-01
Posts: 10

Re: [SOLVED] mkinitcpio fails to generate initramfs

Oh, sorry. Here it is.

$ sudo mkinitcpio -p linux
+ declare -r version=31
+ shopt -s extglob
+ _f_functions=/usr/lib/initcpio/functions
+ _f_config=/etc/mkinitcpio.conf
+ _d_hooks=/etc/initcpio/hooks:/usr/lib/initcpio/hooks
+ _d_install=/etc/initcpio/install:/usr/lib/initcpio/install
+ _d_flag_hooks=
+ _d_flag_install=
+ _d_firmware=({/usr,}/lib/firmware/updates {/usr,}/lib/firmware)
+ _d_presets=/etc/mkinitcpio.d
+ _optmoduleroot=
+ _optgenimg=
+ _optcompress=
+ _opttargetdir=
+ _optosrelease=
+ _optuefi=
+ _optmicrocode=()
+ _optcmdline=
+ _optsplash=
+ _optkernelimage=
+ _optuefistub=
+ _optshowautomods=0
+ _optsavetree=0
+ _optshowmods=0
+ _optquiet=1
+ _optcolor=1
+ _optskiphooks=()
+ _optaddhooks=()
+ _hooks=()
+ _optpreset=()
+ declare -A _runhooks _addedmodules _modpaths _autodetect_cache
+ export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
+ PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
+ unset GREP_OPTIONS CDPATH
+ . /usr/lib/initcpio/functions
+ trap 'cleanup 130' INT
+ trap 'cleanup 143' TERM
+ _opt_short=A:c:D:g:H:hk:nLMPp:r:S:sd:t:U:Vvz:
+ _opt_long=('add:' 'addhooks:' 'config:' 'generate:' 'hookdir': 'hookhelp:' 'help' 'kernel:' 'listhooks' 'automods' 'moduleroot:' 'nocolor' 'allpresets' 'preset:' 'skiphooks:' 'save' 'generatedir:' 'builddir:' 'version' 'verbose' 'compress:' 'uefi:' 'microcode:' 'splash:' 'kernelimage:' 'uefistub:' 'cmdline:' 'osrelease:')
+ parseopts A:c:D:g:H:hk:nLMPp:r:S:sd:t:U:Vvz: add: addhooks: config: generate: hookdir: hookhelp: help kernel: listhooks automods moduleroot: nocolor allpresets preset: skiphooks: save generatedir: builddir: version verbose compress: uefi: microcode: splash: kernelimage: uefistub: cmdline: osrelease: -- -p linux
+ local opt= optarg= i= shortopts=A:c:D:g:H:hk:nLMPp:r: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 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 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 -- ]]
+ [[ -- != \-\- ]]
+ shift
+ ((  2  ))
+ case $1 in
+ (( i = 1 ))
+ (( i < 2 ))
+ opt=p
+ [[ A:c:D:g:H:hk:nLMPp:r:S:sd:t:U:Vvz: != *p* ]]
+ OPTRET+=("-$opt")
+ [[ A:c:D:g:H:hk:nLMPp:r: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 ]]
+ ((  _optcolor  ))
+ try_enable_color
+ local colors
++ tput colors
+ colors=256
+ ((  colors > 0  ))
+ tput setaf 0
++ tput sgr0
+ _color_none=''
++ tput bold
+ _color_bold=''
++ tput setaf 4
+ _color_blue=''
++ tput setaf 2
+ _color_green=''
++ tput setaf 1
+ _color_red=''
++ tput setaf 3
+ _color_yellow=''
+ [[ -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_cli_options= preset_image= preset_options=
+ local -a preset_mkopts preset_cmd
+ ((  MKINITCPIO_PROCESS_PRESET  ))
+ [[ linux != */* ]]
+ printf -v preset %s/%s.preset /etc/mkinitcpio.d linux
+ . /etc/mkinitcpio.d/linux.preset
++ ALL_config=/etc/mkinitcpio.conf
++ ALL_kver=/boot/vmlinuz-linux
++ 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[@]}"
+ 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_kver=default_kver
+ [[ -n /boot/vmlinuz-linux ]]
+ preset_cmd+=(-k "${!preset_kver:-$ALL_kver}")
+ preset_config=default_config
+ [[ -n /etc/mkinitcpio.conf ]]
+ preset_cmd+=(-c "${!preset_config:-$ALL_config}")
+ preset_image=default_image
+ [[ -n /boot/initramfs-linux.img ]]
+ preset_cmd+=(-g "${!preset_image}")
+ preset_options=default_options
+ [[ -n '' ]]
+ preset_efi_image=default_efi_image
+ [[ -n '' ]]
+ preset_microcode='default_microcode[@]'
+ [[ -n '' ]]
+ preset_cmd+=($OPTREST)
+ msg2 '-k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux.img'
+ local 'mesg=-k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux.img'
+ shift
+ printf '  -> -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux.img\n'
  -> -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux.img
+ MKINITCPIO_PROCESS_PRESET=1
+ /usr/bin/mkinitcpio -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux.img
+ declare -r version=31
+ shopt -s extglob
+ _f_functions=/usr/lib/initcpio/functions
+ _f_config=/etc/mkinitcpio.conf
+ _d_hooks=/etc/initcpio/hooks:/usr/lib/initcpio/hooks
+ _d_install=/etc/initcpio/install:/usr/lib/initcpio/install
+ _d_flag_hooks=
+ _d_flag_install=
+ _d_firmware=({/usr,}/lib/firmware/updates {/usr,}/lib/firmware)
+ _d_presets=/etc/mkinitcpio.d
+ _optmoduleroot=
+ _optgenimg=
+ _optcompress=
+ _opttargetdir=
+ _optosrelease=
+ _optuefi=
+ _optmicrocode=()
+ _optcmdline=
+ _optsplash=
+ _optkernelimage=
+ _optuefistub=
+ _optshowautomods=0
+ _optsavetree=0
+ _optshowmods=0
+ _optquiet=1
+ _optcolor=1
+ _optskiphooks=()
+ _optaddhooks=()
+ _hooks=()
+ _optpreset=()
+ declare -A _runhooks _addedmodules _modpaths _autodetect_cache
+ export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
+ PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
+ unset GREP_OPTIONS CDPATH
+ . /usr/lib/initcpio/functions
+ trap 'cleanup 130' INT
+ trap 'cleanup 143' TERM
+ _opt_short=A:c:D:g:H:hk:nLMPp:r:S:sd:t:U:Vvz:
+ _opt_long=('add:' 'addhooks:' 'config:' 'generate:' 'hookdir': 'hookhelp:' 'help' 'kernel:' 'listhooks' 'automods' 'moduleroot:' 'nocolor' 'allpresets' 'preset:' 'skiphooks:' 'save' 'generatedir:' 'builddir:' 'version' 'verbose' 'compress:' 'uefi:' 'microcode:' 'splash:' 'kernelimage:' 'uefistub:' 'cmdline:' 'osrelease:')
+ parseopts A:c:D:g:H:hk:nLMPp:r:S:sd:t:U:Vvz: add: addhooks: config: generate: hookdir: hookhelp: help kernel: listhooks automods moduleroot: nocolor allpresets preset: skiphooks: save generatedir: builddir: version verbose compress: uefi: microcode: splash: kernelimage: uefistub: cmdline: osrelease: -- -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux.img
+ local opt= optarg= i= shortopts=A:c:D:g:H:hk:nLMPp:r: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 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 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 -- ]]
+ [[ -- != \-\- ]]
+ shift
+ ((  6  ))
+ case $1 in
+ (( i = 1 ))
+ (( i < 2 ))
+ opt=k
+ [[ A:c:D:g:H:hk:nLMPp:r:S:sd:t:U:Vvz: != *k* ]]
+ OPTRET+=("-$opt")
+ [[ A:c:D:g:H:hk:nLMPp:r:S:sd:t:U:Vvz: = *k:* ]]
+ ((  i < 2 - 1  ))
+ ((  i == 2 - 1  ))
+ [[ -n /boot/vmlinuz-linux ]]
+ OPTRET+=("$2")
+ shift
+ break
+ shift
+ ((  4  ))
+ case $1 in
+ (( i = 1 ))
+ (( i < 2 ))
+ opt=c
+ [[ A:c:D:g:H:hk:nLMPp:r:S:sd:t:U:Vvz: != *c* ]]
+ OPTRET+=("-$opt")
+ [[ A:c:D:g:H:hk:nLMPp:r:S:sd:t:U:Vvz: = *c:* ]]
+ ((  i < 2 - 1  ))
+ ((  i == 2 - 1  ))
+ [[ -n /etc/mkinitcpio.conf ]]
+ OPTRET+=("$2")
+ shift
+ break
+ shift
+ ((  2  ))
+ case $1 in
+ (( i = 1 ))
+ (( i < 2 ))
+ opt=g
+ [[ A:c:D:g:H:hk:nLMPp:r:S:sd:t:U:Vvz: != *g* ]]
+ OPTRET+=("-$opt")
+ [[ A:c:D:g:H:hk:nLMPp:r:S:sd:t:U:Vvz: = *g:* ]]
+ ((  i < 2 - 1  ))
+ ((  i == 2 - 1  ))
+ [[ -n /boot/initramfs-linux.img ]]
+ OPTRET+=("$2")
+ shift
+ break
+ shift
+ ((  0  ))
+ OPTRET+=('--' "${unused_argv[@]}" "$@")
+ unset longoptmatch
+ return 0
+ set -- -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux.img --
+ unset _opt_short _opt_long OPTRET
+ :
+ case $1 in
+ shift
+ KERNELVERSION=/boot/vmlinuz-linux
+ shift
+ :
+ case $1 in
+ shift
+ _f_config=/etc/mkinitcpio.conf
+ shift
+ :
+ case $1 in
+ shift
+ [[ -d /boot/initramfs-linux.img ]]
++ readlink -f /boot/initramfs-linux.img
+ _optgenimg=/boot/initramfs-linux.img
+ [[ ! -e /boot ]]
+ shift
+ :
+ case $1 in
+ shift
+ break 2
+ OPTREST=
+ [[ -t 1 ]]
+ ((  _optcolor  ))
+ try_enable_color
+ local colors
++ tput colors
+ colors=256
+ ((  colors > 0  ))
+ tput setaf 0
++ tput sgr0
+ _color_none=''
++ tput bold
+ _color_bold=''
++ tput setaf 4
+ _color_blue=''
++ tput setaf 2
+ _color_green=''
++ tput setaf 1
+ _color_red=''
++ tput setaf 3
+ _color_yellow=''
+ [[ -n '' ]]
+ [[ -n '' ]]
+ [[ -e /proc/self/mountinfo ]]
+ [[ -e /dev/fd ]]
+ ((  0  ))
+ [[ /boot/vmlinuz-linux != \n\o\n\e ]]
++ resolve_kernver /boot/vmlinuz-linux
++ local kernel=/boot/vmlinuz-linux arch=
++ [[ -z /boot/vmlinuz-linux ]]
++ [[ / != / ]]
++ [[ ! -e /boot/vmlinuz-linux ]]
++ kver /boot/vmlinuz-linux
++ local kver 're=^[[:digit:]]+(\.[[:digit:]]+)+'
+++ uname -m
++ local arch=x86_64
++ [[ x86_64 == @(i?86|x86_64) ]]
+++ kver_x86 /boot/vmlinuz-linux
++++ hexdump -s 526 -n 2 -e '"%0d"' /boot/vmlinuz-linux
+++ local kver offset=14304
+++ [[ 14304 = +([0-9]) ]]
+++ read kver _
++++ dd if=/boot/vmlinuz-linux bs=1 count=127 skip=14816
+++ printf %s ╔════════════════════════════════════════════════════════════════╗
++ kver=╔════════════════════════════════════════════════════════════════╗
++ [[ ╔════════════════════════════════════════════════════════════════╗ =~ ^[[:digit:]]+(\.[[:digit:]]+)+ ]]
++ return 1
++ error 'invalid kernel specified: `%s'\''' /boot/vmlinuz-linux
++ local 'mesg=invalid kernel specified: `%s'\'''
++ shift
++ printf '==> ERROR: invalid kernel specified: `%s'\''\n' /boot/vmlinuz-linux
==> ERROR: invalid kernel specified: `/boot/vmlinuz-linux'
++ return 1
+++ uname -m
++ arch=x86_64
++ [[ x86_64 != @(i?86|x86_64) ]]
++ return 1
+ KERNELVERSION=
+ cleanup 1
+ local err=1
+ [[ -n '' ]]
+ exit 1
+ ((  1  ))
+ ret=1
+ for p in "${PRESETS[@]}"
+ 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_kver=fallback_kver
+ [[ -n /boot/vmlinuz-linux ]]
+ preset_cmd+=(-k "${!preset_kver:-$ALL_kver}")
+ preset_config=fallback_config
+ [[ -n /etc/mkinitcpio.conf ]]
+ preset_cmd+=(-c "${!preset_config:-$ALL_config}")
+ preset_image=fallback_image
+ [[ -n /boot/initramfs-linux-fallback.img ]]
+ preset_cmd+=(-g "${!preset_image}")
+ preset_options=fallback_options
+ [[ -n -S autodetect ]]
+ preset_cmd+=(${!preset_options})
+ preset_efi_image=fallback_efi_image
+ [[ -n '' ]]
+ preset_microcode='fallback_microcode[@]'
+ [[ -n '' ]]
+ preset_cmd+=($OPTREST)
+ msg2 '-k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux-fallback.img -S autodetect'
+ local 'mesg=-k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux-fallback.img -S autodetect'
+ shift
+ printf '  -> -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux-fallback.img -S autodetect\n'
  -> -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux-fallback.img -S autodetect
+ MKINITCPIO_PROCESS_PRESET=1
+ /usr/bin/mkinitcpio -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux-fallback.img -S autodetect
+ declare -r version=31
+ shopt -s extglob
+ _f_functions=/usr/lib/initcpio/functions
+ _f_config=/etc/mkinitcpio.conf
+ _d_hooks=/etc/initcpio/hooks:/usr/lib/initcpio/hooks
+ _d_install=/etc/initcpio/install:/usr/lib/initcpio/install
+ _d_flag_hooks=
+ _d_flag_install=
+ _d_firmware=({/usr,}/lib/firmware/updates {/usr,}/lib/firmware)
+ _d_presets=/etc/mkinitcpio.d
+ _optmoduleroot=
+ _optgenimg=
+ _optcompress=
+ _opttargetdir=
+ _optosrelease=
+ _optuefi=
+ _optmicrocode=()
+ _optcmdline=
+ _optsplash=
+ _optkernelimage=
+ _optuefistub=
+ _optshowautomods=0
+ _optsavetree=0
+ _optshowmods=0
+ _optquiet=1
+ _optcolor=1
+ _optskiphooks=()
+ _optaddhooks=()
+ _hooks=()
+ _optpreset=()
+ declare -A _runhooks _addedmodules _modpaths _autodetect_cache
+ export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
+ PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
+ unset GREP_OPTIONS CDPATH
+ . /usr/lib/initcpio/functions
+ trap 'cleanup 130' INT
+ trap 'cleanup 143' TERM
+ _opt_short=A:c:D:g:H:hk:nLMPp:r:S:sd:t:U:Vvz:
+ _opt_long=('add:' 'addhooks:' 'config:' 'generate:' 'hookdir': 'hookhelp:' 'help' 'kernel:' 'listhooks' 'automods' 'moduleroot:' 'nocolor' 'allpresets' 'preset:' 'skiphooks:' 'save' 'generatedir:' 'builddir:' 'version' 'verbose' 'compress:' 'uefi:' 'microcode:' 'splash:' 'kernelimage:' 'uefistub:' 'cmdline:' 'osrelease:')
+ parseopts A:c:D:g:H:hk:nLMPp:r:S:sd:t:U:Vvz: add: addhooks: config: generate: hookdir: hookhelp: help kernel: listhooks automods moduleroot: nocolor allpresets preset: skiphooks: save generatedir: builddir: version verbose compress: uefi: microcode: splash: kernelimage: uefistub: cmdline: osrelease: -- -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux-fallback.img -S autodetect
+ local opt= optarg= i= shortopts=A:c:D:g:H:hk:nLMPp:r: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 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 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 -- ]]
+ [[ -- != \-\- ]]
+ shift
+ ((  8  ))
+ case $1 in
+ (( i = 1 ))
+ (( i < 2 ))
+ opt=k
+ [[ A:c:D:g:H:hk:nLMPp:r:S:sd:t:U:Vvz: != *k* ]]
+ OPTRET+=("-$opt")
+ [[ A:c:D:g:H:hk:nLMPp:r:S:sd:t:U:Vvz: = *k:* ]]
+ ((  i < 2 - 1  ))
+ ((  i == 2 - 1  ))
+ [[ -n /boot/vmlinuz-linux ]]
+ OPTRET+=("$2")
+ shift
+ break
+ shift
+ ((  6  ))
+ case $1 in
+ (( i = 1 ))
+ (( i < 2 ))
+ opt=c
+ [[ A:c:D:g:H:hk:nLMPp:r:S:sd:t:U:Vvz: != *c* ]]
+ OPTRET+=("-$opt")
+ [[ A:c:D:g:H:hk:nLMPp:r:S:sd:t:U:Vvz: = *c:* ]]
+ ((  i < 2 - 1  ))
+ ((  i == 2 - 1  ))
+ [[ -n /etc/mkinitcpio.conf ]]
+ OPTRET+=("$2")
+ shift
+ break
+ shift
+ ((  4  ))
+ case $1 in
+ (( i = 1 ))
+ (( i < 2 ))
+ opt=g
+ [[ A:c:D:g:H:hk:nLMPp:r:S:sd:t:U:Vvz: != *g* ]]
+ OPTRET+=("-$opt")
+ [[ A:c:D:g:H:hk:nLMPp:r:S:sd:t:U:Vvz: = *g:* ]]
+ ((  i < 2 - 1  ))
+ ((  i == 2 - 1  ))
+ [[ -n /boot/initramfs-linux-fallback.img ]]
+ OPTRET+=("$2")
+ shift
+ break
+ shift
+ ((  2  ))
+ case $1 in
+ (( i = 1 ))
+ (( i < 2 ))
+ opt=S
+ [[ A:c:D:g:H:hk:nLMPp:r:S:sd:t:U:Vvz: != *S* ]]
+ OPTRET+=("-$opt")
+ [[ A:c:D:g:H:hk:nLMPp:r:S:sd:t:U:Vvz: = *S:* ]]
+ ((  i < 2 - 1  ))
+ ((  i == 2 - 1  ))
+ [[ -n autodetect ]]
+ OPTRET+=("$2")
+ shift
+ break
+ shift
+ ((  0  ))
+ OPTRET+=('--' "${unused_argv[@]}" "$@")
+ unset longoptmatch
+ return 0
+ set -- -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux-fallback.img -S autodetect --
+ unset _opt_short _opt_long OPTRET
+ :
+ case $1 in
+ shift
+ KERNELVERSION=/boot/vmlinuz-linux
+ shift
+ :
+ case $1 in
+ shift
+ _f_config=/etc/mkinitcpio.conf
+ shift
+ :
+ case $1 in
+ shift
+ [[ -d /boot/initramfs-linux-fallback.img ]]
++ readlink -f /boot/initramfs-linux-fallback.img
+ _optgenimg=/boot/initramfs-linux-fallback.img
+ [[ ! -e /boot ]]
+ shift
+ :
+ case $1 in
+ shift
+ IFS=,
+ read -r -a skip
+ _optskiphooks+=("${skip[@]}")
+ unset skip
+ shift
+ :
+ case $1 in
+ shift
+ break 2
+ OPTREST=
+ [[ -t 1 ]]
+ ((  _optcolor  ))
+ try_enable_color
+ local colors
++ tput colors
+ colors=256
+ ((  colors > 0  ))
+ tput setaf 0
++ tput sgr0
+ _color_none=''
++ tput bold
+ _color_bold=''
++ tput setaf 4
+ _color_blue=''
++ tput setaf 2
+ _color_green=''
++ tput setaf 1
+ _color_red=''
++ tput setaf 3
+ _color_yellow=''
+ [[ -n '' ]]
+ [[ -n '' ]]
+ [[ -e /proc/self/mountinfo ]]
+ [[ -e /dev/fd ]]
+ ((  0  ))
+ [[ /boot/vmlinuz-linux != \n\o\n\e ]]
++ resolve_kernver /boot/vmlinuz-linux
++ local kernel=/boot/vmlinuz-linux arch=
++ [[ -z /boot/vmlinuz-linux ]]
++ [[ / != / ]]
++ [[ ! -e /boot/vmlinuz-linux ]]
++ kver /boot/vmlinuz-linux
++ local kver 're=^[[:digit:]]+(\.[[:digit:]]+)+'
+++ uname -m
++ local arch=x86_64
++ [[ x86_64 == @(i?86|x86_64) ]]
+++ kver_x86 /boot/vmlinuz-linux
++++ hexdump -s 526 -n 2 -e '"%0d"' /boot/vmlinuz-linux
+++ local kver offset=14304
+++ [[ 14304 = +([0-9]) ]]
+++ read kver _
++++ dd if=/boot/vmlinuz-linux bs=1 count=127 skip=14816
+++ printf %s ╔════════════════════════════════════════════════════════════════╗
++ kver=╔════════════════════════════════════════════════════════════════╗
++ [[ ╔════════════════════════════════════════════════════════════════╗ =~ ^[[:digit:]]+(\.[[:digit:]]+)+ ]]
++ return 1
++ error 'invalid kernel specified: `%s'\''' /boot/vmlinuz-linux
++ local 'mesg=invalid kernel specified: `%s'\'''
++ shift
++ printf '==> ERROR: invalid kernel specified: `%s'\''\n' /boot/vmlinuz-linux
==> ERROR: invalid kernel specified: `/boot/vmlinuz-linux'
++ return 1
+++ uname -m
++ arch=x86_64
++ [[ x86_64 != @(i?86|x86_64) ]]
++ return 1
+ KERNELVERSION=
+ cleanup 1
+ local err=1
+ [[ -n '' ]]
+ exit 1
+ ((  1  ))
+ ret=1
+ exit 1
+ ((  2 > 255 ? r=1 : ++r  ))
+ return 1
+ exit

stunna hollywood star (ya allah!!)

Offline

#8 2022-04-01 13:45:07

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,705

Re: [SOLVED] mkinitcpio fails to generate initramfs

++ kver=╔════════════════════════════════════════════════════════════════╗

wtf?

dd if=/boot/vmlinuz-linux bs=1 count=1024 skip=14816

Offline

#9 2022-04-01 13:47:19

Pinochet
Member
From: Syria
Registered: 2022-04-01
Posts: 10

Re: [SOLVED] mkinitcpio fails to generate initramfs

$ /bin/dd if=/boot/vmlinuz-linux bs=1 count=1024 skip=14816
44NNPPP+PP2P+PPP"P<UZZrchlinux) #1 SMP PREEMPT Mon, 28 Mar 2022 20:55:33 +0000b//j//r/z//p:|:: ;(;@;CGA/MDA/HGCEGAVGAVESABIOS:.r,:1:
$jP"YZ^]d6\6`6ƅh66666 "024+0 records inIuW Iu"ع201и ؍\6t#`6d6
1024+0 records out
1024 bytes (1.0 kB, 1.0 KiB) copied, 0.00571411 s, 179 kB/s

I assume its not supposed to look like that...


stunna hollywood star (ya allah!!)

Offline

#10 2022-04-01 14:09:06

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,705

Re: [SOLVED] mkinitcpio fails to generate initramfs

The "rchlinux) …" looks ok-ish, but the trailing "44NNPPP+PP2P+PPP"P<UZZ" is rubbish.

file /boot/vmlinuz-linux
pacman -Qikk linux

Offline

#11 2022-04-01 14:11:25

Pinochet
Member
From: Syria
Registered: 2022-04-01
Posts: 10

Re: [SOLVED] mkinitcpio fails to generate initramfs

$ file /boot/vmlinuz-linux
/boot/vmlinuz-linux: Linux kernel x86 boot executable bzImage, version 5.17.1-arch1-1 (linux@archlinux) #1 SMP PREEMPT Mon, 28 Mar 2022 20:55:33 +0000, RO-rootFS, swap_dev 0XA, Normal VGA
$ pacman -Qikk linux
Name            : linux
Version         : 5.17.1.arch1-1
Description     : The Linux kernel and modules
Architecture    : x86_64
URL             : https://github.com/archlinux/linux/commits/v5.17.1-arch1
Licenses        : GPL2
Groups          : None
Provides        : VIRTUALBOX-GUEST-MODULES  WIREGUARD-MODULE
Depends On      : coreutils  kmod  initramfs
Optional Deps   : crda: to set the correct wireless channels of your country
                  linux-firmware: firmware images needed for some devices [installed]
Required By     : None
Optional For    : base
Conflicts With  : None
Replaces        : virtualbox-guest-modules-arch  wireguard-arch
Installed Size  : 164.89 MiB
Packager        : Jan Alexander Steffens (heftig) <heftig@archlinux.org>
Build Date      : Mon 28 Mar 2022 04:55:33 PM EDT
Install Date    : Fri 01 Apr 2022 12:31:26 AM EDT
Install Reason  : Explicitly installed
Install Script  : No
Validated By    : Signature

warning: linux: /usr/lib/modules/5.17.1-arch1-1/modules.alias (Modification time mismatch)
warning: linux: /usr/lib/modules/5.17.1-arch1-1/modules.alias.bin (Modification time mismatch)
warning: linux: /usr/lib/modules/5.17.1-arch1-1/modules.builtin.alias.bin (Modification time mismatch)
warning: linux: /usr/lib/modules/5.17.1-arch1-1/modules.builtin.bin (Modification time mismatch)
warning: linux: /usr/lib/modules/5.17.1-arch1-1/modules.dep (Modification time mismatch)
warning: linux: /usr/lib/modules/5.17.1-arch1-1/modules.dep.bin (Modification time mismatch)
warning: linux: /usr/lib/modules/5.17.1-arch1-1/modules.devname (Modification time mismatch)
warning: linux: /usr/lib/modules/5.17.1-arch1-1/modules.softdep (Modification time mismatch)
warning: linux: /usr/lib/modules/5.17.1-arch1-1/modules.symbols (Modification time mismatch)
warning: linux: /usr/lib/modules/5.17.1-arch1-1/modules.symbols.bin (Modification time mismatch)
linux: 6747 total files, 10 altered files

stunna hollywood star (ya allah!!)

Offline

#12 2022-04-01 14:19:05

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,705

Re: [SOLVED] mkinitcpio fails to generate initramfs

That however looks fine.
Let's look a bit at the context of that segment…

/bin/dd if=/boot/vmlinuz-linux bs=1 count=127 skip=14770

Offline

#13 2022-04-01 14:20:27

Pinochet
Member
From: Syria
Registered: 2022-04-01
Posts: 10

Re: [SOLVED] mkinitcpio fails to generate initramfs

$ /bin/dd if=/boot/vmlinuz-linux bs=1 count=127 skip=14770
efined video mode number: %x
5.17.1-arch1-1 (linux@archlinux) #1 SMP PREEMPT Mon, 28 Mar 2022 20:55:33 +0000b127+0 records in
127+0 records out
127 bytes copied, 0.00048536 s, 262 kB/s

stunna hollywood star (ya allah!!)

Offline

#14 2022-04-01 14:23:52

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,705

Re: [SOLVED] mkinitcpio fails to generate initramfs

So that's perfectly reasonable now.
Is

/bin/dd if=/boot/vmlinuz-linux bs=1 count=127 skip=14816

still reproducible garbage?
What about

/bin/dd if=/boot/vmlinuz-linux bs=1 count=127 skip=14800

?

Offline

#15 2022-04-01 14:25:36

Pinochet
Member
From: Syria
Registered: 2022-04-01
Posts: 10

Re: [SOLVED] mkinitcpio fails to generate initramfs

$ /bin/dd if=/boot/vmlinuz-linux bs=1 count=127 skip=14816
5.17.1-arch1-1 (linux@archlinux) #1 SMP PREEMPT Mon, 28 Mar 2022 20:55:33 +0000b//j//r/z//p:|:127+0 records in
127+0 records out
127 bytes copied, 0.000615628 s, 206 kB/s
$ /bin/dd if=/boot/vmlinuz-linux bs=1 count=127 skip=14800
5.17.1-arch1-1 (linux@archlinux) #1 SMP PREEMPT Mon, 28 Mar 2022 20:55:33 +0000b//j//r/z//127+0 records in
127+0 records out
127 bytes copied, 0.00046856 s, 271 kB/s

stunna hollywood star (ya allah!!)

Offline

#16 2022-04-01 14:37:36

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,705

Re: [SOLVED] mkinitcpio fails to generate initramfs

So now the result is actually intact and I assume mkinicpio also no longer fails?

SSD? btrfs?

mount | grep /boot

Offline

#17 2022-04-01 14:43:00

Pinochet
Member
From: Syria
Registered: 2022-04-01
Posts: 10

Re: [SOLVED] mkinitcpio fails to generate initramfs

mkinitcpio still fails, the original dd output still has the same garbled mess. I use a sata SSD and all filesystems are ext4.

$ mount | grep /boot
/dev/sda1 on /boot type ext4 (rw,relatime,stripe=4)

stunna hollywood star (ya allah!!)

Offline

#18 2022-04-01 15:00:40

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,705

Re: [SOLVED] mkinitcpio fails to generate initramfs

Then there's likely an escape code in the 1024 bytes that causes the first bytes to be replace (ie. the problem is the extended output)

So we're back at

seth wrote:
++ kver=╔════════════════════════════════════════════════════════════════╗

wtf?

You've been running "/bin/dd" all the time - what's suspicious and not what the script runs.

type dd
/bin/bash
type dd

And replace the "set -x" in the mkinitcpio script w/ the same "type dd", since "╔════════════════════════════════════════════════════════════════╗" looks a lot like a fancy box for some version/help output of something™

Offline

#19 2022-04-01 15:02:59

schard
Forum Moderator
From: Hannover
Registered: 2016-05-06
Posts: 2,658
Website

Re: [SOLVED] mkinitcpio fails to generate initramfs

There is no "garbage" here.
The output of dd is similar on my working machine. I guess it just looks weird due to bz2 compression:

$ /bin/dd if=/boot/vmlinuz-linux-zen bs=1 count=1024 skip=14816
44NNPPP+PP2P+PPP"P<UZZ;@archlinux) #1 ZEN SMP PREEMPT Mon, 28 Mar 2022 21:56:46 +0000b//j//r/z//|::: ;(;@;CGA/MDA/HGCEGAVGAVESABIOS:.r,:/1:
(y$jP"YZ^]D<@ƅH "1024+0 Datensätze einWWIuаW Iu"ع201и ؍<t#@Du
1024+0 Datensätze aus
1024 Bytes (1,0 kB, 1,0 KiB) kopiert, 0,00310738 s, 330 kB/s

I suspect that the file that mkinitcpio reads at

++++ dd if=/boot/vmlinuz-linux bs=1 count=127 skip=14816

is somehow not the same file as

$ /bin/dd if=/boot/vmlinuz-linux bs=1 count=127 skip=14770

reads.


Inofficial first vice president of the Rust Evangelism Strike Force

Offline

#20 2022-04-01 15:16:57

Pinochet
Member
From: Syria
Registered: 2022-04-01
Posts: 10

Re: [SOLVED] mkinitcpio fails to generate initramfs

I'm stupid, I was using a custom bash script for dd in /usr/local/bin to check for safe dd usage, that was the cause of mkinitcpio not working. Thank you for the help!


stunna hollywood star (ya allah!!)

Offline

#21 2022-04-01 15:27:59

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,705

Re: [SOLVED] mkinitcpio fails to generate initramfs

@shard
It's not the compression for sure, since the data needs to be readable and is so w/ the proper byte count, but

echo '44NNPPP+PP2P+PPP"P<UZZ;@archlinux) #1 ZEN SMP PREEMPT Mon, 28 Mar 2022 21:56:46 +0000b//j//r/z//|::: ;(;@;CGA/MDA/HGCEGAVGAVESABIOS:.r,:/1:
(y$jP"YZ^]D<@ƅH "1024+0 Datensätze einWWIuаW Iu"ع201и ؍<t#@Du' | wc

isn't anywhere near 1024 bytes either and if you look close enough, the contained "1024+0 Datensätze ein" is probably not in the kernel image either wink

Offline

#22 2022-04-01 16:55:33

schard
Forum Moderator
From: Hannover
Registered: 2016-05-06
Posts: 2,658
Website

Re: [SOLVED] mkinitcpio fails to generate initramfs

This is due to non-printable characters in the output.

$ /bin/dd if=/boot/initramfs-linux-zen.img bs=1 count=1024 skip=14816 | wc -c
1024
1024+0 Datensätze ein
1024+0 Datensätze aus
1024 Bytes (1,0 kB, 1,0 KiB) kopiert, 0,00338811 s, 302 kB/s

Inofficial first vice president of the Rust Evangelism Strike Force

Offline

#23 2022-04-01 17:44:18

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,705

Re: [SOLVED] mkinitcpio fails to generate initramfs

schard wrote:

This is due to non-printable characters in the output.

Tat's thepoint I was making (also in #18) - some of the non-printable characers will constitute cursor moving escape sequences, leading to the garbled output.

Offline

Board footer

Powered by FluxBB