Unix Programming - how to change osrelease?

This is Interesting: Free IT Magazines  
Home > Archive > Unix Programming > October 2005 > how to change osrelease?





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author how to change osrelease?
sandy

2005-10-25, 7:48 am

Hi all,
I am new to the world of unix programming.
Thank you all for having this group.
i need to change the osrelease on my machine.
How do i do that?
for
Eg: if it is kernel.osrelease="2.6.4" i need to change it to
kernel.osrelease='2.6mine"
i see sysctl as one option but the osrelease file in proc file system
has only read permission.
Is thr an other way i can change the the version ?

thank you in advance
sandy

Roger Leigh

2005-10-25, 7:48 am

"sandy" <tks.kumar@gmail.com> writes:

> Hi all,
> I am new to the world of unix programming.
> Thank you all for having this group.
> i need to change the osrelease on my machine.
> How do i do that?


Compile a later version of the kernel. Why do you need to change it
anyway?


--
Roger Leigh
Printing on GNU/Linux? http://gimp-print.sourceforge.net/
Debian GNU/Linux http://www.debian.org/
GPG Public Key: 0x25BFB848. Please sign and encrypt your mail.
Luotao Fu

2005-10-25, 7:48 am

sandy schrieb:
> Hi all,
> I am new to the world of unix programming.
> Thank you all for having this group.
> i need to change the osrelease on my machine.
> How do i do that?
> for
> Eg: if it is kernel.osrelease="2.6.4" i need to change it to
> kernel.osrelease='2.6mine"
> i see sysctl as one option but the osrelease file in proc file system
> has only read permission.

You'd modificate some version Variables in the Makefile in Kernelsource
(you will find the relevant variables at the beginning of the Makefile)
and recompile your Kernel. It's however absolutely not recommended to
change the version number, nor the patchlevel and sublevel number. It
might fail to compile. You can change the $EXTRAVERSION variable in the
Makefile to append your own versionflag to the kernel or use the
--append-to-version switch, if you compile with the make-kpkg programm
from Debian. The Kernel version than looks like i.E 2.6.13.4-with-patches..

oh I forgot, since Kernel version 2.6.12(maybe also earlier releases,
not quite sure.) you can even set your own Version flag directly within
kernel configuration.

Cheers
Luotao Fu
sandy

2005-10-28, 4:53 pm

Hi Luotao,
(Sorry for delay in response).
I got your point. But can you tell me how in older version
of kernel i.e 2.6.12 we can change the version name.?

sandy

Luotao Fu

2005-10-28, 4:53 pm

sandy schrieb:
> Hi Luotao,
> (Sorry for delay in response).
> I got your point. But can you tell me how in older version
> of kernel i.e 2.6.12 we can change the version name.?
>
> sandy
>


like I wrote in the last posting. change the variables in Makefile and
recompile.

f.E.
At the Beginning of the Makefile of a vaniall Kernel 2.6.13.4 you get

VERSION = 2
PATCHLEVEL = 6
SUBLEVEL = 13
EXTRAVERSION = .4

the compiled Kernel will be called 2.6.13.4

if you change the EXTRAVERSION variable to

EXTRAVERSION = -custom
Attetion: only '-', '.' or lowercase letters.

you'll get a kernel image with the name 2.6.13-custom. (the same routine
also for earlier kernels)
Again: You SHOULD NOT chang the version, patchlevel and sublevel variables!!

cheers
Luotao Fu
sandy

2005-10-28, 4:53 pm

ok, can we not do it at run time say
when i do
# uname -r
2.6.13-smp

and we do something, i don't know what but to manupilate it the version
name to get

#uname -r
2.6.13-mine

? i hope you got my point.

cheers
sandy

Ertugrul Soeylemez

2005-10-28, 4:53 pm

Luotao Fu

2005-10-28, 4:53 pm

sandy schrieb:
> ok, can we not do it at run time say
> when i do
> # uname -r
> 2.6.13-smp
>
> and we do something, i don't know what but to manupilate it the version
> name to get
>
> #uname -r
> 2.6.13-mine
>
> ? i hope you got my point.
>
> cheers
> sandy
>

again from the very beginning:
you CANNOT do it at runtime! uname.c f.E. includes utsname.h and the
kernel __uname() strips the versionnumber directly out of the running
Kernel. I'm doubting more and more why you want to do such thing.

Cheers
Luotao Fu
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com