public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* change kernel name
@ 2004-02-03 23:40 Gaspar Bakos
  2004-02-04 10:06 ` Tomas Szepe
  2004-02-04 12:38 ` Richard B. Johnson
  0 siblings, 2 replies; 9+ messages in thread
From: Gaspar Bakos @ 2004-02-03 23:40 UTC (permalink / raw)
  To: linux-kernel

Hello,

I have the following question:
If I compile the kernel (2.4.*) and boot it in, then the kernel-release,
as shown by 'uname -r' will be the string that was in the EXTRAVERSION
string from the kernel Makefile.
Is there any way to change this 'identity' of the kernel after the
compilation?
Such as
changekernelname bzImage "newname"

For example I have bzImage.test1, which I copy to bzImage.test2 (and not
complete recompile the kernel with new EXTRAVERSION string), and when
test1 boots in I would like uname to say 2.4.23-test1, and when test2
boots in to say 2.4.23-test2. And in addition to this, of course I copy
/lib/modules/2.4.23-test1 to /lib/modules/2.4.23-test2.

Cheers
Gaspar

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: change kernel name
  2004-02-03 23:40 change kernel name Gaspar Bakos
@ 2004-02-04 10:06 ` Tomas Szepe
  2004-02-04 12:38 ` Richard B. Johnson
  1 sibling, 0 replies; 9+ messages in thread
From: Tomas Szepe @ 2004-02-04 10:06 UTC (permalink / raw)
  To: Gaspar Bakos; +Cc: linux-kernel

On Feb-03 2004, Tue, 18:40 -0500
Gaspar Bakos <gbakos@cfa.harvard.edu> wrote:

> Is there any way to change this 'identity' of the kernel after the
> compilation?
> Such as
> changekernelname bzImage "newname"

No.

-- 
Tomas Szepe <szepe@pinerecords.com>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: change kernel name
  2004-02-03 23:40 change kernel name Gaspar Bakos
  2004-02-04 10:06 ` Tomas Szepe
@ 2004-02-04 12:38 ` Richard B. Johnson
  1 sibling, 0 replies; 9+ messages in thread
From: Richard B. Johnson @ 2004-02-04 12:38 UTC (permalink / raw)
  To: Gaspar Bakos; +Cc: linux-kernel

On Tue, 3 Feb 2004, Gaspar Bakos wrote:

> Hello,
>
> I have the following question:
> If I compile the kernel (2.4.*) and boot it in, then the kernel-release,
> as shown by 'uname -r' will be the string that was in the EXTRAVERSION
> string from the kernel Makefile.
> Is there any way to change this 'identity' of the kernel after the
> compilation?
> Such as
> changekernelname bzImage "newname"

Put anything you want in the structure, system_utsname, in your copy of
linux-nn-nn/init/version.c.

Cheers,
Dick Johnson
Penguin : Linux version 2.4.24 on an i686 machine (797.90 BogoMips).
            Note 96.31% of all statistics are fiction.



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: change kernel name
@ 2004-02-05 12:04 Nicholas Berry
  2004-02-05 16:39 ` Randy.Dunlap
  2004-02-17 13:16 ` Richard B. Johnson
  0 siblings, 2 replies; 9+ messages in thread
From: Nicholas Berry @ 2004-02-05 12:04 UTC (permalink / raw)
  To: root; +Cc: linux-kernel

Note the words 'after the compilation'.

Nik


>>> "Richard B. Johnson" <root@chaos.analogic.com> 02/04/04 07:38AM
>>>
On Tue, 3 Feb 2004, Gaspar Bakos wrote:

> Hello,
>
> I have the following question:
> If I compile the kernel (2.4.*) and boot it in, then the
kernel-release,
> as shown by 'uname -r' will be the string that was in the
EXTRAVERSION
> string from the kernel Makefile.
> Is there any way to change this 'identity' of the kernel after the
> compilation?
> Such as
> changekernelname bzImage "newname"

Put anything you want in the structure, system_utsname, in your copy
of
linux-nn-nn/init/version.c.

Cheers,
Dick Johnson
Penguin : Linux version 2.4.24 on an i686 machine (797.90 BogoMips).
            Note 96.31% of all statistics are fiction.


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel"
in
the body of a message to majordomo@vger.kernel.org 
More majordomo info at  http://vger.kernel.org/majordomo-info.html 
Please read the FAQ at  http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: change kernel name
  2004-02-05 12:04 Nicholas Berry
@ 2004-02-05 16:39 ` Randy.Dunlap
  2004-02-05 19:33   ` Richard B. Johnson
  2004-02-17 13:16 ` Richard B. Johnson
  1 sibling, 1 reply; 9+ messages in thread
From: Randy.Dunlap @ 2004-02-05 16:39 UTC (permalink / raw)
  To: Nicholas Berry; +Cc: root, linux-kernel

On Thu, 05 Feb 2004 07:04:26 -0500 "Nicholas Berry" <nikberry@med.umich.edu> wrote:

| Note the words 'after the compilation'.

I think that the other person who answered 'no' was close enough.

BTW, did you say what processor architecture and what kernel
image file format?  If it's a zipped kernel image, changing text
in it is a bit tougher, I guess.  If it's not zipped, almost
anything could change that string (just not make it larger).

--
~Randy

| >>> "Richard B. Johnson" <root@chaos.analogic.com> 02/04/04 07:38AM
| >>>
| On Tue, 3 Feb 2004, Gaspar Bakos wrote:
| 
| > Hello,
| >
| > I have the following question:
| > If I compile the kernel (2.4.*) and boot it in, then the
| kernel-release,
| > as shown by 'uname -r' will be the string that was in the
| EXTRAVERSION
| > string from the kernel Makefile.
| > Is there any way to change this 'identity' of the kernel after the
| > compilation?
| > Such as
| > changekernelname bzImage "newname"
| 
| Put anything you want in the structure, system_utsname, in your copy
| of
| linux-nn-nn/init/version.c.
| 
| Cheers,
| Dick Johnson
| Penguin : Linux version 2.4.24 on an i686 machine (797.90 BogoMips).
|             Note 96.31% of all statistics are fiction.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: change kernel name
  2004-02-05 16:39 ` Randy.Dunlap
@ 2004-02-05 19:33   ` Richard B. Johnson
  0 siblings, 0 replies; 9+ messages in thread
From: Richard B. Johnson @ 2004-02-05 19:33 UTC (permalink / raw)
  To: Randy.Dunlap; +Cc: Nicholas Berry, Linux kernel

[-- Attachment #1: Type: TEXT/PLAIN, Size: 2888 bytes --]


Hello all,

It turns out that you can easily change the kernel name, version,
etc., even on a running kernel.

Everything you need is already exported.
A very easy module and test program is attached.

Script started on Thu Feb  5 14:24:20 2004
# ./tester
Usage:
./tester <Item> <string>
Items are SYSNAME, NODENAME, RELEASE, VERSION, MACHINE, DOMAIN
# ./tester SYSNAME foo
Can't open device file, UNAME
Maybe `insmod` the driver?
# insmod unamedrvr.o
# ./tester sysname foo
# uname -a
foo chaos 2.4.24 #1 SMP Wed Feb 4 11:50:33 EST 2004 i686
# ./tester sysname Linux
You have new mail in /var/spool/mail/root
# uname -a
Linux chaos 2.4.24 #1 SMP Wed Feb 4 11:50:33 EST 2004 i686
# ./tester nodename bar
# uname -a
Linux bar 2.4.24 #1 SMP Wed Feb 4 11:50:33 EST 2004 i686
# ./tester node chaos
# uname -a
Linux chaos 2.4.24 #1 SMP Wed Feb 4 11:50:33 EST 2004 i686
# ./tester releas 1.1
You have new mail in /var/spool/mail/root
# uname -a
Linux chaos 1.1 #1 SMP Wed Feb 4 11:50:33 EST 2004 i686
# ./tester r 2.4.24
# uname -a
Linux chaos 2.4.24 #1 SMP Wed Feb 4 11:50:33 EST 2004 i686
# exit
exit
Script done on Thu Feb  5 14:27:04 2004

Have fun!


On Thu, 5 Feb 2004, Randy.Dunlap wrote:

> On Thu, 05 Feb 2004 07:04:26 -0500 "Nicholas Berry" <nikberry@med.umich.edu> wrote:
>
> | Note the words 'after the compilation'.
>
> I think that the other person who answered 'no' was close enough.
>
> BTW, did you say what processor architecture and what kernel
> image file format?  If it's a zipped kernel image, changing text
> in it is a bit tougher, I guess.  If it's not zipped, almost
> anything could change that string (just not make it larger).
>
> --
> ~Randy
>
> | >>> "Richard B. Johnson" <root@chaos.analogic.com> 02/04/04 07:38AM
> | >>>
> | On Tue, 3 Feb 2004, Gaspar Bakos wrote:
> |
> | > Hello,
> | >
> | > I have the following question:
> | > If I compile the kernel (2.4.*) and boot it in, then the
> | kernel-release,
> | > as shown by 'uname -r' will be the string that was in the
> | EXTRAVERSION
> | > string from the kernel Makefile.
> | > Is there any way to change this 'identity' of the kernel after the
> | > compilation?
> | > Such as
> | > changekernelname bzImage "newname"
> |
> | Put anything you want in the structure, system_utsname, in your copy
> | of
> | linux-nn-nn/init/version.c.
> |
> | Cheers,
> | Dick Johnson
> | Penguin : Linux version 2.4.24 on an i686 machine (797.90 BogoMips).
> |             Note 96.31% of all statistics are fiction.
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
>

Cheers,
Dick Johnson
Penguin : Linux version 2.4.24 on an i686 machine (797.90 BogoMips).
            Note 96.31% of all statistics are fiction.


[-- Attachment #2: Type: APPLICATION/octet-stream, Size: 2025 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: change kernel name
  2004-02-05 12:04 Nicholas Berry
  2004-02-05 16:39 ` Randy.Dunlap
@ 2004-02-17 13:16 ` Richard B. Johnson
  1 sibling, 0 replies; 9+ messages in thread
From: Richard B. Johnson @ 2004-02-17 13:16 UTC (permalink / raw)
  To: Nicholas Berry; +Cc: linux-kernel

[-- Attachment #1: Type: TEXT/PLAIN, Size: 398 bytes --]

On Thu, 5 Feb 2004, Nicholas Berry wrote:

> Note the words 'after the compilation'.
>
> Nik

I read the first nasty-gram weeks ago. The attached code
will allow the kernel name to be changed (and other
`uname` stuff) even when the kernel is running.

Cheers,
Dick Johnson
Penguin : Linux version 2.4.24 on an i686 machine (797.90 BogoMips).
            Note 96.31% of all statistics are fiction.


[-- Attachment #2: Type: APPLICATION/octet-stream, Size: 6039 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: change kernel name
@ 2004-02-17 17:29 Nicholas Berry
  2004-02-17 17:39 ` Valdis.Kletnieks
  0 siblings, 1 reply; 9+ messages in thread
From: Nicholas Berry @ 2004-02-17 17:29 UTC (permalink / raw)
  To: root, Nicholas Berry; +Cc: linux-kernel

>>> "Richard B. Johnson" <root@chaos.analogic.com> 02/17/04 8:16 AM >>>
On Thu, 5 Feb 2004, Nicholas Berry wrote:

>> Note the words 'after the compilation'.
>>
>> Nik

>I read the first nasty-gram weeks ago. The attached >code
>will allow the kernel name to be changed (and other
>`uname` stuff) even when the kernel is running.

>Cheers,
>Dick Johnson
>Penguin : Linux version 2.4.24 on an i686 machine (797.90 BogoMips).
>            Note 96.31% of all statistics are fiction.

Note the words 'On Thu, 5 Feb 2004, Nicholas Berry wrote'

So why are you replying to the same 'nast-gram' weeks later?

Nik



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: change kernel name
  2004-02-17 17:29 Nicholas Berry
@ 2004-02-17 17:39 ` Valdis.Kletnieks
  0 siblings, 0 replies; 9+ messages in thread
From: Valdis.Kletnieks @ 2004-02-17 17:39 UTC (permalink / raw)
  To: Nicholas Berry; +Cc: root, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 391 bytes --]

On Tue, 17 Feb 2004 12:29:30 EST, Nicholas Berry said:

> >I read the first nasty-gram weeks ago. The attached >code
> >will allow the kernel name to be changed (and other
> >`uname` stuff) even when the kernel is running.

> So why are you replying to the same 'nast-gram' weeks later?

Probably because it took him 2 weeks to get the attached tarball into shape
for public consumption? ;)

[-- Attachment #2: Type: application/pgp-signature, Size: 226 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2004-02-17 17:39 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-02-03 23:40 change kernel name Gaspar Bakos
2004-02-04 10:06 ` Tomas Szepe
2004-02-04 12:38 ` Richard B. Johnson
  -- strict thread matches above, loose matches on Subject: below --
2004-02-05 12:04 Nicholas Berry
2004-02-05 16:39 ` Randy.Dunlap
2004-02-05 19:33   ` Richard B. Johnson
2004-02-17 13:16 ` Richard B. Johnson
2004-02-17 17:29 Nicholas Berry
2004-02-17 17:39 ` Valdis.Kletnieks

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox