O que pode causar “a versão 'KERNEL_VERSION' possui uma sintaxe incorreta: o número da versão não inicia com o dígito” durante update-initramfs -u

3

Quando executo sudo update-initramfs -u , obtenho a saída de erro

dpkg: warning: version 'KERNEL_VERSION' has bad syntax: version number does not start with digit
update-initramfs: Generating /boot/initrd.img-KERNEL_VERSION
dpkg: warning: version 'KERNEL_VERSION' has bad syntax: version number does not start with digit
grep: /boot/config-KERNEL_VERSION: No such file or directory
WARNING: missing /lib/modules/KERNEL_VERSION
Device driver support needs thus be built-in linux image!
depmod: FATAL: KERNEL_VERSION: not absolute path.
W: mdadm: /etc/mdadm/mdadm.conf defines no arrays.
depmod: ERROR: could not open directory /tmp/mkinitramfs_Qe3Tum/lib/modules/4.0.0-040000-generic: No such file or directory
depmod: FATAL: could not search modules: No such file or directory

Eu suspeito de uma variável que é interpretada acidentalmente como literal, então eu corri

  • sudo grep -r 'KERNEL_VERSION' /boot/ e sudo grep -r 'KERNEL_VERSION' /lib/ sem resultado e
  • sudo grep -r 'KERNEL_VERSION' /usr/ retorna muitos resultados para investigar.

Estou usando o Ubuntu 15.04 amd64 com o Linux 4.0.0.

sudo update-initramfs -u -v produz saída

dpkg: warning: version 'KERNEL_VERSION' has bad syntax: version number does not start with digit
Available versions:  KERNEL_VERSION 4.0.0-040000-generic 3.19.3-031903-generic 3.19.0-15-generic 3.19.0-14-generic 3.16.0-23-generic
Keeping /boot/initrd.img-KERNEL_VERSION.dpkg-bak
update-initramfs: Generating /boot/initrd.img-KERNEL_VERSION
dpkg: warning: version 'KERNEL_VERSION' has bad syntax: version number does not start with digit
grep: /boot/config-KERNEL_VERSION: No such file or directory
linux-2.6 misses gzip support, using gzip
WARNING: missing /lib/modules/KERNEL_VERSION
Device driver support needs thus be built-in linux image!
depmod: FATAL: KERNEL_VERSION: not absolute path.
Adding binary /usr/lib/initramfs-tools/bin/wait-for-root
Adding library /lib/x86_64-linux-gnu/libudev.so.1
Adding library /lib/x86_64-linux-gnu/libc.so.6
Adding library /lib/x86_64-linux-gnu/libpthread.so.0
Adding library /lib64/ld-linux-x86-64.so.2
Adding binary /sbin/modprobe
Adding binary /sbin/rmmod
Adding binary /sbin/blkid
Adding library /lib/x86_64-linux-gnu/libblkid.so.1
Adding library /lib/x86_64-linux-gnu/libuuid.so.1
Calling hook brltty
Adding binary /usr/share/brltty/initramfs/brltty.sh
Adding binary /sbin/brltty-setup
Calling hook btrfs
Adding binary /sbin/btrfs
Adding library /lib/x86_64-linux-gnu/libz.so.1
Adding library /lib/x86_64-linux-gnu/liblzo2.so.2
Adding binary /sbin/btrfs-zero-log
Adding binary /sbin/fsck.btrfs
Calling hook compcache
Calling hook cryptroot
Calling hook dmraid
Adding binary /sbin/dmraid
Adding library /lib/libdmraid.so.1.0.0.rc16
Adding library /lib/x86_64-linux-gnu/libdevmapper.so.1.02.1
Adding library /lib/x86_64-linux-gnu/libselinux.so.1
Adding library /lib/x86_64-linux-gnu/libpcre.so.3
Adding library /lib/x86_64-linux-gnu/libdl.so.2
Adding binary /sbin/dmraid-activate
Calling hook framebuffer
Calling hook fuse
Adding binary /sbin/mount.fuse
Calling hook klibc
Calling hook kmod
Adding binary /bin/kmod
Calling hook mountall
Calling hook thermal
Calling hook udev
Adding binary /lib/systemd/systemd-udevd
Adding library /lib/x86_64-linux-gnu/libkmod.so.2
Adding library /lib/x86_64-linux-gnu/libacl.so.1
Adding library /lib/x86_64-linux-gnu/libattr.so.1
Adding binary /bin/udevadm
Adding binary /lib/udev/ata_id
Adding binary /lib/udev/scsi_id
Calling hook zz-busybox
Adding binary /bin/busybox
Calling hook cryptpassdev
Calling hook cryptopensc
Calling hook cryptopenct
Calling hook cryptkeyctl
Calling hook cryptgnupg
Calling hook plymouth
Adding binary /sbin/plymouthd
Adding library /lib/x86_64-linux-gnu/libply.so.4
Adding library /lib/x86_64-linux-gnu/libply-splash-core.so.4
Adding library /lib/x86_64-linux-gnu/librt.so.1
Adding library /lib/x86_64-linux-gnu/libm.so.6
Adding binary /bin/plymouth
Adding binary /lib/x86_64-linux-gnu/plymouth/details.so
Adding binary /lib/x86_64-linux-gnu/plymouth/ubuntu-text.so
Adding binary /lib/x86_64-linux-gnu/plymouth/script.so
Adding library /lib/x86_64-linux-gnu/libply-splash-graphics.so.4
Adding library /lib/x86_64-linux-gnu/libpng12.so.0
Adding binary /lib/x86_64-linux-gnu/plymouth/label.so
Adding library /usr/lib/x86_64-linux-gnu/libpangocairo-1.0.so.0
Adding library /usr/lib/x86_64-linux-gnu/libpango-1.0.so.0
Adding library /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
Adding library /usr/lib/x86_64-linux-gnu/libcairo.so.2
Adding library /lib/x86_64-linux-gnu/libglib-2.0.so.0
Adding library /usr/lib/x86_64-linux-gnu/libpangoft2-1.0.so.0
Adding library /usr/lib/x86_64-linux-gnu/libfontconfig.so.1
Adding library /usr/lib/x86_64-linux-gnu/libfreetype.so.6
Adding library /usr/lib/x86_64-linux-gnu/libgmodule-2.0.so.0
Adding library /usr/lib/x86_64-linux-gnu/libthai.so.0
Adding library /usr/lib/x86_64-linux-gnu/libffi.so.6
Adding library /usr/lib/x86_64-linux-gnu/libpixman-1.so.0
Adding library /usr/lib/x86_64-linux-gnu/libxcb-shm.so.0
Adding library /usr/lib/x86_64-linux-gnu/libxcb-render.so.0
Adding library /usr/lib/x86_64-linux-gnu/libxcb.so.1
Adding library /usr/lib/x86_64-linux-gnu/libXrender.so.1
Adding library /usr/lib/x86_64-linux-gnu/libX11.so.6
Adding library /usr/lib/x86_64-linux-gnu/libXext.so.6
Adding library /usr/lib/x86_64-linux-gnu/libharfbuzz.so.0
Adding library /lib/x86_64-linux-gnu/libexpat.so.1
Adding library /usr/lib/x86_64-linux-gnu/libdatrie.so.1
Adding library /usr/lib/x86_64-linux-gnu/libXau.so.6
Adding library /usr/lib/x86_64-linux-gnu/libXdmcp.so.6
Adding library /usr/lib/x86_64-linux-gnu/libgraphite2.so.3
Adding binary /lib/x86_64-linux-gnu/libnss_files-2.21.so
Adding binary /lib/x86_64-linux-gnu/libnss_files.so.2
Adding binary /lib/x86_64-linux-gnu/plymouth/renderers/frame-buffer.so
Adding binary /lib/x86_64-linux-gnu/plymouth/renderers/drm.so
Adding library /usr/lib/x86_64-linux-gnu/libdrm.so.2
Adding binary /lib/x86_64-linux-gnu/plymouth/renderers/vga16fb.so
Calling hook ntfs_3g
Adding binary /bin/ntfs-3g
Adding library /lib/x86_64-linux-gnu/libntfs-3g.so.853
Calling hook console_setup
Calling hook kbd
Adding binary /bin/setfont
Adding binary /bin/kbd_mode
Adding binary /bin/loadkeys
Calling hook busybox
Adding binary /usr/lib/initramfs-tools/bin/busybox
Calling hook zdev
Adding binary /lib/udev/vdev_id
Adding binary /lib/udev/zvol_id
Calling hook watershed
Adding binary /lib/udev/watershed
Calling hook mdadm
Adding binary /sbin/mdadm
Adding binary /sbin/mdmon
W: mdadm: /etc/mdadm/mdadm.conf defines no arrays.
Calling hook lvm2
Adding binary /sbin/dmsetup
Adding binary /sbin/lvm
Adding library /lib/x86_64-linux-gnu/libdevmapper-event.so.1.02.1
Adding library /lib/x86_64-linux-gnu/libreadline.so.5
Adding library /lib/x86_64-linux-gnu/libtinfo.so.5
Calling hook kpartx
Adding binary /sbin/kpartx
Adding binary /lib/udev/dmsetup_env
Adding binary /lib/udev/kpartx_id
Calling hook fixrtc
Adding binary /sbin/dumpe2fs
Adding library /lib/x86_64-linux-gnu/libext2fs.so.2
Adding library /lib/x86_64-linux-gnu/libcom_err.so.2
Adding library /lib/x86_64-linux-gnu/libe2p.so.2
Calling hook dmsetup
Calling hook bcache
Adding binary /lib/udev/bcache-register
Adding binary /lib/udev/probe-bcache
Calling hook flashcache
Adding binary /sbin/flashcache_load
Adding binary /sbin/flashcache_create
Adding binary /sbin/flashcache_destroy
depmod: ERROR: could not open directory /tmp/mkinitramfs_H6lHuZ/lib/modules/4.0.0-040000-generic: No such file or directory
depmod: FATAL: could not search modules: No such file or directory
Building cpio /boot/initrd.img-KERNEL_VERSION.new initramfs
    
por Karl Richter 25.04.2015 / 22:02

2 respostas

1

Você tem uma pasta chamada 'KERNEL_VERSION' em / var / lib / initramfs-tools

Em algum momento, você ou algum script o criou erroneamente.

para pesquisar, você precisaria usar o find.

for x in /usr /var /boot; do find $x -name '*KERNEL_VERSION'; done

Se a minha suspeita estiver correta, você pode corrigir o problema com

sudo rm -Rf /var/lib/initramfs-tools/KERNEL_VERSION
    
por nuclearmistake 13.01.2016 / 21:58
0

pls verifica a pasta / var / lib / initramfs-tools / para entradas erradas e apaga-as. Eu tinha lá um arquivo chamado "a", que também estava me dando as mesmas mensagens de erro que você tem.

root@proxy:~# LANG=C dpkg-reconfigure initramfs-tools
update-initramfs: deferring update (trigger activated)
Processing triggers for initramfs-tools (0.103ubuntu4.2) ...
dpkg: warning: version 'a' has bad syntax: version number does not start with digit
update-initramfs: Generating /boot/initrd.img-a
dpkg: warning: version 'a' has bad syntax: version number does not start with digit
grep: /boot/config-a: No such file or directory
WARNING: missing /lib/modules/a
Device driver support needs thus be built-in linux image!
depmod: FATAL: a: not absolute path.
depmod: ERROR: could not open directory /tmp/mkinitramfs_fuhjWs/lib/modules/3.13.0-54-generic: No such file or directory
depmod: FATAL: could not search modules: No such file or directory

Depois de adicionar "set -x" à linha 2. de "/ usr / sbin / update-initramfs", encontrei esta pasta.

    
por Thomas C. 15.06.2015 / 12:58