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

Euan de Kock euan at dekock.net
Thu Nov 24 12:04:36 AWST 2016


Would ldd give any useful library links that use the kernel version number
- not in front of a machine to check, so I'm just guessing...

Euan

On 24 Nov. 2016 11:56 am, "BillK" <billk at iinet.net.au> 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> 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
>>> http://lists.plug.org.au/mailman/listinfo/plug
>>> Committee e-mail: 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.plug.org.au/pipermail/plug/attachments/20161124/30f174e8/attachment.html>


More information about the plug mailing list