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

Bill Kenworthy billk at iinet.net.au
Thu Nov 24 11:35:46 AWST 2016


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


More information about the plug mailing list