1

I have recently inherited a Linux (Gentoo, 3.14 kernel) server. The server is physically located in another country, 3 hours of flight away.

The server is set up to use EFI to boot. Its hard drive is partitioned into sda1 (EFI partition) sda2 ('recovery' partition) and sda3 ('normal' partition). The there are two booting options: a 'recovery' kernel (boot option 0000) which mounts sda2 as its root filesystem and a 'normal' kernel (boot option 0001) which uses sda3 as root.

EFI is configured so that after a hard reboot, the server always boots into the 'recovery' image, which we never mess with. From within there one can issue

efibootmgr --bootnext 0001  
reboot

in order to reboot into the 'normal' kernel using sda3. I like this idea as this gives us considerable safety to mess with the 'normal' system.

Now, we have to install a new kernel (we need some additional hardware support). I have compiled the kernel with - to the best of my knowledge - correct options and installed it in the EFI partition. I was following

https://wiki.gentoo.org/wiki/EFI_stub_kernel

I have added the new kernel to EFI using

efibootmgr --create --part 1 --label "GentooNEW" --loader '\efi\boot\vmlinuxNEW.efi'

This added a new '0002' boot option to EFI - as expected. Then I tried to reboot into this kernel with

efibootmgr --bootnext 0002
reboot

but after the reboot I saw it has booted into option 0000 'recovery' instead, which - AFAIK - (I have little EFI experience) means that my newly compiled kernel failed to boot and EFI tried the default option instead.

The question: is it possible to remotely debug what's wrong with my new kernel? Does EFI save some logs somewhere? Without that, I am not sure how to proceed as there can be a myriad things wrong there...

Leszek
  • 361
  • 2
  • 4
  • 12

0 Answers0