Is there a way to find out if the kernel was bootet from my ssd or from an usb stick (if both kernels are identical) ?
Background: I have a signed monolithic stub kernel which will be loaded via secure boot. Because I wanted to test something dangerous with my running kernel, I did a copy of my kernel to a stick before. I did all regular (fat32, mark as esp, ...) except one typo: The name of the kernel was "bootx46.efi" on the stick and not as needed "bootx64.efi" ... so, my UEFI didnt find anything to boot on this stick ... and booted my regular kernel from ssd (as next in boot list). My rescue stick was completly useless ...
Lucky me, nothing happened AND I did a little change to the built-in boot parameter before (and compiled) and after some hours I recognised there was the "old" command line in dmesg (from the ssd kernel), telling me I bootet from ssd and not from the stick (yes, UEFI was so fast I did not noticed it).
I did a diff between both message-logs and find nothing to determine from where I bootet. Maybe somewhere in /sys or /proc ?
Thanks in advance,
Peter

