Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[OT] Kernel-Installations-Script
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) Diskussionsforum
View previous topic :: View next topic  
Author Message
LenDa
n00b
n00b


Joined: 13 Oct 2003
Posts: 42
Location: Haan

PostPosted: Fri Mar 18, 2005 12:09 pm    Post subject: [OT] Kernel-Installations-Script Reply with quote

Hi

habe mir vor einiger Zeit ein kleines Script geschrieben, welches den Kernel kompiliert und anschliessend den "Kernel" und die System.map mit Versionsnummer in das "/boot"-Verzeichnis kopiert.

Falls jemand interesse hat
Code:

#!/bin/bash

### Kernelversion aus Verzeichnis bestimmen
VERSION=`pwd -P | awk -F"linux-" '{print $2}'`;

if [ "$VERSION" = "" ];
then
   echo "Usage e.g. /usr/src/linux/$0 for generate and installing Kernel";
   exit;
else
   echo "Kernelversion: $VERSION";
fi

### Kernel und Module erstellen und installieren
if [ -e arch ]
then
   make bzImage modules modules_install;
else
   echo "Vielleicht kein Kernel-Quellen-Verzeichnis?"
   exit;
fi

### System.map kopieren
if [ -e System.map ];
then
   echo "Install System.map...";
   cp System.map /boot/System.map-$VERSION;
else
   echo "File not found: System.map";
   exit;
fi

### Kernel kopieren
if [ -e arch/i386/boot/bzImage ];
then
   echo "Install bzImage...";
   cp arch/i386/boot/bzImage /boot/kernel-$VERSION;
else
   echo "File not found: bzImage";
   exit;
fi

echo "Install complete!"


Einfach als Script im Pfad hinterlegen, Berechtigungen setzten, Kernel konfigurieren und Script starten.

MfG
David
Back to top
View user's profile Send private message
psyqil
Advocate
Advocate


Joined: 26 May 2003
Posts: 2767

PostPosted: Fri Mar 18, 2005 12:16 pm    Post subject: Reply with quote

Geht auch kürzer: :P
Code:
cd /usr/src/linux
make install
Back to top
View user's profile Send private message
LenDa
n00b
n00b


Joined: 13 Oct 2003
Posts: 42
Location: Haan

PostPosted: Fri Mar 18, 2005 12:23 pm    Post subject: Reply with quote

Hi

werden beim "make install" auch Versionsinformationen abgespeichert?
Bei meinem Script wird der Kernel "vmlinuz" aus den gentoo-dev-sources-2.6.10-r4 nach /boot/kernel-2.6.10-gentoo-r4 kopiert...
Ältere Versionen werden dabei nicht überschrieben.

MfG
David
Back to top
View user's profile Send private message
boris64
Veteran
Veteran


Joined: 04 Oct 2003
Posts: 1770
Location: Vechelde/Peine

PostPosted: Fri Mar 18, 2005 12:32 pm    Post subject: Reply with quote

ja(!) :P
zusätzlich wird auch noch der vmlinuz-link
auf den neuen kernel aktualisiert.

ps. ich frage mich bisheute, warum es noch leute gibt,
die bei einem 2.6er kernel das bzimage manuell kopieren ^^
_________________
boris64.net 200x / visit my desktop / try these tiny kernel patches ;)
Back to top
View user's profile Send private message
platinumviper
l33t
l33t


Joined: 12 Feb 2004
Posts: 648
Location: Munich, Germany

PostPosted: Fri Mar 18, 2005 12:36 pm    Post subject: Reply with quote

LenDa wrote:
werden beim "make install" auch Versionsinformationen abgespeichert?

Ja, und Du wirst gefragt, ob lilo ausgeführt werden soll (oder grub, oder Bootdisk erzeugen). Eine Bootdisk kannst Du natürlich auch manuell erzeugen mit mkrescue bzw mkrescue -iso.

platinumviper
_________________
No money back garantee. In case of problems, don't call us, we call you.
Back to top
View user's profile Send private message
LenDa
n00b
n00b


Joined: 13 Oct 2003
Posts: 42
Location: Haan

PostPosted: Fri Mar 18, 2005 12:38 pm    Post subject: Reply with quote

So ein Pech...

da hab ich mir gedacht, ich schreib ein schönes, kleines Script...
und dann gibts das ganze schon fix und fertig dabei...

:lol:
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) Diskussionsforum All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum