[plug] What's the best way to get kernel version from a binary?

Jim Householder nofixed at westnet.com.au
Thu Nov 24 12:10:17 AWST 2016


Could you use the information from /proc/version on another system to 
locate the context in the binary?  If it is predictable for several 
binaries, use that to get the version?

On 24/11/16 11:56, BillK wrote:
> It's a binary, not a running kernel! And you can't boot it until you
> have built a matching initrd. Catch 22
>
> BillK
>
>
> On 24 November 2016 11:48:56 AM AWST, "Marcos Raúl Carot"
> <marcos.carot at gmail.com> wrote:
>
>     cat /proc/version
>
>
>     On Thu, 24 Nov 2016, 11:36 Bill Kenworthy <billk at iinet.net.au
>     <mailto:billk at iinet.net.au>> wrote:
>
>         What's the best way to get kernel version from a binary?
>
>         Context is that the raspberry pi stock firware doesn’t use version
>         numbers in the filename and I want to know what kernel version I am
>         building a custom initrd using dracut for a btrfs on root
>         filesystem.
>
>         Easy to get manually (strings|grep the file) but its clumsy and
>         hard to
>         get precision in a script and uname doesn’t work on a file :(
>
>         BillK
>         _______________________________________________
>         PLUG discussion list: plug at plug.org.au <mailto:plug at plug.org.au>
>         http://lists.plug.org.au/mailman/listinfo/plug
>         Committee e-mail: committee at plug.org.au
>         <mailto:committee at plug.org.au>
>         PLUG Membership: http://www.plug.org.au/membership
>
>     ------------------------------------------------------------------------
>
>     PLUG discussion list: plug at plug.org.au
>     http://lists.plug.org.au/mailman/listinfo/plug
>     Committee e-mail: committee at plug.org.au
>     PLUG Membership: http://www.plug.org.au/membership
>
>
> --
> Sent from my Android phone with K-9 Mail. Please excuse my brevity.
>
>
> _______________________________________________
> PLUG discussion list: plug at plug.org.au
> http://lists.plug.org.au/mailman/listinfo/plug
> Committee e-mail: committee at plug.org.au
> PLUG Membership: http://www.plug.org.au/membership
>



More information about the plug mailing list