Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
CK7: installare un nuovo kernel senza toglire il vecchio
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian) Risorse italiane (documentazione e tools)
View previous topic :: View next topic  
Author Message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30888
Location: here

PostPosted: Sun Oct 17, 2004 12:31 pm    Post subject: CK7: installare un nuovo kernel senza toglire il vecchio Reply with quote

Navigazione: [ back CK6: Compilare il kernel monolitico o con i moduli? ] [ next CK8: Come installare versioni multiple di kernel una accanto all'altra senza causare problemi? ] [ Compilazione Kernel ] [ Indice ]


Come posso installare un nuovo kernel mentre tengo ancora il vecchio in modo da poterlo utilizzare se necessario?


Questi scripts automatizzano l'aggiornamento e l'archiviazione dei kernel.
Dovete essere root per fare questi passi.

Prima assicurarsi che la partizione di boot sia montata. Date il comando
Code:
bash# grep boot /etc/fstab

e annotatevi il device /dev/hd?? dove la /boot e' montata da inserire nei seguenti script
Code:
bash# nano /usr/sbin/kernel-save

e incollate il codice seguente:
Code:
#!/bin/sh

# Substitute the ?? here with what came up in the grep /etc/fstab above
BOOT='/dev/hd??'
WHEN=`date +%y%m%d`
WHAT="$1"

mount $BOOT /boot

cp -v /boot/System.map "/boot/System.map-$WHEN-$WHAT"
cp -v /boot/bzImage "/boot/bzImage-$WHEN-$WHAT"
cp -v /boot/config "/boot/config-$WHEN-$WHAT"

Code:
bash# nano /usr/sbin/kernel-install

e incollate il codice seguente:
Code:
#!/bin/sh

# Substitute the ?? here with what came up in the grep /etc/fstab above
BOOT='/dev/hd??'

mount $BOOT /boot

cp -v /usr/src/linux/System.map /boot
cp -v /usr/src/linux/arch/i386/boot/bzImage /boot
cp -v /usr/src/linux/.config /boot/config

Per finire cambiate i permessi affinche' solo root possa eseguire
Code:
bash# chmod 700 /usr/sbin/kernel-save
bash# chmod 700 /usr/sbin/kernel-install

Dopo aver compilato il kernel, per salvare una copua del vostro vecchio kernel e installare il nuovo date
Code:
bash# kernel-save riferimenti-al-vecchi-kernel
bash# kernel-install

Se ricevete un messaggio che dice che la /boot e' gia' montata ignoratelo pure.

Sostituite 'riferimenti-al-vecchi-kernel' con informazioni reali
Code:
# kernel-save pre-alsa-09
# kernel-save vanilla-2.4.19
# kernel-save original-stable


La parte di System.map ad alcuni puo' anche non servire. Se siete sicuri che non vi serva commetate pure la parte relativa dello script.



Autore: phypor (testo originale)
Traduttore: fedeliallalinea
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian) Risorse italiane (documentazione e tools) 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