mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Richard B. Johnson" <root@chaos.analogic.com>
To: "Randy.Dunlap" <rddunlap@osdl.org>
Cc: Nicholas Berry <nikberry@med.umich.edu>,
	Linux kernel <linux-kernel@vger.kernel.org>
Subject: Re: change kernel name
Date: Thu, 5 Feb 2004 14:33:20 -0500 (EST)	[thread overview]
Message-ID: <Pine.LNX.4.53.0402051429590.7301@chaos> (raw)
In-Reply-To: <20040205083949.7738937d.rddunlap@osdl.org>

[-- 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 --]

  reply	other threads:[~2004-02-05 19:31 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-02-05 12:04 Nicholas Berry
2004-02-05 16:39 ` Randy.Dunlap
2004-02-05 19:33   ` Richard B. Johnson [this message]
2004-02-17 13:16 ` Richard B. Johnson
  -- strict thread matches above, loose matches on Subject: below --
2004-02-17 17:29 Nicholas Berry
2004-02-17 17:39 ` Valdis.Kletnieks
2004-02-03 23:40 Gaspar Bakos
2004-02-04 10:06 ` Tomas Szepe
2004-02-04 12:38 ` Richard B. Johnson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.53.0402051429590.7301@chaos \
    --to=root@chaos.analogic.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nikberry@med.umich.edu \
    --cc=rddunlap@osdl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®