#155 Issue closed: matching kernel in /boot/efi/efi/debian error on ubuntu 12.04.1 LTS

Labels: support / question

tuergeist opened issue at 2012-09-05 17:21:

Got following error when trying to run R&R as in the documentation. http://relax-and-recover.org/documentation/

$ uname -a
Linux sputnik 3.2.0-24-generic #37-Ubuntu SMP Wed Apr 25 08:43:22 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

$ tail -n 20 /home/cb/src.git/rear/var/log/rear/rear-sputnik.log
2012-09-05 19:17:15 Including build/default/98_verify_rootfs.sh
2012-09-05 19:17:15 Including build/default/99_update_os_conf.sh
2012-09-05 19:17:15 Finished running 'build' stage in 15 seconds
2012-09-05 19:17:15 Running 'pack' stage
2012-09-05 19:17:15 Including pack/Linux-i386/30_copy_kernel.sh
2012-09-05 19:17:15 ERROR: Could not find a matching kernel in /boot/efi/efi/debian !
=== Stack trace ===
Trace 0: usr/sbin/rear:245 main
Trace 1: /home/cb/src.git/rear/usr/share/rear/lib/mkrescue-workflow.sh:39 WORKFLOW_mkrescue
Trace 2: /home/cb/src.git/rear/usr/share/rear/lib/framework-functions.sh:79 SourceStage
Trace 3: /home/cb/src.git/rear/usr/share/rear/lib/framework-functions.sh:40 Source
Trace 4: /home/cb/src.git/rear/usr/share/rear/pack/Linux-i386/30_copy_kernel.sh:43 source
Trace 5: /home/cb/src.git/rear/usr/share/rear/lib/_input-output-functions.sh:131 StopIfError
Message: Could not find a matching kernel in /boot/efi/efi/debian !
===================
2012-09-05 19:17:15 Running exit tasks.
2012-09-05 19:17:15 Finished in 17 seconds
2012-09-05 19:17:15 Removing build area /tmp/rear.qabT1AMR8TGjaKI
rmdir: removing directory, `/tmp/rear.qabT1AMR8TGjaKI'
2012-09-05 19:17:15 End of program reached

thumm commented at 2012-09-12 07:49:

Normally rear should find the kernel on Ubuntu without any special configuration. Could check if the file
/boot/vmlinuz-$(uname -r)
is available.

Is it possible that your /boot dir is on a separate partition which is not mounted while running rear?

dagwieers commented at 2012-09-12 10:22:

A few other options:

  • you run your own custom kernel that is using a different naming-convention ?
  • you updated your kernel (a few times) and the currently running kernel is no longer available on the system ?

I wonder if there's a better way to find the currently running kernel without having to reside to a standard (or distribution-specific) naming convention. Something from /sys/kernel/ or /proc/ ?

schlomo commented at 2012-09-12 10:24:

How should the kernel know from where it came? That information is private to the boot loader. So we should find out how to ask the boot loader.

I think in ReaR we should actively support distro-specific ways to install a kernel. If the user does something custom then the user should also tell ReaR where to find the kernel image.

dagwieers commented at 2012-09-12 10:28:

Just as the bootloader informs the kernel of the command line arguments, the bootloader could inform the kernel of its own location. I know there is probably little use for this (contrary to the command line, which is the purpose), but in our case there is some value. Even when the location (boot-device + filename) may not be available or even resolvable.

dagwieers commented at 2012-09-12 10:30:

Compare this to binaries that get invoked, a binary does know its own name (e.g. $0 or argv[0] or $ARGV[0] or sys.argv[0]). It's not inconceivable to have a similar mechanism.

schlomo commented at 2012-09-12 10:32:

Sure. But how do you get popular boot loaders to hand this information to the kernel?

dagwieers commented at 2012-09-12 10:36:

Could be the same convention, first argument is a device/filename tupple (in whatever format is acceptable/agreed). Of course this requires a modification to the bootloader, however it should not require a modification to the kernel itself. Except of course if the kernel would do something with that information, somehow. Would be useful to us in this case.

We cannot really ask the bootloader because we don't know (and it surely doesn't either) what entry (if still available) is acceptable for the running kernel. We could try and grep for versions on kernel-option lines for each individual bootloader configuration file, but that's problematic. And even then we wouldn't be sure why we cannot find it on disk.

tuergeist commented at 2012-09-15 11:41:

@thumm Indeed, in /boot there isn't my current kernel. I discovered a problem with all the updates in my ubuntu - I think grub 2 killed me. I'll be back when my system does what it should ...

dagwieers commented at 2012-09-28 07:04:

I am going to close this issue as we know what caused it and we have no means of preventing it in 100% of the cases. Do feel free to reopen if there's new information.


[Export of Github issue for rear/rear.]