From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S266552AbUBETbS (ORCPT ); Thu, 5 Feb 2004 14:31:18 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S266808AbUBETbS (ORCPT ); Thu, 5 Feb 2004 14:31:18 -0500 Received: from chaos.analogic.com ([204.178.40.224]:6529 "EHLO chaos.analogic.com") by vger.kernel.org with ESMTP id S266552AbUBETat (ORCPT ); Thu, 5 Feb 2004 14:30:49 -0500 Date: Thu, 5 Feb 2004 14:33:20 -0500 (EST) From: "Richard B. Johnson" X-X-Sender: root@chaos Reply-To: root@chaos.analogic.com To: "Randy.Dunlap" cc: Nicholas Berry , Linux kernel Subject: Re: change kernel name In-Reply-To: <20040205083949.7738937d.rddunlap@osdl.org> Message-ID: References: <20040205083949.7738937d.rddunlap@osdl.org> MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="1678434306-838005544-1076009600=:7301" Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. Send mail to mime@docserver.cac.washington.edu for more info. --1678434306-838005544-1076009600=:7301 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 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" 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" 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. --1678434306-838005544-1076009600=:7301 Content-Type: APPLICATION/octet-stream; name="module.tar.gz" Content-Transfer-Encoding: BASE64 Content-ID: Content-Description: Content-Disposition: attachment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