Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I know that it is possible to get the kernel version from a running system using "uname" command.
I have a kernel image file in linux/arch/arm/boot/uImage.
Is it possible to get similar information from this image file? and how?
@macemoneta: Thank you for the response. I tried this command, but it does not work as I expected.
$uImage: u-boot/PPCBoot image
What I expect is something like below:
$ uname -a
$ Linux 18.104.22.168-ptx-trunk #1 PREEMPT Wed Mar 16 14:40:18 CET 2011 armv5tejl GNU/Linux
This info is available in the image file, but I don't know how to extract it.
You need to update the '/etc/magic' or '/usr/share/misc/magic' (whichever exists on your system) with the displacements for the information. See man 5 magic. Once that's updated, the file command will be able to pull the information automatically.
Update: Google says you need:
# u-boot/PPCBoot image file
# From: Mark Brown <firstname.lastname@example.org>
0 belong 0x27051956 u-boot/PPCBoot image
>4 string PPCBoot
>>12 string x version %s
Last edited by macemoneta; 03-25-2011 at 08:55 AM.
If the kernel image is compressed, you might be able to de-compress it first (but, as I recall, this is not as straightforward as you might expect). Otherwise, the strings command will find any strings of human-readable text in files of any description. It should be too hard to isolate the one that you're looking for.