STRUCT KHO_KEXEC_METADATA(9)

๐Ÿ“ฆ version 7.3.1, in nixpkgs unstable

๐Ÿฆ‹ struct kho_kexec_metadata(9) โ€” from the Kernel API Manual, bestie ๐Ÿ’…

okay so picture this: a little struct that literally survives a whole kernel reboot. it's giving main character energy and honestly? iconic. this is the struct kho_kexec_metadata page, and yes we're gonna get into all of it โœจ


๐ŸŒธ NAME ๐ŸŒธ

struct kho_kexec_metadata โ€” the kexec metadata that gets passed between kernels, no cap ๐Ÿซถ


โญ SYNOPSIS โญ

struct kho_kexec_metadata {
    u32 version;
    char previous_release[__NEW_UTS_LEN + 1];
    u32 kexec_count;
 };

๐ŸŽ€ Members ๐ŸŽ€

  • version โ€” the ABI version of this struct, and heads up bestie, it must be the first field. like, non-negotiable, it has to go first ๐Ÿ’€
  • previous_release โ€” the kernel version string of whichever kernel initiated the kexec ๐ŸŒˆ
  • kexec_count โ€” how many kexec boots have happened since the last cold boot, fr fr ๐Ÿ”ฅ

๐Ÿ’– Description ๐Ÿ’–

so this structure is preserved across kexec, which is the whole point โ€” it lets the new kernel figure out two things: which kernel it was booted from, and how many kexec reboots have gone down already ๐Ÿ‘‘

and about __NEW_UTS_LEN โ€” it's part of uABI, so using it in here is safe. slay ๐Ÿงš


๐Ÿ”ฎ SEE ALSO ๐Ÿ”ฎ

  • Kernel file ./include/linux/kho/abi/kexec_metadata.h
  • Kexec Metadata ABI(9)

k that's the whole vibe, ily, go read the source at ./include/linux/kho/abi ๐Ÿ’œโœจ โ€” this cutie was dated October 2026, and it's struct kho_kexec_metadata(9), periodt ๐ŸŽ€

๐Ÿ“ฆ where this page comes from