You are not logged in.

#1 2014-03-10 17:12:05

Isildur
Member
Registered: 2009-05-26
Posts: 96

[solved]Update problem: invalid magic number

Hi

I just updated my system after some time and there was a note which I read just briefly saying that one should reboot at the next opportunity. After rebooting however I received the following error directly at boot (or not boot in this case)

Loading Linux core repo kernel...
error: invalid magic number.
Loading initial ramdisk...
error: you need to lead the kernel first

Anyone any idea what went wrong?

Last edited by Isildur (2014-03-11 09:04:13)

Offline

#2 2014-03-10 17:27:42

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [solved]Update problem: invalid magic number

What does "after some time" mean? Chroot in and look through pacman's log.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2014-03-10 17:29:37

breiti
Member
Registered: 2014-03-10
Posts: 5

Re: [solved]Update problem: invalid magic number

Magic numbers are used to identifiy file-types on file-content (rather than file extensions). It works by reading some of the beginning bytes of a file and compare it with a table of known files which starts with that pattern ("file" does this).

It seems your boot configuration is defect or the vmlinuz/initramfs images are not valid. What is your boot config and what does "file" outputs for your /boot/initramfs-linux.img and /boot/vmlinuz-linux?

Offline

#4 2014-03-10 17:40:09

Isildur
Member
Registered: 2009-05-26
Posts: 96

Re: [solved]Update problem: invalid magic number

Thank you very much for the answers and explanation!

Ah sorry, I forgot to mention that the system did not shut down by itself for some time, so I forcefully shutdown it. I had these issues occasionally but never any problems (yes I should have payed more attention). Apparently therefore I don't have the pacman.log from the last update hmm The last update was about 10 days ago.

ps: need to organize a live stick to check the "file" output but according to Window's file manager the files were last modified in the update before.

Last edited by Isildur (2014-03-10 17:42:39)

Offline

#5 2014-03-10 19:28:58

Isildur
Member
Registered: 2009-05-26
Posts: 96

Re: [solved]Update problem: invalid magic number

Regarding the output of file

$ file initramfs-linux.img 
initramfs-linux.img: gzip compressed data, from Unix, last modified: Mon Mar 10 16:43:43 2014
$ file vmlinuz-linux 
vmlinuz-linux: Linux kernel x86 boot executable bzImage, version 3.13.6-1-ARCH (nobody@var-lib-archbuild-extra-x86_64-thomas) #1, RO-rootFS, swap_dev 0x3, Normal VGA

Looks ok to me?!

Offline

#6 2014-03-10 19:31:52

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [solved]Update problem: invalid magic number

Isildur wrote:

Apparently therefore I don't have the pacman.log from the last update hmm The last update was about 10 days ago.

Pacman's log isn't replaced on reboot. Chroot in and paste it here.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#7 2014-03-10 19:50:08

Isildur
Member
Registered: 2009-05-26
Posts: 96

Re: [solved]Update problem: invalid magic number

Ah cool thanks! Here is the output

[2014-03-10 17:22] [PACMAN] Running 'pacman -Syu'
[2014-03-10 17:22] [PACMAN] synchronizing package lists
[2014-03-10 17:22] [PACMAN] starting full system upgrade
[2014-03-10 17:43] [PACMAN] installed libseccomp (2.1.1-1)
[2014-03-10 17:43] [ALPM-SCRIPTLET] :: systemd has not been reexecuted. It is recommended that you
[2014-03-10 17:43] [ALPM-SCRIPTLET]    reboot at your earliest convenience.
[2014-03-10 17:43] [ALPM-SCRIPTLET] :: Network device naming is now controlled by udev's net_setup_link
[2014-03-10 17:43] [ALPM-SCRIPTLET]    builtin. Refer to the NETWORK LINK CONFIGURATION section of the
[2014-03-10 17:43] [ALPM-SCRIPTLET]    udev manpage for a full description.
[2014-03-10 17:43] [ALPM-SCRIPTLET] :: No changes have been made to your network naming configuration.
[2014-03-10 17:43] [ALPM-SCRIPTLET]    Interfaces should continue to maintain the same names.
[2014-03-10 17:43] [PACMAN] upgraded systemd (208-11 -> 210-3)
[2014-03-10 17:43] [PACMAN] upgraded libpulse (4.0-6 -> 5.0-1)
[2014-03-10 17:43] [PACMAN] upgraded chromium (33.0.1750.117-1 -> 33.0.1750.146-1)
[2014-03-10 17:43] [PACMAN] upgraded libpng (1.6.9-1 -> 1.6.10-1)
[2014-03-10 17:43] [PACMAN] upgraded libcups (1.7.1-3 -> 1.7.1-4)
[2014-03-10 17:43] [PACMAN] upgraded cups (1.7.1-3 -> 1.7.1-4)
[2014-03-10 17:43] [PACMAN] upgraded mesa (10.0.3-1 -> 10.1.0-2)
[2014-03-10 17:43] [PACMAN] upgraded mesa-libgl (10.0.3-1 -> 10.1.0-2)
[2014-03-10 17:43] [PACMAN] upgraded webkitgtk2 (1.10.2-8 -> 2.2.5-2)
[2014-03-10 17:43] [PACMAN] upgraded eclipse (4.3.1-2 -> 4.3.2-2)
[2014-03-10 17:43] [PACMAN] upgraded file (5.17-1 -> 5.17-2)
[2014-03-10 17:43] [PACMAN] upgraded gcr (3.10.1-2 -> 3.10.1-3)
[2014-03-10 17:43] [PACMAN] upgraded gdk-pixbuf2 (2.30.5-1 -> 2.30.6-1)
[2014-03-10 17:43] [PACMAN] upgraded gnutls (3.2.11-1 -> 3.2.12.1-1)
[2014-03-10 17:43] [PACMAN] upgraded intel-dri (10.0.3-1 -> 10.1.0-2)
[2014-03-10 17:43] [PACMAN] upgraded kdelibs (4.12.2-1 -> 4.12.3-1)
[2014-03-10 17:43] [PACMAN] upgraded lib32-libpng (1.6.8-1 -> 1.6.10-1)
[2014-03-10 17:43] [PACMAN] upgraded lib32-gdk-pixbuf2 (2.30.3-1 -> 2.30.6-1)
[2014-03-10 17:43] [PACMAN] upgraded lib32-glibc (2.19-1 -> 2.19-3)
[2014-03-10 17:43] [PACMAN] upgraded lib32-harfbuzz (0.9.24-1 -> 0.9.26-1)
[2014-03-10 17:43] [PACMAN] upgraded lib32-libgcrypt (1.6.0-1 -> 1.6.1-1)
[2014-03-10 17:43] [PACMAN] upgraded lib32-libldap (2.4.38-1 -> 2.4.39-1)
[2014-03-10 17:43] [PACMAN] installed lib32-libxshmfence (1.1-1)
[2014-03-10 17:43] [PACMAN] upgraded lib32-systemd (208-2 -> 210-1)
[2014-03-10 17:43] [PACMAN] upgraded lib32-mesa (10.0.3-1 -> 10.1.0-2)
[2014-03-10 17:43] [PACMAN] upgraded lib32-mesa-libgl (10.0.3-1 -> 10.1.0-2)
[2014-03-10 17:43] [PACMAN] upgraded lib32-pango (1.36.1-1 -> 1.36.2-1)
[2014-03-10 17:43] [PACMAN] upgraded lib32-readline (6.2.004-1 -> 6.3.000-1)
[2014-03-10 17:43] [PACMAN] upgraded lib32-sqlite (3.8.3-1 -> 3.8.3.1-1)
[2014-03-10 17:43] [PACMAN] upgraded lib32-util-linux (2.24-1 -> 2.24.1-1)
[2014-03-10 17:43] [PACMAN] upgraded libarchive (3.1.2-4 -> 3.1.2-6)
[2014-03-10 17:43] [PACMAN] upgraded libburn (1.3.4-1 -> 1.3.6-1)
[2014-03-10 17:43] [PACMAN] upgraded libisofs (1.3.4-1 -> 1.3.6-1)
[2014-03-10 17:43] [PACMAN] upgraded libnl (3.2.23-1 -> 3.2.24-1)
[2014-03-10 17:43] [PACMAN] upgraded libtirpc (0.2.3-2 -> 0.2.4-1)
[2014-03-10 17:43] [PACMAN] upgraded libunique (1.1.6-5 -> 1.1.6-6)
[2014-03-10 17:43] [PACMAN] upgraded libva (1.2.1-1 -> 1.2.1-2)
[2014-03-10 17:43] [ALPM-SCRIPTLET] >>> Updating module dependencies. Please wait ...
[2014-03-10 17:43] [ALPM-SCRIPTLET] >>> Generating initial ramdisk, using mkinitcpio.  Please wait...
[2014-03-10 17:43] [ALPM-SCRIPTLET] ==> Building image from preset: /etc/mkinitcpio.d/linux.preset: 'default'
[2014-03-10 17:43] [ALPM-SCRIPTLET]   -> -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux.img
[2014-03-10 17:43] [ALPM-SCRIPTLET] ==> Starting build: 3.13.6-1-ARCH
[2014-03-10 17:43] [ALPM-SCRIPTLET]   -> Running build hook: [base]
[2014-03-10 17:43] [ALPM-SCRIPTLET]   -> Running build hook: [udev]
[2014-03-10 17:43] [ALPM-SCRIPTLET]   -> Running build hook: [autodetect]
[2014-03-10 17:43] [ALPM-SCRIPTLET]   -> Running build hook: [modconf]
[2014-03-10 17:43] [ALPM-SCRIPTLET]   -> Running build hook: [block]
[2014-03-10 17:43] [ALPM-SCRIPTLET]   -> Running build hook: [filesystems]
[2014-03-10 17:43] [ALPM-SCRIPTLET]   -> Running build hook: [keyboard]
[2014-03-10 17:43] [ALPM-SCRIPTLET]   -> Running build hook: [fsck]
[2014-03-10 17:43] [ALPM-SCRIPTLET] ==> Generating module dependencies
[2014-03-10 17:43] [ALPM-SCRIPTLET] ==> Creating gzip initcpio image: /boot/initramfs-linux.img
[2014-03-10 17:43] [ALPM-SCRIPTLET] ==> Image generation successful
[2014-03-10 17:43] [ALPM-SCRIPTLET] ==> Building image from preset: /etc/mkinitcpio.d/linux.preset: 'fallback'
[2014-03-10 17:43] [ALPM-SCRIPTLET]   -> -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux-fallback.img -S autodetect
[2014-03-10 17:43] [ALPM-SCRIPTLET] ==> Starting build: 3.13.6-1-ARCH
[2014-03-10 17:43] [ALPM-SCRIPTLET]   -> Running build hook: [base]
[2014-03-10 17:43] [ALPM-SCRIPTLET]   -> Running build hook: [udev]
[2014-03-10 17:43] [ALPM-SCRIPTLET]   -> Running build hook: [modconf]
[2014-03-10 17:43] [ALPM-SCRIPTLET]   -> Running build hook: [block]
[2014-03-10 17:43] [ALPM-SCRIPTLET] ==> WARNING: Possibly missing firmware for module: aic94xx
[2014-03-10 17:43] [ALPM-SCRIPTLET] ==> WARNING: Possibly missing firmware for module: smsmdtv
[2014-03-10 17:43] [ALPM-SCRIPTLET]   -> Running build hook: [filesystems]
[2014-03-10 17:43] [ALPM-SCRIPTLET]   -> Running build hook: [keyboard]
[2014-03-10 17:43] [ALPM-SCRIPTLET]   -> Running build hook: [fsck]
[2014-03-10 17:43] [ALPM-SCRIPTLET] ==> Generating module dependencies
[2014-03-10 17:43] [ALPM-SCRIPTLET] ==> Creating gzip initcpio image: /boot/initramfs-linux-fallback.img
[2014-03-10 17:43] [ALPM-SCRIPTLET] ==> Image generation successful
[2014-03-10 17:43] [PACMAN] upgraded linux (3.13.5-1 -> 3.13.6-1)
[2014-03-10 17:43] [PACMAN] upgraded man-pages (3.60-1 -> 3.61-1)
[2014-03-10 17:43] [PACMAN] upgraded mjpegtools (2.0.0-4 -> 2.1.0-1)
[2014-03-10 17:43] [PACMAN] upgraded mpd (0.18.8-1 -> 0.18.9-1)
[2014-03-10 17:43] [PACMAN] upgraded nouveau-dri (10.0.3-1 -> 10.1.0-2)
[2014-03-10 17:43] [PACMAN] upgraded ntfs-3g (2013.1.13-4 -> 2014.2.15-1)
[2014-03-10 17:43] [PACMAN] upgraded orbit2 (2.14.19-2 -> 2.14.19-3)
[2014-03-10 17:43] [PACMAN] upgraded parted (3.1-3 -> 3.1-4)
[2014-03-10 17:43] [PACMAN] upgraded ppp (2.4.6-1 -> 2.4.6-2)
[2014-03-10 17:43] [PACMAN] upgraded python2-setuptools (2.2-1 -> 3.1-1)
[2014-03-10 17:43] [PACMAN] upgraded raptor (2.0.12-1 -> 2.0.13-1)
[2014-03-10 17:43] [PACMAN] upgraded rasqal (1:0.9.30-4 -> 1:0.9.32-1)
[2014-03-10 17:43] [PACMAN] upgraded s-nail (14.6.1-1 -> 14.6.2-1)
[2014-03-10 17:43] [PACMAN] upgraded systemd-sysvcompat (208-11 -> 210-3)
[2014-03-10 17:43] [PACMAN] upgraded virtuoso-base (1:6.1.7-2 -> 1:6.1.8-1)
[2014-03-10 17:43] [PACMAN] upgraded webkitgtk (2.2.5-1 -> 2.2.5-2)
[2014-03-10 17:43] [PACMAN] upgraded xterm (301-1 -> 303-1)

Offline

#8 2014-03-10 20:20:34

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [solved]Update problem: invalid magic number

That looks OK. What about your bootloader config?


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#9 2014-03-10 20:38:41

Isildur
Member
Registered: 2009-05-26
Posts: 96

Re: [solved]Update problem: invalid magic number

For some reason there is a /boot/grub/grub.conf but here is the relevant /boot/grub/grub.cfg

 cat grub.cfg
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
insmod part_gpt
insmod part_msdos
if [ -s $prefix/grubenv ]; then
  load_env
fi
set default="0"

if [ x"${feature_menuentry_id}" = xy ]; then
  menuentry_id_option="--id"
else
  menuentry_id_option=""
fi

export menuentry_id_option

if [ "${prev_saved_entry}" ]; then
  set saved_entry="${prev_saved_entry}"
  save_env saved_entry
  set prev_saved_entry=
  save_env prev_saved_entry
  set boot_once=true
fi

function savedefault {
  if [ -z "${boot_once}" ]; then
    saved_entry="${chosen}"
    save_env saved_entry
  fi
}

function load_video {
  if [ x$feature_all_video_module = xy ]; then
    insmod all_video
  else
    insmod efi_gop
    insmod efi_uga
    insmod ieee1275_fb
    insmod vbe
    insmod vga
    insmod video_bochs
    insmod video_cirrus
  fi
}

if [ x$feature_default_font_path = xy ] ; then
   font=unicode
else
insmod part_gpt
insmod ext2
set root='hd1,gpt1'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-bios=hd1,gpt1 --hint-efi=hd1,gpt1 --hint-baremetal=ahci1,gpt1  64d62c5c-1812-4278-90f5-cb22a36fa762
else
  search --no-floppy --fs-uuid --set=root 64d62c5c-1812-4278-90f5-cb22a36fa762
fi
    font="/usr/share/grub/unicode.pf2"
fi

if loadfont $font ; then
  set gfxmode=auto
  load_video
  insmod gfxterm
  set locale_dir=$prefix/locale
  set lang=en_US
  insmod gettext
fi
terminal_input console
terminal_output gfxterm
set timeout=5
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Arch Linux, with Linux core repo kernel' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-core repo kernel-true-64d62c5c-1812-4278-90f5-cb22a36fa762' {
	load_video
	set gfxpayload=keep
	insmod gzio
	insmod part_gpt
	insmod ext2
	set root='hd1,gpt1'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-bios=hd1,gpt1 --hint-efi=hd1,gpt1 --hint-baremetal=ahci1,gpt1  64d62c5c-1812-4278-90f5-cb22a36fa762
	else
	  search --no-floppy --fs-uuid --set=root 64d62c5c-1812-4278-90f5-cb22a36fa762
	fi
	echo	'Loading Linux core repo kernel ...'
	linux	/boot/vmlinuz-linux root=UUID=64d62c5c-1812-4278-90f5-cb22a36fa762 ro  add_efi_memmap i915.i915_enable_rc6=1 pcie_aspm=force drm.vblankoffdelay=1 i915.semaphores=1
	echo	'Loading initial ramdisk ...'
	initrd	/boot/initramfs-linux.img
}
menuentry 'Arch Linux, with Linux core repo kernel (Fallback initramfs)' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-core repo kernel-fallback-64d62c5c-1812-4278-90f5-cb22a36fa762' {
	load_video
	set gfxpayload=keep
	insmod gzio
	insmod part_gpt
	insmod ext2
	set root='hd1,gpt1'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-bios=hd1,gpt1 --hint-efi=hd1,gpt1 --hint-baremetal=ahci1,gpt1  64d62c5c-1812-4278-90f5-cb22a36fa762
	else
	  search --no-floppy --fs-uuid --set=root 64d62c5c-1812-4278-90f5-cb22a36fa762
	fi
	echo	'Loading Linux core repo kernel ...'
	linux	/boot/vmlinuz-linux root=UUID=64d62c5c-1812-4278-90f5-cb22a36fa762 ro  add_efi_memmap i915.i915_enable_rc6=1 pcie_aspm=force drm.vblankoffdelay=1 i915.semaphores=1
	echo	'Loading initial ramdisk ...'
	initrd	/boot/initramfs-linux-fallback.img
}

### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/20_memtest86+ ###
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
menuentry "Windows 7" {
	insmod part_gpt
	insmod fat
	insmod search_fs_uuid
	insmod chain
	search --fs-uuid --set=root --hint-bios=hd0,gpt1 --hint-efi=hd0,gpt1 --hint-baremetal=ahci0,gpt1 960A-1522
	chainloader /efi/Microsoft/Boot/bootmgfw.efi
}
### END /etc/grub.d/40_custom ###

### BEGIN /etc/grub.d/41_custom ###
if [ -f  ${config_directory}/custom.cfg ]; then
  source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###

ps: Is it safe to run pacman -Syu via chroot to check if maybe something wasn't completed or whatever?


edit: I chrooted from a live stick and afterwards rebooted the Laptop and it booted right through to the system without any error. Apparently that solved the problem, though I didn't execute any writing commands as chroot.

Last edited by Isildur (2014-03-10 21:37:30)

Offline

Board footer

Powered by FluxBB