LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Kernel (https://www.linuxquestions.org/questions/linux-kernel-70/)
-   -   take out number after kernel version (https://www.linuxquestions.org/questions/linux-kernel-70/take-out-number-after-kernel-version-670337/)

pauledwards03 09-16-2008 03:52 PM

take out number after kernel version
 
This should be a quick quesiton. How do you take out the number after the kernel version displayed in uname? Mine looks like this:

Linux darkstar 2.6.26.5 #3 PREEMPT Tue Sep 16 16:42:36 EDT 2008 i686 Intel(R) Pentium(R) M processor 1.20GHz GenuineIntel GNU/Linux

Before it was #13... I did a bunch of recompiles fine-tuning everything. This kernel (2.6.26.5) I just got and it is indeed the third one I compiled (first time I forgot to enable WEP, second I removed PCMCIA, and third I did to try to get rid of the #2 that was present at the time). Is there something I need to do when compiling to get rid of the number? I tried a make clean but that did not affect it. Thanks

verndog 09-16-2008 06:38 PM

How did you compile it? What was the revision name you gave when you compiled it. I assume you mean the 'uname -r' output

pauledwards03 09-17-2008 08:31 AM

I extracted the source to /usr/src/linux-2.6.26.5/
then did the following

make xconfig
make bzImage
cp arch/i386/boot/bzImage /boot/
cp System.map /boot/
make modules
make modules_install
edit /etc/lilo.conf
lilo -v
reboot

uname -a has the number in it, uname -r does not have it. I did not give it a revision name as far as I know.

pauledwards03 09-18-2008 07:27 AM

bump.. anybody?

bathory 09-18-2008 08:47 AM

The number you mean, is stored in a file called .version and every time you recompile your kernel it's increased by 1.
If you want to remove it completely you should mess with the Makefile. Look for .version in Makefile to see how it's done.
You can always put a "0" in .version before recompiling, so every time your kernel will be version 1 ;)

Regards

pauledwards03 09-18-2008 09:30 AM

Thanks bathory. Sure enough .version has 3 in it. I will recompile later and see but I have confidence it will work. Thanks again.


All times are GMT -5. The time now is 09:43 PM.