Artix Linux Forum

Artix Linux => Package management => Topic started by: artiong on 14 August 2021, 05:47:08

Title: ERROR: invalid kernel specified: `/boot/vmlinuz-linux'
Post by: artiong on 14 August 2021, 05:47:08
Tonight I did updates and got this:

Code: [Select]
# pacman -Syu
:: Synchronizing package databases...
 system                                                                    263.0 KiB   301 KiB/s 00:01 [#############################################################] 100%
 world                                                                    1920.0 KiB  1444 KiB/s 00:01 [#############################################################] 100%
 galaxy                                                                   1887.2 KiB   614 KiB/s 00:03 [#############################################################] 100%
 extra                                                                    1568.6 KiB   510 KiB/s 00:03 [#############################################################] 100%
 community                                                                   5.6 MiB   963 KiB/s 00:06 [#############################################################] 100%
:: Starting full system upgrade...
resolving dependencies...
looking for conflicting packages...

Packages (4) libstemmer-2.1.0-1  linux-5.13.10.artix1-1  qt5-base-5.15.2+kde+r215-1  sdl2-2.0.16-2

Total Download Size:   138.29 MiB
Total Installed Size:  198.78 MiB
Net Upgrade Size:        0.22 MiB

:: Proceed with installation? [Y/n] Y
:: Retrieving packages...
 libstemmer-2.1.0-1-x86_64                                                 134.1 KiB   317 KiB/s 00:00 [#############################################################] 100%
 sdl2-2.0.16-2-x86_64                                                      790.8 KiB   616 KiB/s 00:01 [#############################################################] 100%
 qt5-base-5.15.2+kde+r215-1-x86_64                                          13.0 MiB  1414 KiB/s 00:09 [#############################################################] 100%
 linux-5.13.10.artix1-1-x86_64                                             124.4 MiB  2.88 MiB/s 00:43 [#############################################################] 100%
 Total (4/4)                                                               138.3 MiB  3.20 MiB/s 00:43 [#############################################################] 100%
(4/4) checking keys in keyring                                                                         [#############################################################] 100%
(4/4) checking package integrity                                                                       [#############################################################] 100%
(4/4) loading package files                                                                            [#############################################################] 100%
(4/4) checking for file conflicts                                                                      [#############################################################] 100%
(4/4) checking available disk space                                                                    [#############################################################] 100%
:: Running pre-transaction hooks...
(1/1) Removing linux initcpios...
:: Processing package changes...
(1/4) upgrading libstemmer                                                                             [#############################################################] 100%
(2/4) upgrading linux                                                                                  [#############################################################] 100%
(3/4) upgrading qt5-base                                                                               [#############################################################] 100%
(4/4) upgrading sdl2                                                                                   [#############################################################] 100%
New optional dependencies for sdl2
    pipewire: PipeWire audio driver
:: Running post-transaction hooks...
(1/2) Updating module dependencies...
(2/2) Updating linux initcpios...
==> 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'
error: command failed to execute correctly
pacman -Syu  4.48s user 4.32s system 15% cpu 55.714 total

I'm pretty sure I don't want to reboot. I was wondering if anyone has ever seen anything like this.

Thanks.
Title: Re: ERROR: invalid kernel specified: `/boot/vmlinuz-linux'
Post by: Dudemanguy on 14 August 2021, 05:50:22
Did you try running mkinitcpio -p linux manually? That's not a good error to get in any case though.
Title: Re: ERROR: invalid kernel specified: `/boot/vmlinuz-linux'
Post by: strajder on 14 August 2021, 07:57:59
So check what's in /etc/mkinitcpio.conf, /etc/mkinitcpio.d/linux.preset and your boot manager configuration. They should contain, and agree on, the correct path to the kernel. Right now, they don't.

Code: [Select]
# ls -l /boot
Title: Re: ERROR: invalid kernel specified: `/boot/vmlinuz-linux'
Post by: artiong on 14 August 2021, 13:52:13
Thanks for the ideas! Here are some outputs:

Tried running mkinitcpio -p linux manually:
Code: [Select]
/boot # mkinitcpio -p linux
==> 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'

Code: [Select]
/boot # ls -l
total 14052
drwxr-xr-x 5 root root    4096 Feb 18 11:38 EFI/
drwxr-xr-x 6 root root    4096 Aug 14 05:23 grub/
-rwxr-xr-x 1 root root 4769792 Jun  9 08:35 intel-ucode.img
-rwxr-xr-x 1 root root 9606464 Aug 13 22:29 vmlinuz-linux

I have no /boot/initramfs-linux.img

Code: [Select]
/etc # show_uncommented_lines.sh mkinitcpio.conf 
MODULES=()
BINARIES=()
FILES=()
HOOKS=(base udev autodetect modconf block filesystems keyboard fsck)

Code: [Select]
/etc/mkinitcpio.d # cat linux.preset 
# mkinitcpio preset file for the 'linux' package

ALL_config="/etc/mkinitcpio.conf"
ALL_kver="/boot/vmlinuz-linux"

PRESETS=('default' 'fallback')

#default_config="/etc/mkinitcpio.conf"
default_image="/boot/initramfs-linux.img"
#default_options=""

#fallback_config="/etc/mkinitcpio.conf"
fallback_image="/boot/initramfs-linux-fallback.img"
fallback_options="-S autodetect" 


This machine has been running Artix fine for almost two years. I haven't modified /etc/mkinitcpio.conf, /etc/mkinitcpio.d/linux.preset, or /etc/default/grub recently.

I do recall that because I have an MSI motherboard, I had to add --removable to the grub-mkconfig line:

Code: [Select]
grub-install --target=x86_64-efi --efi-directory=/boot/ --bootloader-id=grub --removable

I can't find any notes on this, but I believe it causes a change in where BOOTX64.EFI is stored. Mine is located at
Code: [Select]
/boot/EFI/BOOT/BOOTX64.EFI

Could you please check where yours is? Thanks again.
Title: Re: ERROR: invalid kernel specified: `/boot/vmlinuz-linux'
Post by: strajder on 14 August 2021, 16:47:41
This can be found by web search: https://bbs.archlinux.org/viewtopic.php?id=252418

What does the
Code: [Select]
$ which hexdump
give? If /usr/local/bin/hexdump, remove your custom version of util-linux and do
Code: [Select]
$ su
# pacman -S util-linux

There are other ideas for debugging in that thread (like adding set -x).

This thread: https://bbs.archlinux.org/viewtopic.php?id=250486
solves the problem by removing mkinitcpio-git and replacing it with normal mkinitcpio package.

So, essentially, double check if Artix repositories are before the Arch repositories in /etc/pacman.conf, and do:
Code: [Select]
$ su
# pacman -S linux linux-headers util-linux mkinitcpio

Next time, you should first search if anyone on the web had a similar problem. Often that turns out to be the case.
Title: Re: ERROR: invalid kernel specified: `/boot/vmlinuz-linux'
Post by: artiong on 14 August 2021, 17:04:55
Yes, I saw that in my searching also, but I have no /usr/local/bin/hexdump

Code: [Select]
% whereis hexdump
hexdump: /usr/bin/hexdump /usr/share/man/man1/hexdump.1.gz

I also read the Arch wiki and tried this:

Code: [Select]
mkdir /boot/EFI/grub
cp /boot/EFI/BOOT/BOOTX64.EFI /boot/EFI/grub/grubx64.efi
pacman -S linux

But still not getting any /boot/initramfs-linux.img  (or fallback image either), even after a manual mkinitcipio -p linux.

Tried downgrading to linux-5.13.8.artix1 and that didn't help, even though it was working before.

I have an nvme that's glued in or I would have already ripped it out and reinstalled. May have to do that anyway.



https://wiki.archlinux.org/title/GRUB#Default/fallback_boot_path
Title: Re: ERROR: invalid kernel specified: `/boot/vmlinuz-linux'
Post by: strajder on 14 August 2021, 17:12:57
But still not getting any /boot/initramfs-linux.img  (or fallback image either), even after a manual mkinitcipio -p linux.
That is normal under the circumstances, simply because the initcpio generation fails. Try adding set -x (not set +x like in that post, but set -x, a few posts later):
https://bbs.archlinux.org/viewtopic.php?pid=1884974#p1884975

Quote
I have an nvme that's glued in or I would have already ripped it out and reinstalled. May have to do that anyway.
nvme could create problems, as the support for SSDs in Linux is problematic and depends on the SSD model, but not at the point when you have a shell in which you can call pacman, so I don't think it is related to this issue.
Title: Re: ERROR: invalid kernel specified: `/boot/vmlinuz-linux'
Post by: artiong on 14 August 2021, 17:31:31
I appreciate your suggestion to try a web search, but believe me, I have a whole desktop full of tabs from my searching.

The order of the repos in /etc/pacman.conf is:
[system]
Include = /etc/pacman.d/mirrorlist
[world]
Include = /etc/pacman.d/mirrorlist
[galaxy]
Include = /etc/pacman.d/mirrorlist
[extra]
Include = /etc/pacman.d/mirrorlist-arch
[community]
Include = /etc/pacman.d/mirrorlist-arch

Code: [Select]
# pacman -S linux linux-headers util-linux mkinitcpio
warning: linux-5.13.10.artix1-1 is up to date -- reinstalling
warning: util-linux-2.37.1-3 is up to date -- reinstalling
warning: mkinitcpio-30-2 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...

Packages (5) pahole-1.21-1  linux-5.13.10.artix1-1  linux-headers-5.13.10.artix1-1  mkinitcpio-30-2  util-linux-2.37.1-3

Total Download Size:    23.64 MiB
Total Installed Size:  274.63 MiB
Net Upgrade Size:      131.43 MiB

:: Proceed with installation? [Y/n] Y
:: Retrieving packages...
 linux-headers-5.13.10.artix1-1-x86_64                                      23.6 MiB  3.29 MiB/s 00:07 [#############################################################] 100%
(5/5) checking keys in keyring                                                                         [#############################################################] 100%
(5/5) checking package integrity                                                                       [#############################################################] 100%
(5/5) loading package files                                                                            [#############################################################] 100%
(5/5) checking for file conflicts                                                                      [#############################################################] 100%
(5/5) checking available disk space                                                                    [#############################################################] 100%
:: Processing package changes...
(1/5) reinstalling util-linux                                                                          [#############################################################] 100%
(2/5) reinstalling mkinitcpio                                                                          [#############################################################] 100%
(3/5) reinstalling linux                                                                               [#############################################################] 100%
(4/5) installing pahole                                                                                [#############################################################] 100%
(5/5) installing linux-headers                                                                         [#############################################################] 100%
:: Running post-transaction hooks...
(1/5) Creating system user accounts...
(2/5) Creating temporary files...
(3/5) Reloading device manager configuration...
(4/5) Updating module dependencies...
(5/5) Updating linux initcpios...
==> 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'
error: command failed to execute correctly

I will admit I did not see the post about the guy missing vmlinuz-linux, however, I'm getting that file, but not initramfs-linux.img or initramfs-linux-fallback.img

Anyway, the post indicates you can look in /usr/lib/modules/ for these files.

Code: [Select]
/usr/lib/modules/5.13.10-artix1-1 # find . -name \*vmlinuz\*  
./vmlinuz
/usr/lib/modules/5.13.10-artix1-1 # diff vmlinuz /boot/vmlinuz-linux
/usr/lib/modules/5.13.10-artix1-1 #

No diff there, but:
Code: [Select]
/usr/lib/modules/5.13.10-artix1-1 # find . -name \*initramfs\*

finds nothing.


Title: Re: ERROR: invalid kernel specified: `/boot/vmlinuz-linux'
Post by: strajder on 14 August 2021, 17:49:16
Try adding set -x (not set +x like in that post, but set -x, a few posts later):
https://bbs.archlinux.org/viewtopic.php?pid=1884974#p1884975
Title: Re: ERROR: invalid kernel specified: `/boot/vmlinuz-linux'
Post by: artiong on 14 August 2021, 18:16:20
Code: [Select]
# set -x mkinitcpio -p linux 
+grml_reset_screen_title:3:> [[ '' -gt 0 ]]                                                                                                                               
+grml_reset_screen_title:4:case> case rxvt-unicode-256color (xterm*|rxvt*|alacritty)
+grml_reset_screen_title:6:case> set_title 'root@vtk398: /home/artiong'
+set_title:1:> info_print $'\C-[]0;' $'\C-G' 'root@vtk398: /home/artiong'
+info_print:1:> local esc_begin esc_end
+info_print:2:> esc_begin=$'\C-[]0;'
+info_print:3:> esc_end=$'\C-G'
+info_print:4:> shift 2
+info_print:5:> printf %s $'\C-[]0;'

root@vtk398: /home/artiong+info_print:7:> printf %s $'\C-G'
+grml_vcs_to_screen_title:1:if> [[ rxvt-unicode-256color == screen* ]]
+prompt_grml_precmd:1:> emulate -L zsh
+prompt_grml_precmd:2:> local grmltheme=grml
+prompt_grml_precmd:3:> local -a left_items right_items
+prompt_grml_precmd:4:> left_items=( rc change-root user at host path vcs percent )
+prompt_grml_precmd:5:> right_items=( sad-smiley )
+prompt_grml_precmd:7:> prompt_grml_precmd_worker
+prompt_grml_precmd_worker:1:> emulate -L zsh
+prompt_grml_precmd_worker:2:> local -i vcscalled=0
+prompt_grml_precmd_worker:4:> grml_prompt_addto PS1 rc change-root user at host path vcs percent
+grml_prompt_addto:1:> emulate -L zsh
+grml_prompt_addto:2:> local target=PS1
+grml_prompt_addto:3:> local lr it apre apost new v REPLY
+grml_prompt_addto:4:> local -a items
+grml_prompt_addto:5:> shift
+grml_prompt_addto:7:> [[ PS1 == PS1 ]]
+grml_prompt_addto:7:cmdand> lr=left
+grml_prompt_addto:8:> zstyle -a :prompt:grml:left:setup items items
+grml_prompt_addto:8:cmdor> items=( rc change-root user at host path vcs percent )
+grml_prompt_addto:9:> typeset -g 'PS1='
+grml_prompt_addto:10:for> it=rc
+grml_prompt_addto:11:for> zstyle -s :prompt:grml:left:items:rc pre apre
+grml_prompt_addto:12:for cmdor> apre='%B%F{red}'
+grml_prompt_addto:13:for> zstyle -s :prompt:grml:left:items:rc post apost
+grml_prompt_addto:14:for cmdor> apost=%f%b
+grml_prompt_addto:15:for> zstyle -s :prompt:grml:left:items:rc token new
+grml_prompt_addto:16:for cmdor> new='%(?..%? )'
+grml_prompt_addto:17:for if> ((  0  ))
+grml_prompt_addto:21:for else case> case rc (battery)
+grml_prompt_addto:21:for else case> case rc (change-root)
+grml_prompt_addto:21:for else case> case rc (grml-chroot)
+grml_prompt_addto:21:for else case> case rc (vcs)
+grml_prompt_addto:21:for else case> case rc (*)
+grml_prompt_addto:47:for else case> REPLY='%(?..%? )'
+grml_prompt_addto:52:for if> [[ -o prompt_subst ]]
+grml_prompt_addto:57:for> typeset -g 'PS1=%B%F{red}%(?..%? )%f%b'
+grml_prompt_addto:10:for> it=change-root
+grml_prompt_addto:11:for> zstyle -s :prompt:grml:left:items:change-root pre apre
+grml_prompt_addto:12:for cmdor> apre=''
+grml_prompt_addto:13:for> zstyle -s :prompt:grml:left:items:change-root post apost
+grml_prompt_addto:14:for cmdor> apost=''
+grml_prompt_addto:15:for> zstyle -s :prompt:grml:left:items:change-root token new
+grml_prompt_addto:16:for cmdor> new=debian_chroot
+grml_prompt_addto:17:for if> ((  0  ))
+grml_prompt_addto:21:for else case> case change-root (battery)
+grml_prompt_addto:21:for else case> case change-root (change-root)
+grml_prompt_addto:26:for else case> grml_wrap_reply PS1 debian_chroot '(' ')'
+grml_wrap_reply:1:> emulate -L zsh
+grml_wrap_reply:2:> local target=PS1
+grml_wrap_reply:3:> local new=debian_chroot
+grml_wrap_reply:4:> local left='('
+grml_wrap_reply:5:> local right=')'
+grml_wrap_reply:7:if> ((  0  ))
+grml_wrap_reply:10:else> REPLY=''
+grml_prompt_addto:52:for if> [[ -o prompt_subst ]]
+grml_prompt_addto:57:for> typeset -g 'PS1=%B%F{red}%(?..%? )%f%b'
+grml_prompt_addto:10:for> it=user
+grml_prompt_addto:11:for> zstyle -s :prompt:grml:left:items:user pre apre
+grml_prompt_addto:13:for> zstyle -s :prompt:grml:left:items:user post apost
+grml_prompt_addto:14:for cmdor> apost=%f%b
+grml_prompt_addto:15:for> zstyle -s :prompt:grml:left:items:user token new
+grml_prompt_addto:16:for cmdor> new=%n
+grml_prompt_addto:17:for if> ((  0  ))
+grml_prompt_addto:21:for else case> case user (battery)
+grml_prompt_addto:21:for else case> case user (change-root)
+grml_prompt_addto:21:for else case> case user (grml-chroot)
+grml_prompt_addto:21:for else case> case user (vcs)
+grml_prompt_addto:21:for else case> case user (*)
+grml_prompt_addto:47:for else case> REPLY=%n
+grml_prompt_addto:52:for if> [[ -o prompt_subst ]]
+grml_prompt_addto:57:for> typeset -g 'PS1=%B%F{red}%(?..%? )%f%b%B%F{red}%n%f%b'
+grml_prompt_addto:10:for> it=at
+grml_prompt_addto:11:for> zstyle -s :prompt:grml:left:items:at pre apre
+grml_prompt_addto:12:for cmdor> apre=''
+grml_prompt_addto:13:for> zstyle -s :prompt:grml:left:items:at post apost
+grml_prompt_addto:14:for cmdor> apost=''
+grml_prompt_addto:15:for> zstyle -s :prompt:grml:left:items:at token new
+grml_prompt_addto:16:for cmdor> new=@
+grml_prompt_addto:17:for if> ((  0  ))
+grml_prompt_addto:21:for else case> case at (battery)
+grml_prompt_addto:21:for else case> case at (change-root)
+grml_prompt_addto:21:for else case> case at (grml-chroot)
+grml_prompt_addto:21:for else case> case at (vcs)
+grml_prompt_addto:21:for else case> case at (*)
+grml_prompt_addto:47:for else case> REPLY=@
+grml_prompt_addto:52:for if> [[ -o prompt_subst ]]
+grml_prompt_addto:57:for> typeset -g 'PS1=%B%F{red}%(?..%? )%f%b%B%F{red}%n%f%b@'
+grml_prompt_addto:10:for> it=host
+grml_prompt_addto:11:for> zstyle -s :prompt:grml:left:items:host pre apre
+grml_prompt_addto:12:for cmdor> apre=''
+grml_prompt_addto:13:for> zstyle -s :prompt:grml:left:items:host post apost
+grml_prompt_addto:14:for cmdor> apost=''
+grml_prompt_addto:15:for> zstyle -s :prompt:grml:left:items:host token new
+grml_prompt_addto:16:for cmdor> new='%m '
+grml_prompt_addto:17:for if> ((  0  ))
+grml_prompt_addto:21:for else case> case host (battery)
+grml_prompt_addto:21:for else case> case host (change-root)
+grml_prompt_addto:21:for else case> case host (grml-chroot)
+grml_prompt_addto:21:for else case> case host (vcs)
+grml_prompt_addto:21:for else case> case host (*)
+grml_prompt_addto:47:for else case> REPLY='%m '
+grml_prompt_addto:52:for if> [[ -o prompt_subst ]]
+grml_prompt_addto:57:for> typeset -g 'PS1=%B%F{red}%(?..%? )%f%b%B%F{red}%n%f%b@%m '
+grml_prompt_addto:10:for> it=path
+grml_prompt_addto:11:for> zstyle -s :prompt:grml:left:items:path pre apre
+grml_prompt_addto:12:for cmdor> apre=%B
+grml_prompt_addto:13:for> zstyle -s :prompt:grml:left:items:path post apost
+grml_prompt_addto:14:for cmdor> apost=%b
+grml_prompt_addto:15:for> zstyle -s :prompt:grml:left:items:path token new
+grml_prompt_addto:16:for cmdor> new='%40<..<%~%<< '
+grml_prompt_addto:17:for if> ((  0  ))
+grml_prompt_addto:21:for else case> case path (battery)
+grml_prompt_addto:21:for else case> case path (change-root)
+grml_prompt_addto:21:for else case> case path (grml-chroot)
+grml_prompt_addto:21:for else case> case path (vcs)
+grml_prompt_addto:21:for else case> case path (*)
+grml_prompt_addto:47:for else case> REPLY='%40<..<%~%<< '
+grml_prompt_addto:52:for if> [[ -o prompt_subst ]]
+grml_prompt_addto:57:for> typeset -g 'PS1=%B%F{red}%(?..%? )%f%b%B%F{red}%n%f%b@%m %B%40<..<%~%<< %b'
+grml_prompt_addto:10:for> it=vcs
+grml_prompt_addto:11:for> zstyle -s :prompt:grml:left:items:vcs pre apre
+grml_prompt_addto:12:for cmdor> apre=''
+grml_prompt_addto:13:for> zstyle -s :prompt:grml:left:items:vcs post apost
+grml_prompt_addto:14:for cmdor> apost=''
+grml_prompt_addto:15:for> zstyle -s :prompt:grml:left:items:vcs token new
+grml_prompt_addto:16:for cmdor> new=0
+grml_prompt_addto:17:for if> ((  0  ))
+grml_prompt_addto:21:for else case> case vcs (battery)
+grml_prompt_addto:21:for else case> case vcs (change-root)
+grml_prompt_addto:21:for else case> case vcs (grml-chroot)
+grml_prompt_addto:21:for else case> case vcs (vcs)
+grml_prompt_addto:36:for else case> v=vcs_info_msg_0_
+grml_prompt_addto:37:for else case if> ((  ! vcscalled  ))
+grml_prompt_addto:38:for else case then> vcs_info
+vcs_info:1:> emulate -L zsh
+vcs_info:2:> setopt extendedglob NO_warn_create_global
+vcs_info:4:> [[ -r . ]]
+vcs_info:6:> local pat
+vcs_info:7:> local -i found retval
+vcs_info:8:> local -a enabled disabled dps
+vcs_info:9:> local usercontext vcs rrn quiltmode
+vcs_info:10:> local -x LC_MESSAGES
+vcs_info:11:> local -i maxexports
+vcs_info:12:> local -a msgs
+vcs_info:19:> local -A vcs_comm hook_com backend_misc user_data
+vcs_info:21:> LC_MESSAGES=C
+vcs_info:22:if> [[ -n '' ]]
+vcs_info:27:> vcs=-init-
+vcs_info:27:> rrn=-all-
+vcs_info:27:> quiltmode=addon
+vcs_info:28:> usercontext=default
+vcs_info:30:> VCS_INFO_hook start-up
+VCS_INFO_hook:5:> local hook static func
+VCS_INFO_hook:6:> local context hook_name
+VCS_INFO_hook:7:> local -i ret
+VCS_INFO_hook:8:> local -a hooks tmp
+VCS_INFO_hook:9:> local -i debug
+VCS_INFO_hook:11:> ret=0
+VCS_INFO_hook:12:> hook_name=start-up
+VCS_INFO_hook:13:> shift
+VCS_INFO_hook:14:> context=:vcs_info:-init-+start-up:default:-all-
+VCS_INFO_hook:15:> static=:vcs_info-static_hooks:start-up
+VCS_INFO_hook:17:> zstyle -t :vcs_info:-init-+start-up:default:-all- debug
+VCS_INFO_hook:17:cmdand> debug=0
+VCS_INFO_hook:18:if> ((  debug  ))
+VCS_INFO_hook:24:> zstyle -a :vcs_info-static_hooks:start-up hooks hooks
+VCS_INFO_hook:25:if> ((  debug  ))
+VCS_INFO_hook:28:> zstyle -a :vcs_info:-init-+start-up:default:-all- hooks tmp
+VCS_INFO_hook:29:if> ((  debug  ))
+VCS_INFO_hook:32:> hooks+=( )
+VCS_INFO_hook:33:> ((  0 == 0  ))
+VCS_INFO_hook:33:cmdand> return 0
+vcs_info:31:> retval=0
+vcs_info:32:if> ((  retval == 1  ))
+vcs_info:34:elif> ((  retval == 2  ))
+vcs_info:42:> zstyle -a :vcs_info:-init-:default:-all- enable enabled
+vcs_info:43:> ((  0 == 0  ))
+vcs_info:43:cmdand> enabled=( all )
+vcs_info:45:if> [[ -n '' ]]
+vcs_info:50:if> [[ -n all ]]
+vcs_info:51:then> enabled=( bzr cdv cvs darcs fossil git hg mtn p4 svk svn tla )
+vcs_info:52:then> zstyle -a :vcs_info:-init-:default:-all- disable disabled
+vcs_info:55:> zstyle -a :vcs_info:-init-:default:-all- disable-patterns dps
+vcs_info:65:> VCS_INFO_maxexports
+VCS_INFO_maxexports:5:> setopt localoptions NO_shwordsplit unset
+VCS_INFO_maxexports:7:> zstyle -s :vcs_info:-init-:default:-all- max-exports maxexports
+VCS_INFO_maxexports:8:if> [[ 2 != <-> ]]
+VCS_INFO_maxexports:8:if cmdor> ((  maxexports < 1  ))
+VCS_INFO_maxexports:13:> return 0
+vcs_info:67:> ((  found = 0  ))
+vcs_info:68:for> vcs=bzr
+vcs_info:69:for> [[ -n '' ]]
+vcs_info:70:for if> ((  1 == 0  ))
+vcs_info:75:for> vcs_comm=( )
+vcs_info:76:for> VCS_INFO_get_cmd
+VCS_INFO_get_cmd:4:> local cmd
+VCS_INFO_get_cmd:5:> zstyle -s :vcs_info:bzr:default:-all- command cmd
+VCS_INFO_get_cmd:6:> vcs_comm[cmd]=bzr
+vcs_info:77:for> VCS_INFO_detect_bzr
+VCS_INFO_detect_bzr:5:> setopt localoptions NO_shwordsplit
+VCS_INFO_detect_bzr:7:> [[ '' == --flavours ]]
+VCS_INFO_detect_bzr:9:> VCS_INFO_check_com bzr
+VCS_INFO_check_com:5:> setopt localoptions NO_shwordsplit
+VCS_INFO_check_com:7:case> case bzr (/*)
+VCS_INFO_check_com:7:case> case bzr (*)
+VCS_INFO_check_com:12:case> ((  0  ))
+VCS_INFO_check_com:15:> return 1
+VCS_INFO_detect_bzr:9:cmdor> return 1
+vcs_info:68:for> vcs=cdv
+vcs_info:69:for> [[ -n '' ]]
+vcs_info:70:for if> ((  1 == 0  ))
+vcs_info:75:for> vcs_comm=( )
+vcs_info:76:for> VCS_INFO_get_cmd
+VCS_INFO_get_cmd:4:> local cmd
+VCS_INFO_get_cmd:5:> zstyle -s :vcs_info:cdv:default:-all- command cmd
+VCS_INFO_get_cmd:6:> vcs_comm[cmd]=cdv
+vcs_info:77:for> VCS_INFO_detect_cdv
+VCS_INFO_detect_cdv:5:> setopt localoptions NO_shwordsplit
+VCS_INFO_detect_cdv:7:> [[ '' == --flavours ]]
+VCS_INFO_detect_cdv:9:> VCS_INFO_check_com cdv
+VCS_INFO_check_com:5:> setopt localoptions NO_shwordsplit
+VCS_INFO_check_com:7:case> case cdv (/*)
+VCS_INFO_check_com:7:case> case cdv (*)
+VCS_INFO_check_com:12:case> ((  0  ))
+VCS_INFO_check_com:15:> return 1
+VCS_INFO_detect_cdv:9:cmdor> return 1
+vcs_info:68:for> vcs=cvs
+vcs_info:69:for> [[ -n '' ]]
+vcs_info:70:for if> ((  1 == 0  ))
+vcs_info:75:for> vcs_comm=( )
+vcs_info:76:for> VCS_INFO_get_cmd
+VCS_INFO_get_cmd:4:> local cmd
+VCS_INFO_get_cmd:5:> zstyle -s :vcs_info:cvs:default:-all- command cmd
+VCS_INFO_get_cmd:6:> vcs_comm[cmd]=cvs
+vcs_info:77:for> VCS_INFO_detect_cvs
+VCS_INFO_detect_cvs:5:> setopt localoptions NO_shwordsplit
+VCS_INFO_detect_cvs:7:> [[ '' == --flavours ]]
+VCS_INFO_detect_cvs:9:> VCS_INFO_check_com cvs
+VCS_INFO_check_com:5:> setopt localoptions NO_shwordsplit
+VCS_INFO_check_com:7:case> case cvs (/*)
+VCS_INFO_check_com:7:case> case cvs (*)
+VCS_INFO_check_com:12:case> ((  0  ))
+VCS_INFO_check_com:15:> return 1
+VCS_INFO_detect_cvs:9:cmdor> return 1
+vcs_info:68:for> vcs=darcs
+vcs_info:69:for> [[ -n '' ]]
+vcs_info:70:for if> ((  1 == 0  ))
+vcs_info:75:for> vcs_comm=( )
+vcs_info:76:for> VCS_INFO_get_cmd
+VCS_INFO_get_cmd:4:> local cmd
+VCS_INFO_get_cmd:5:> zstyle -s :vcs_info:darcs:default:-all- command cmd
+VCS_INFO_get_cmd:6:> vcs_comm[cmd]=darcs
+vcs_info:77:for> VCS_INFO_detect_darcs
+VCS_INFO_detect_darcs:5:> setopt localoptions NO_shwordsplit
+VCS_INFO_detect_darcs:7:> [[ '' == --flavours ]]
+VCS_INFO_detect_darcs:9:> VCS_INFO_check_com darcs
+VCS_INFO_check_com:5:> setopt localoptions NO_shwordsplit
+VCS_INFO_check_com:7:case> case darcs (/*)
+VCS_INFO_check_com:7:case> case darcs (*)
+VCS_INFO_check_com:12:case> ((  0  ))
+VCS_INFO_check_com:15:> return 1
+VCS_INFO_detect_darcs:9:cmdor> return 1
+vcs_info:68:for> vcs=fossil
+vcs_info:69:for> [[ -n '' ]]
+vcs_info:70:for if> ((  1 == 0  ))
+vcs_info:75:for> vcs_comm=( )
+vcs_info:76:for> VCS_INFO_get_cmd
+VCS_INFO_get_cmd:4:> local cmd
+VCS_INFO_get_cmd:5:> zstyle -s :vcs_info:fossil:default:-all- command cmd
+VCS_INFO_get_cmd:6:> vcs_comm[cmd]=fossil
+vcs_info:77:for> VCS_INFO_detect_fossil
+VCS_INFO_detect_fossil:5:> setopt localoptions NO_shwordsplit
+VCS_INFO_detect_fossil:7:> [[ '' == --flavours ]]
+VCS_INFO_detect_fossil:9:> VCS_INFO_check_com fossil
+VCS_INFO_check_com:5:> setopt localoptions NO_shwordsplit
+VCS_INFO_check_com:7:case> case fossil (/*)
+VCS_INFO_check_com:7:case> case fossil (*)
+VCS_INFO_check_com:12:case> ((  0  ))
+VCS_INFO_check_com:15:> return 1
+VCS_INFO_detect_fossil:9:cmdor> return 1
+vcs_info:68:for> vcs=git
+vcs_info:69:for> [[ -n '' ]]
+vcs_info:70:for if> ((  1 == 0  ))
+vcs_info:75:for> vcs_comm=( )
+vcs_info:76:for> VCS_INFO_get_cmd
+VCS_INFO_get_cmd:4:> local cmd
+VCS_INFO_get_cmd:5:> zstyle -s :vcs_info:git:default:-all- command cmd
+VCS_INFO_get_cmd:6:> vcs_comm[cmd]=git
+vcs_info:77:for> VCS_INFO_detect_git
+VCS_INFO_detect_git:5:> setopt localoptions NO_shwordsplit
+VCS_INFO_detect_git:7:> [[ '' == --flavours ]]
+VCS_INFO_detect_git:9:if> VCS_INFO_check_com git
+VCS_INFO_check_com:5:> setopt localoptions NO_shwordsplit
+VCS_INFO_check_com:7:case> case git (/*)
+VCS_INFO_check_com:7:case> case git (*)
+VCS_INFO_check_com:12:case> ((  1  ))
+VCS_INFO_check_com:12:case cmdand> return 0
+VCS_INFO_detect_git:9:if cmdand> vcs_comm[gitdir]=+VCS_INFO_detect_git:9:if cmdand cmdsubst> git rev-parse --git-dir
+VCS_INFO_detect_git:9:if cmdand> vcs_comm[gitdir]=''
+VCS_INFO_detect_git:14:> return 1
+vcs_info:68:for> vcs=hg
+vcs_info:69:for> [[ -n '' ]]
+vcs_info:70:for if> ((  1 == 0  ))
+vcs_info:75:for> vcs_comm=( )
+vcs_info:76:for> VCS_INFO_get_cmd
+VCS_INFO_get_cmd:4:> local cmd
+VCS_INFO_get_cmd:5:> zstyle -s :vcs_info:hg:default:-all- command cmd
+VCS_INFO_get_cmd:6:> vcs_comm[cmd]=hg
+vcs_info:77:for> VCS_INFO_detect_hg
+VCS_INFO_detect_hg:5:> setopt localoptions NO_shwordsplit
+VCS_INFO_detect_hg:7:> [[ '' == --flavours ]]
+VCS_INFO_detect_hg:9:> VCS_INFO_check_com hg
+VCS_INFO_check_com:5:> setopt localoptions NO_shwordsplit
+VCS_INFO_check_com:7:case> case hg (/*)
+VCS_INFO_check_com:7:case> case hg (*)
+VCS_INFO_check_com:12:case> ((  0  ))
+VCS_INFO_check_com:15:> return 1
+VCS_INFO_detect_hg:9:cmdor> return 1
+vcs_info:68:for> vcs=mtn
+vcs_info:69:for> [[ -n '' ]]
+vcs_info:70:for if> ((  1 == 0  ))
+vcs_info:75:for> vcs_comm=( )
+vcs_info:76:for> VCS_INFO_get_cmd
+VCS_INFO_get_cmd:4:> local cmd
+VCS_INFO_get_cmd:5:> zstyle -s :vcs_info:mtn:default:-all- command cmd
+VCS_INFO_get_cmd:6:> vcs_comm[cmd]=mtn
+vcs_info:77:for> VCS_INFO_detect_mtn
+VCS_INFO_detect_mtn:5:> setopt localoptions NO_shwordsplit
+VCS_INFO_detect_mtn:7:> [[ '' == --flavours ]]
+VCS_INFO_detect_mtn:9:> VCS_INFO_check_com mtn
+VCS_INFO_check_com:5:> setopt localoptions NO_shwordsplit
+VCS_INFO_check_com:7:case> case mtn (/*)
+VCS_INFO_check_com:7:case> case mtn (*)
+VCS_INFO_check_com:12:case> ((  0  ))
+VCS_INFO_check_com:15:> return 1
+VCS_INFO_detect_mtn:9:cmdor> return 1
+vcs_info:68:for> vcs=p4
+vcs_info:69:for> [[ -n '' ]]
+vcs_info:70:for if> ((  1 == 0  ))
+vcs_info:75:for> vcs_comm=( )
+vcs_info:76:for> VCS_INFO_get_cmd
+VCS_INFO_get_cmd:4:> local cmd
+VCS_INFO_get_cmd:5:> zstyle -s :vcs_info:p4:default:-all- command cmd
+VCS_INFO_get_cmd:6:> vcs_comm[cmd]=p4
+vcs_info:77:for> VCS_INFO_detect_p4
+VCS_INFO_detect_p4:1:> local serverport p4where
+VCS_INFO_detect_p4:3:if> zstyle -t :vcs_info:p4:default:-all- use-server
+VCS_INFO_detect_p4:23:else> [[ -n '' ]]
+VCS_INFO_detect_p4:23:else cmdor> return 1
+vcs_info:68:for> vcs=svk
+vcs_info:69:for> [[ -n '' ]]
+vcs_info:70:for if> ((  1 == 0  ))
+vcs_info:75:for> vcs_comm=( )
+vcs_info:76:for> VCS_INFO_get_cmd
+VCS_INFO_get_cmd:4:> local cmd
+VCS_INFO_get_cmd:5:> zstyle -s :vcs_info:svk:default:-all- command cmd
+VCS_INFO_get_cmd:6:> vcs_comm[cmd]=svk
+vcs_info:77:for> VCS_INFO_detect_svk
+VCS_INFO_detect_svk:5:> setopt localoptions NO_shwordsplit
+VCS_INFO_detect_svk:7:> [[ '' == --flavours ]]
+VCS_INFO_detect_svk:16:> setopt localoptions noksharrays extendedglob
+VCS_INFO_detect_svk:17:> local -i fhash
+VCS_INFO_detect_svk:18:> fhash=0
+VCS_INFO_detect_svk:20:> VCS_INFO_check_com svk
+VCS_INFO_check_com:5:> setopt localoptions NO_shwordsplit
+VCS_INFO_check_com:7:case> case svk (/*)
+VCS_INFO_check_com:7:case> case svk (*)
+VCS_INFO_check_com:12:case> ((  0  ))
+VCS_INFO_check_com:15:> return 1
+VCS_INFO_detect_svk:20:cmdor> return 1
+vcs_info:68:for> vcs=svn
+vcs_info:69:for> [[ -n '' ]]
+vcs_info:70:for if> ((  1 == 0  ))
+vcs_info:75:for> vcs_comm=( )
+vcs_info:76:for> VCS_INFO_get_cmd
+VCS_INFO_get_cmd:4:> local cmd
+VCS_INFO_get_cmd:5:> zstyle -s :vcs_info:svn:default:-all- command cmd
+VCS_INFO_get_cmd:6:> vcs_comm[cmd]=svn
+vcs_info:77:for> VCS_INFO_detect_svn
+VCS_INFO_detect_svn:5:> setopt localoptions NO_shwordsplit
+VCS_INFO_detect_svn:7:> [[ '' == --flavours ]]
+VCS_INFO_detect_svn:9:> VCS_INFO_check_com svn
+VCS_INFO_check_com:5:> setopt localoptions NO_shwordsplit
+VCS_INFO_check_com:7:case> case svn (/*)
+VCS_INFO_check_com:7:case> case svn (*)
+VCS_INFO_check_com:12:case> ((  0  ))
+VCS_INFO_check_com:15:> return 1
+VCS_INFO_detect_svn:9:cmdor> return 1
+vcs_info:68:for> vcs=tla
+vcs_info:69:for> [[ -n '' ]]
+vcs_info:70:for if> ((  1 == 0  ))
+vcs_info:75:for> vcs_comm=( )
+vcs_info:76:for> VCS_INFO_get_cmd
+VCS_INFO_get_cmd:4:> local cmd
+VCS_INFO_get_cmd:5:> zstyle -s :vcs_info:tla:default:-all- command cmd
+VCS_INFO_get_cmd:6:> vcs_comm[cmd]=tla
+vcs_info:77:for> VCS_INFO_detect_tla
+VCS_INFO_detect_tla:5:> setopt localoptions NO_shwordsplit
+VCS_INFO_detect_tla:7:> [[ '' == --flavours ]]
+VCS_INFO_detect_tla:9:> VCS_INFO_check_com tla
+VCS_INFO_check_com:5:> setopt localoptions NO_shwordsplit
+VCS_INFO_check_com:7:case> case tla (/*)
+VCS_INFO_check_com:7:case> case tla (*)
+VCS_INFO_check_com:12:case> ((  0  ))
+VCS_INFO_check_com:15:> return 1
+VCS_INFO_detect_tla:9:cmdor> return 1
+vcs_info:80:> ((  found == 0  ))
+vcs_info:81:cmdand cursh> vcs=-quilt-
+vcs_info:81:cmdand cursh> quiltmode=standalone
+vcs_info:82:cmdand cursh> VCS_INFO_quilt standalone
+VCS_INFO_quilt:3:> ((  1  ))
+VCS_INFO_quilt:24:> ((  1  ))
+VCS_INFO_quilt:63:> ((  1  ))
+VCS_INFO_quilt:86:> ((  1  ))
+VCS_INFO_quilt:92:cursh> emulate -L zsh
+VCS_INFO_quilt:93:cursh> setopt extendedglob
+VCS_INFO_quilt:94:cursh> local mode=standalone
+VCS_INFO_quilt:95:cursh> local patches pc tmp qstring root
+VCS_INFO_quilt:96:cursh> local -i ret
+VCS_INFO_quilt:97:cursh> local context
+VCS_INFO_quilt:98:cursh> local -a applied unapplied applied_string unapplied_string quiltcommand quilt_env
+VCS_INFO_quilt:99:cursh> local -A hook_com
+VCS_INFO_quilt:101:cursh> context=:vcs_info:-quilt-.quilt-standalone:default:-all-
+VCS_INFO_quilt:102:cursh> zstyle -t :vcs_info:-quilt-.quilt-standalone:default:-all- use-quilt
+VCS_INFO_quilt:102:cursh cmdor> return 1
+vcs_info:82:cmdand cursh cmdor> VCS_INFO_set --nvcs
+VCS_INFO_set:7:> setopt localoptions noksharrays NO_shwordsplit unset
+VCS_INFO_set:8:> local -i i j
+VCS_INFO_set:10:if> [[ --nvcs == --nvcs ]]
+VCS_INFO_set:11:then> [[ '' == -preinit- ]]
+VCS_INFO_set:12:then for> i=0
+VCS_INFO_set:13:then for> typeset -g 'vcs_info_msg_0_='
+VCS_INFO_set:12:then for> i=1
+VCS_INFO_set:13:then for> typeset -g 'vcs_info_msg_1_='
+VCS_INFO_set:15:then> VCS_INFO_nvcsformats
+VCS_INFO_nvcsformats:5:> setopt localoptions noksharrays NO_shwordsplit
+VCS_INFO_nvcsformats:6:> local c v rr
+VCS_INFO_nvcsformats:8:if> [[ '' == -preinit- ]]
+VCS_INFO_nvcsformats:13:> zstyle -a :vcs_info:-quilt-:default:-all- nvcsformats msgs
+VCS_INFO_nvcsformats:14:> ((  0 > maxexports  ))
+VCS_INFO_nvcsformats:15:> return 0
+VCS_INFO_set:16:then> [[ '' != -preinit- ]]
+VCS_INFO_set:16:then cmdand> VCS_INFO_hook no-vcs
+VCS_INFO_hook:5:> local hook static func
+VCS_INFO_hook:6:> local context hook_name
+VCS_INFO_hook:7:> local -i ret
+VCS_INFO_hook:8:> local -a hooks tmp
+VCS_INFO_hook:9:> local -i debug
+VCS_INFO_hook:11:> ret=0
+VCS_INFO_hook:12:> hook_name=no-vcs
+VCS_INFO_hook:13:> shift
+VCS_INFO_hook:14:> context=:vcs_info:-quilt-+no-vcs:default:-all-
+VCS_INFO_hook:15:> static=:vcs_info-static_hooks:no-vcs
+VCS_INFO_hook:17:> zstyle -t :vcs_info:-quilt-+no-vcs:default:-all- debug
+VCS_INFO_hook:17:cmdand> debug=0
+VCS_INFO_hook:18:if> ((  debug  ))
+VCS_INFO_hook:24:> zstyle -a :vcs_info-static_hooks:no-vcs hooks hooks
+VCS_INFO_hook:25:if> ((  debug  ))
+VCS_INFO_hook:28:> zstyle -a :vcs_info:-quilt-+no-vcs:default:-all- hooks tmp
+VCS_INFO_hook:29:if> ((  debug  ))
+VCS_INFO_hook:32:> hooks+=( )
+VCS_INFO_hook:33:> ((  0 == 0  ))
+VCS_INFO_hook:33:cmdand> return 0
+VCS_INFO_set:19:> ((  0 - 1 < 0  ))
+VCS_INFO_set:19:cmdand> return 0
+vcs_info:83:cmdand cursh> return 0
+grml_prompt_addto:39:for else case then> vcscalled=1
+grml_prompt_addto:41:for else case if> ((  1  ))
+grml_prompt_addto:41:for else case if cmdand> [[ -n '' ]]
+grml_prompt_addto:44:for else case else> REPLY=''
+grml_prompt_addto:52:for if> [[ -o prompt_subst ]]
+grml_prompt_addto:57:for> typeset -g 'PS1=%B%F{red}%(?..%? )%f%b%B%F{red}%n%f%b@%m %B%40<..<%~%<< %b'
+grml_prompt_addto:10:for> it=percent
+grml_prompt_addto:11:for> zstyle -s :prompt:grml:left:items:percent pre apre
+grml_prompt_addto:12:for cmdor> apre=''
+grml_prompt_addto:13:for> zstyle -s :prompt:grml:left:items:percent post apost
+grml_prompt_addto:14:for cmdor> apost=''
+grml_prompt_addto:15:for> zstyle -s :prompt:grml:left:items:percent token new
+grml_prompt_addto:16:for cmdor> new='%# '
+grml_prompt_addto:17:for if> ((  0  ))
+grml_prompt_addto:21:for else case> case percent (battery)
+grml_prompt_addto:21:for else case> case percent (change-root)
+grml_prompt_addto:21:for else case> case percent (grml-chroot)
+grml_prompt_addto:21:for else case> case percent (vcs)
+grml_prompt_addto:21:for else case> case percent (*)
+grml_prompt_addto:47:for else case> REPLY='%# '
+grml_prompt_addto:52:for if> [[ -o prompt_subst ]]
+grml_prompt_addto:57:for> typeset -g 'PS1=%B%F{red}%(?..%? )%f%b%B%F{red}%n%f%b@%m %B%40<..<%~%<< %b%# '
+grml_prompt_addto:64:if> [[ -o prompt_subst ]]
+prompt_grml_precmd_worker:5:if> zstyle -T :prompt:grml:right:setup use-rprompt
+prompt_grml_precmd_worker:6:then> grml_prompt_addto RPS1 sad-smiley
+grml_prompt_addto:1:> emulate -L zsh
+grml_prompt_addto:2:> local target=RPS1
+grml_prompt_addto:3:> local lr it apre apost new v REPLY
+grml_prompt_addto:4:> local -a items
+grml_prompt_addto:5:> shift
+grml_prompt_addto:7:> [[ RPS1 == PS1 ]]
+grml_prompt_addto:7:cmdand> lr=right
+grml_prompt_addto:8:> zstyle -a :prompt:grml:right:setup items items
+grml_prompt_addto:8:cmdor> items=( sad-smiley )
+grml_prompt_addto:9:> typeset -g 'RPS1='
+grml_prompt_addto:10:for> it=sad-smiley
+grml_prompt_addto:11:for> zstyle -s :prompt:grml:right:items:sad-smiley pre apre
+grml_prompt_addto:12:for cmdor> apre=''
+grml_prompt_addto:13:for> zstyle -s :prompt:grml:right:items:sad-smiley post apost
+grml_prompt_addto:14:for cmdor> apost=''
+grml_prompt_addto:15:for> zstyle -s :prompt:grml:right:items:sad-smiley token new
+grml_prompt_addto:16:for cmdor> new='%(?..:()'
+grml_prompt_addto:17:for if> ((  0  ))
+grml_prompt_addto:21:for else case> case sad-smiley (battery)
+grml_prompt_addto:21:for else case> case sad-smiley (change-root)
+grml_prompt_addto:21:for else case> case sad-smiley (grml-chroot)
+grml_prompt_addto:21:for else case> case sad-smiley (vcs)
+grml_prompt_addto:21:for else case> case sad-smiley (*)
+grml_prompt_addto:47:for else case> REPLY='%(?..:()'
+grml_prompt_addto:52:for if> [[ -o prompt_subst ]]
+grml_prompt_addto:57:for> typeset -g 'RPS1=%(?..:()'
+grml_prompt_addto:64:if> [[ -o prompt_subst ]]


I use zsh and I have grml-zsh-config installed. When I saw all of the above output I wondered if I have some problem with my zsh configuration. So I changed to bash and repeated:

Code: [Select]
# set -x mkinitcpio -p linux 
+ set -x mkinitcpio -p linux
++ printf '\033]0;%s@%s:%s\007' artiong vtk398 '~'
Title: Re: ERROR: invalid kernel specified: `/boot/vmlinuz-linux'
Post by: strajder on 14 August 2021, 18:23:04
Everything you should have typed is in the linked post, but if you really can't (or won't) read it I'll retype it here:

Code: [Select]
$ /usr/bin/bash --norc
$ su
# source /usr/lib/initcpio/functions
# type kver
# set -x
# kver /boot/vmlinuz-linux

Unrelated, but while some Youtubers (Luke Smith? Mental Outlaw?) praise non-bash shells, bash is still the standard and should be left as a default shell.
Title: Re: ERROR: invalid kernel specified: `/boot/vmlinuz-linux'
Post by: artiong on 14 August 2021, 18:42:08
I think I needed to issue /usr/bin/bash --norc after su to root, too.

Code: [Select]
$ /usr/bin/bash --norc
bash-5.1$ su
# /usr/bin/bash --norc
bash-5.1# source /usr/lib/initcpio/functions
bash: /usr/lib/initcpio/functions: line 817: syntax error near unexpected token `('
bash: /usr/lib/initcpio/functions: line 817: `    rm "$moduledest"/modules.!(*.bin|devname|softdep)'
bash-5.1# type kver
kver is a function
kver ()
{
    local kver re='^[[:digit:]]+(\.[[:digit:]]+)+';
    local offset=$(hexdump -s 526 -n 2 -e '"%0d"' "$1");
    [[ $offset = +([0-9]) ]] || return 1;
    read kver _ < <(dd if="$1" bs=1 count=127 skip=$(( offset + 0x200 )) 2>/dev/null);
    [[ $kver =~ $re ]] || return 1;
    printf '%s' "$kver"
}
bash-5.1# set -x
bash-5.1# kver /boot/vmlinuz-linux
+ kver /boot/vmlinuz-linux
+ local kver 're=^[[:digit:]]+(\.[[:digit:]]+)+'
++ hexdump -s 526 -n 2 -e '"%0d"' /boot/vmlinuz-linux
+ local offset=14464
+ [[ 14464 = +([0-9]) ]]
+ read kver _
++ dd if=/boot/vmlinuz-linux bs=1 count=127 skip=14976
+ [[ You =~ ^[[:digit:]]+(\.[[:digit:]]+)+ ]]
+ return 1
Title: Re: ERROR: invalid kernel specified: `/boot/vmlinuz-linux'
Post by: strajder on 14 August 2021, 18:50:47
I think I needed to issue /usr/bin/bash --norc after su to root, too.
Correct. If the permissions are set up correctly, there is no need to su anyway.

Quote
Code: [Select]
+ [[ You =~ ^[[:digit:]]+(\.[[:digit:]]+)+ ]]
+ return 1
This line means that the kernel in /boot/vmlinuz-linux is possibly corrupted. Instead of returning version string, it returns "You". Try
Code: [Select]
$ dd  if=/boot/vmlinuz-linux bs=1 count=127 skip=$(( 14464 + 0x200 ))
On my system, this returns:
Code: [Select]
5.13.8-artix1-1 (linux@artixlinux) #1 SMP PREEMPT Wed, 04 Aug 2021 21:23:16 +0000b//j/�/r/z/�/;127+0 records in
127+0 records out
127 bytes copied, 0.000416688 s, 305 kB/s
Title: Re: ERROR: invalid kernel specified: `/boot/vmlinuz-linux'
Post by: artiong on 14 August 2021, 18:55:27
Code: [Select]
bash-5.1$ dd  if=/boot/vmlinuz-linux bs=1 count=127 skip=$(( 14464 + 0x200 ))
5.13.10-artix1-1 (linux@artixlinux) #1 SMP PREEMPT Fri, 13 Aug 2021 06:13:17 +0000b//j/Á/r/z//;127+0 records in
127+0 records out
127 bytes copied, 0.000837314 s, 152 kB/s
Title: Re: ERROR: invalid kernel specified: `/boot/vmlinuz-linux'
Post by: strajder on 14 August 2021, 19:02:59
Ok, this means the kernel image is ok, but the construct
Code: [Select]
read kver _ < <(dd if=/boot/vmlinuz-linux bs=1 count=127 skip=$(( 14464 + 0x200 )) 2>/dev/null)
fails. Can you check the output of this?

Code: [Select]
$ read kver _ < <(dd if=/boot/vmlinuz-linux bs=1 count=127 skip=$(( 14464 + 0x200 )) 2>/dev/null)
$ echo $kver
Note the spaces: strings "kver" "_" "<" "<(..." are separate.
Title: Re: ERROR: invalid kernel specified: `/boot/vmlinuz-linux'
Post by: artiong on 14 August 2021, 19:09:29
I sure can I appreciate you spending all this time.

Code: [Select]
bash-5.1$ read kver _ < <(dd if=/boot/vmlinuz-linux bs=1 count=127 skip=$(( 14464 + 0x200 )) 2>/dev/null)
bash-5.1$ echo $kver
5.13.10-artix1-1

I am sure you realize this, I have installed 5.13.10-artix1-1, but I am still running Linux 5.13.8-artix1-1

I am almost certain that if I reboot, it won't
Title: Re: ERROR: invalid kernel specified: `/boot/vmlinuz-linux'
Post by: strajder on 14 August 2021, 19:18:46
The generation of initramfs failed on your system, so your system definitely won't boot if you restart it.

That the function fails, but the commands it calls don't is weird. I'd try to call kver /boot/vmlinuz-linux again, just is case.

What I'd try is to replace zsh with bash, (chsh first as user, then as root, maybe even run pacman -S bash for good measure) relog (not restart) and then retry pacman -S linux mkinitcpio as root.
Title: Re: ERROR: invalid kernel specified: `/boot/vmlinuz-linux'
Post by: artiong on 14 August 2021, 19:45:02
Code: [Select]
# /usr/bin/bash --norc
bash-5.1# source /usr/lib/initcpio/functions
bash: /usr/lib/initcpio/functions: line 817: syntax error near unexpected token `('
bash: /usr/lib/initcpio/functions: line 817: `    rm "$moduledest"/modules.!(*.bin|devname|softdep)'
bash-5.1# type kver
kver is a function
kver ()
{
    local kver re='^[[:digit:]]+(\.[[:digit:]]+)+';
    local offset=$(hexdump -s 526 -n 2 -e '"%0d"' "$1");
    [[ $offset = +([0-9]) ]] || return 1;
    read kver _ < <(dd if="$1" bs=1 count=127 skip=$(( offset + 0x200 )) 2>/dev/null);
    [[ $kver =~ $re ]] || return 1;
    printf '%s' "$kver"
}
bash-5.1# set -x
bash-5.1# kver /boot/vmlinuz-linux
+ kver /boot/vmlinuz-linux
+ local kver 're=^[[:digit:]]+(\.[[:digit:]]+)+'
++ hexdump -s 526 -n 2 -e '"%0d"' /boot/vmlinuz-linux
+ local offset=14464
+ [[ 14464 = +([0-9]) ]]
+ read kver _
++ dd if=/boot/vmlinuz-linux bs=1 count=127 skip=14976
+ [[ You =~ ^[[:digit:]]+(\.[[:digit:]]+)+ ]]
+ return 1

I did as you suggested. Changed shells, reinstalled bash, relog, pacman -S linux mkinitcpio, but unfortunately I'm still getting invalid kernel specified errors.

Did you happen to upgrade to linux-5.13.10.artix1-1 yet?
Title: Re: ERROR: invalid kernel specified: `/boot/vmlinuz-linux'
Post by: strajder on 14 August 2021, 22:06:22
Did you happen to upgrade to linux-5.13.10.artix1-1 yet?
Yes, without any problems.

What you describe is very weird and shouldn't happen. We have narrowed it down to the assignment to the $kver variable by process substitution <(), but if that command works on its own, it should work as part of the function as well. There must be some interaction or limit somewhere, but I'm out of ideas.

If anything else fails, reinstall Artix from bootable media and upgrade.
Title: Re: ERROR: invalid kernel specified: `/boot/vmlinuz-linux'
Post by: VictorBrand on 14 August 2021, 22:30:20
Have you tried to install lts kernel?
Title: Re: ERROR: invalid kernel specified: `/boot/vmlinuz-linux'
Post by: artiong on 14 August 2021, 22:50:07
Yes, I tried installing linux-lts and linux-zen and the same thing happened with both of them, too.

I went by my office where I still run Arch linux. I did the updates, got linux-5.13.10, and the same thing happened on Arch linux. So something about the way I set these two computers up had the same effect when linux 5.13.10 came along. I've been using zsh for many years, but maybe that is it and it just never mattered until now, I don't know. I also use the program R a lot on both computers and I wonder if some kind of a file conflict might be causing it.

strajder, thanks for your help!

Title: Re: ERROR: invalid kernel specified: `/boot/vmlinuz-linux'
Post by: VictorBrand on 14 August 2021, 23:08:35
Tough luck then. But while initcpio is so capricious, it's still possible to try dracut.
Title: Re: ERROR: invalid kernel specified: `/boot/vmlinuz-linux'
Post by: ####### on 15 August 2021, 01:57:04
Couple of alternative ideas:
https://www.cgsecurity.org/wiki/PhotoRec (https://www.cgsecurity.org/wiki/PhotoRec)
If you were lucky you might get the deleted contents of /boot back, but you would need to be careful even if you did find some, because they might be corrupted or older versions. Could take a while if you weren't familiar with that software though and it might not work when you rebooted!
Also, if these are important systems, copy them (at least the system parts if not /home/ and it's probably less than 10GB) to an external drive or USB and then you can chroot in and try stuff in safety. Probably rolling back some updates would fix it but safest to figure out on the copy, if one slip means you can't reboot and then have to chroot in anyway.

failing command from first post:
Code: [Select]
# mkinitcpio -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux.img
man mkinitcpio:
-k, --kernel kernelversion
           Use kernelversion, instead of the current running kernel. This may be a path to a kernel image (only supported for x86-based architectures), a
           specific kernel version or the special keyword none. In the latter case, no kernel modules are added to the image.

Perhaps not x86?
This should make the /boot stuff for the currently running kernel, you could try and figure out the -k content for other versions later if it worked:
Code: [Select]
# mkinitcpio -c /etc/mkinitcpio.conf -g /boot/initramfs-linux.img
Title: Re: ERROR: invalid kernel specified: `/boot/vmlinuz-linux'
Post by: strajder on 15 August 2021, 11:17:56
failing command from first post:
Code: [Select]
# mkinitcpio -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux.img
While this could work, the OP could still experience the issue on every update and would possibly have to manually generate initramfs every time.

The issue itself would require more thorough debugging, removing any user-modified configuration files, separate versions of programs and alternate symbolic links to programs.
Title: Re: ERROR: invalid kernel specified: `/boot/vmlinuz-linux'
Post by: ####### on 15 August 2021, 13:00:22
Not sure it's user config doing it, on my system:
Code: [Select]
$ sudo mkinitcpio -p linux
==> Building image from preset: /etc/mkinitcpio.d/linux.preset: 'default'
  -> -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux.img
But perhaps that -k /boot/vmlinuz-linux won't work on say, an ARM server, according to the man page? This would only be relevant if both the problem machines were not x86 though, which I don't know, and if the -k specifier content or something related to it's behavior has changed on an update.
Title: Re: ERROR: invalid kernel specified: `/boot/vmlinuz-linux'
Post by: strajder on 15 August 2021, 13:15:48
But perhaps that -k /boot/vmlinuz-linux won't work on say, an ARM server, according to the man page? This would only be relevant if both the problem machines were not x86 though, which I don't know, and if the -k specifier content or something related to it's behavior has changed on an update.
Maybe the OP is using a virtual machine?
Title: Re: ERROR: invalid kernel specified: `/boot/vmlinuz-linux'
Post by: Chris Cromer on 16 August 2021, 00:16:10
Code: [Select]
# /usr/bin/bash --norc
bash-5.1# source /usr/lib/initcpio/functions
bash: /usr/lib/initcpio/functions: line 817: syntax error near unexpected token `('
bash: /usr/lib/initcpio/functions: line 817: `    rm "$moduledest"/modules.!(*.bin|devname|softdep)'
bash-5.1# type kver
kver is a function
kver ()
{
    local kver re='^[[:digit:]]+(\.[[:digit:]]+)+';
    local offset=$(hexdump -s 526 -n 2 -e '"%0d"' "$1");
    [[ $offset = +([0-9]) ]] || return 1;
    read kver _ < <(dd if="$1" bs=1 count=127 skip=$(( offset + 0x200 )) 2>/dev/null);
    [[ $kver =~ $re ]] || return 1;
    printf '%s' "$kver"
}
bash-5.1# set -x
bash-5.1# kver /boot/vmlinuz-linux
+ kver /boot/vmlinuz-linux
+ local kver 're=^[[:digit:]]+(\.[[:digit:]]+)+'
++ hexdump -s 526 -n 2 -e '"%0d"' /boot/vmlinuz-linux
+ local offset=14464
+ [[ 14464 = +([0-9]) ]]
+ read kver _
++ dd if=/boot/vmlinuz-linux bs=1 count=127 skip=14976
+ [[ You =~ ^[[:digit:]]+(\.[[:digit:]]+)+ ]]
+ return 1

I did as you suggested. Changed shells, reinstalled bash, relog, pacman -S linux mkinitcpio, but unfortunately I'm still getting invalid kernel specified errors.

Did you happen to upgrade to linux-5.13.10.artix1-1 yet?
Considering you said you changed shells and reinstalled bash... what is /usr/bin/sh linked to?
Title: Re: ERROR: invalid kernel specified: `/boot/vmlinuz-linux'
Post by: artiong on 19 August 2021, 14:47:46
Hi, sorry for the delay.

Quote
Maybe the OP is using a virtual machine?

No, both the Artix installation at home and the Arch installation at work were bare metal.

Quote
Considering you said you changed shells and reinstalled bash... what is /usr/bin/sh linked to?

Code: [Select]
lrwxrwxrwx 1 root root 4 May 9 13:14 sh -> bash

I thought I would chroot in and see if matters improved. I don't know if any of the messages in here might provide a clue. Here I have only typed in the lines that seem like they might be helpful.

Code: [Select]
sh-5.1# pacman -S linux linux-headers util-linux mkinitcpio
...
(2/5) Creating temporary files...
Failed to open file "/sys/devices/system/cpu/microcode/reload": Read-only file system
error: command failed to execute correctly
(3/5) Reloading device manager configuration...
 Skipped: Device manager is not running.
...
(5/5) Updating linux initcpios...
==> 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 spcified: '/boot/vmlinuz-linx'

The results were the same for linux-lts, linux-zen, and all the fallback images.
Title: Re: ERROR: invalid kernel specified: `/boot/vmlinuz-linux'
Post by: ####### on 19 August 2021, 20:57:51
Code: [Select]
$ ls /usr/lib/modules
will show installed kernels, pick the one you want to build for and be careful as you may see extra dirs for kernels that aren't installed if you have headers only for some versions, they won't build and fail with an error.
So just take the name as given in that dir and use it for -k instead of the vmlinuz which isn't working, to run the command manually and see if specifying the actual kernel version helps:
Code: [Select]
# mkinitcpio -k x.y.z-artix-foobar -c /etc/mkinitcpio.conf -g /boot/initramfs-linux.img
It won't resolve the vmlinuz issue but it might fix the immediate problem so you can reboot.
Title: Re: ERROR: invalid kernel specified: `/boot/vmlinuz-linux'
Post by: artiong on 20 August 2021, 14:22:20
I had both /usr/lib/modules/5.13.10-artix1-1 and linux-headers 5.13.10.artix1-1, so as you suggested:

Code: [Select]
mkinitcpio -k 5.13.10-artix1-1 -c /etc/mkinitcpio.conf -g /boot/initramfs-linux.img

And I did get a /boot/initramfs-linux.img!

Its size is 5594970.

But, when I rebooted it hung here.

Code: [Select]
Loading Linux linux ...
Loading initial ramdisk ...

Thanks anyway for your help.

I got all my files off that drive. So no problem there. If its time to call it I can live with that.
Title: Re: ERROR: invalid kernel specified: `/boot/vmlinuz-linux'
Post by: ####### on 20 August 2021, 15:25:12
Possibly this is related to what you said earlier about moving /boot/efi. I've sometimes accidentally created situations where the /boot partition is not mounted on /boot, things get written to the mount point, then hidden when the partition is mounted, and later could be revealed accidentally again but are the wrong version and so on, check files are where you expect and have the right modification times. And check grub.cfg (or equivalent) has the right partition UUID in the kernel commandline.
Title: Re: ERROR: invalid kernel specified: `/boot/vmlinuz-linux'
Post by: artiong on 20 August 2021, 16:42:25
Possibly, but remember I did this early on:

Code: [Select]
mkdir /boot/EFI/grub
cp /boot/EFI/BOOT/BOOTX64.EFI /boot/EFI/grub/grubx64.efi

I think it is okay to have both a /boot/EFI/BOOT/BOOTX64.EFI and a/boot/EFI/grub/grubx64.efi. I think that is how I made my MSI motherboard work before I read about the --removable option for grub-install.
Title: Re: ERROR: invalid kernel specified: `/boot/vmlinuz-linux'
Post by: ####### on 21 August 2021, 00:44:27
Yes, I guess, I'm still using BIOS boot, so my knowledge is very limited on EFI! But as a general principle I would be looking at chrooting in, downgrading recent updates by checking /var/log/pacman.log, packages may still be in /var/cache/pacman/pkg, checking /etc/fstab if anything has changed in that respect, looking back through .bash_history if I had changed anything important recently, and trying to successfully re-run mkinitcpio either manually or as part of a kernel installation process. I think it's probably a typo but your earlier grub-mkconfig command is grub-install which is something totally different if you actually did think it was grub-mkconfig.  :D  While probably not related I did recently discover that os-prober will take it's command line from the grub.cfg in other distros, so if update-grub has not been run in them (even though grub is not really being used there) it can point to the wrong place. If there was a problem with vmlinuz-linux it wouldn't boot as that is required, and it seems the efi partition can sometimes be corrupted when dual booting with Windows. Sorry the mkinitcpio did not work though, usually if that can be run then it will allow a reboot.
Title: Re: ERROR: invalid kernel specified: `/boot/vmlinuz-linux'
Post by: strajder on 21 August 2021, 12:09:33
I don't think this is related to EFI boot. Like I said earlier, we have determined the location of the error, but the error itself doesn't make sense.
Quote
# /usr/bin/bash --norc
bash-5.1# source /usr/lib/initcpio/functions
bash-5.1# set -x
bash-5.1# kver /boot/vmlinuz-linux
+ kver /boot/vmlinuz-linux
+ local kver 're=^[[:digit:]]+(\.[[:digit:]]+)+'
++ hexdump -s 526 -n 2 -e '"%0d"' /boot/vmlinuz-linux
+ local offset=14464
+ [[ 14464 = +([0-9]) ]]
+ read kver _
++ dd if=/boot/vmlinuz-linux bs=1 count=127 skip=14976
+ [[ You =~ ^[[:digit:]]+(\.[[:digit:]]+)+ ]]
+ return 1

Instead of "You" (where does that string even come from?!) in the line before the last, there should be a kernel version number. The command in question, which is
Quote
read kver _ < <(dd if=/boot/vmlinuz-linux bs=1 count=127 skip=$(( 14464 + 0x200 )) 2>/dev/null)
reportedly works when called from the interactive shell on the OPs system, but when put in a script it doesn't. The script (/usr/lib/initcpio/functions) has /bin/bash as a shebang, and the user reportedly uses bash as his shell now (was using zsh), so the command should work in theory, provided the OP is telling the truth and not trolling the forum, of course.

Update 2021-08-24: There is a thread about a similar issue (https://unix.stackexchange.com/questions/354014/command-runs-from-the-shell-but-doesnt-run-from-a-script-sh) at Stackexchange, but there the script's shebang is #!/bin/sh instead of #!/bin/bash which is present in both /usr/lib/initcpio/functions and /usr/bin/mkinitcpio.
Title: Re: ERROR: invalid kernel specified: `/boot/vmlinuz-linux'
Post by: strajder on 24 April 2022, 18:49:17
Since there was recently a topic about a similar issue (https://forum.artixlinux.org/index.php/topic,3920.msg25559.html#msg25559), which was solved, it is highly likely that the solution for this case is also similar.

Namely, the OP should check if there are any custom-made scripts (in /usr/local/bin for example), shell functions or aliases named "dd" and rename or remove them.