Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Kernel in uso [RISOLTO]
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)
View previous topic :: View next topic  
Author Message
ænigma
Tux's lil' helper
Tux's lil' helper


Joined: 02 Mar 2019
Posts: 116
Location: Italy

PostPosted: Fri Mar 15, 2019 5:50 pm    Post subject: Kernel in uso [RISOLTO] Reply with quote

Ciao a tutti, ho un dubbio: alcuni giorni fa ho fatto l'aggiornamento del kernel dal 4.19.23 al 4.19.27, ma dando uname -a mi risulta ancora il 4.19.23. Come mai?
_________________
Davide


Descriverei Gentoo con una sola parola: GENIALE!


Last edited by ænigma on Sat Mar 16, 2019 11:12 am; edited 1 time in total
Back to top
View user's profile Send private message
xdarma
l33t
l33t


Joined: 08 Dec 2003
Posts: 719
Location: tra veneto e friuli (italy)

PostPosted: Fri Mar 15, 2019 6:00 pm    Post subject: Reply with quote

Potrebbe essere un problema di bootloader, prova a postare cosa ti restituisce il comando: ls -lh /boot
_________________
proud user of faKeDE-4.7.3 -> back to windowmaker -> moved to LXQt
Back to top
View user's profile Send private message
ænigma
Tux's lil' helper
Tux's lil' helper


Joined: 02 Mar 2019
Posts: 116
Location: Italy

PostPosted: Fri Mar 15, 2019 6:07 pm    Post subject: Reply with quote

Code:
davide@gentoo ~ $ su
Password:
gentoo /home/davide # ls -lh /boot
totale 17M
drwxr-xr-x 6 root root 1,0K 12 mar 11.08 grub
-rw-r--r-- 1 root root 7,6M 28 feb 11.27 initramfs-genkernel-x86_64-4.19.23-gentoo
-rw-r--r-- 1 root root 6,3M 28 feb 10.33 kernel-genkernel-x86_64-4.19.23-gentoo
drwx------ 2 root root  12K 28 feb 07.55 lost+found
-rw-r--r-- 1 root root 3,1M 28 feb 10.33 System.map-genkernel-x86_64-4.19.23-gentoo
gentoo /home/davide #

Ciao xdarma, ecco l'output.
_________________
Davide


Descriverei Gentoo con una sola parola: GENIALE!
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30888
Location: here

PostPosted: Fri Mar 15, 2019 6:15 pm    Post subject: Reply with quote

Non hai mai ricompilato il kernel nuovo, infatti in /boot hai solo il 4.19.23
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
ænigma
Tux's lil' helper
Tux's lil' helper


Joined: 02 Mar 2019
Posts: 116
Location: Italy

PostPosted: Fri Mar 15, 2019 6:16 pm    Post subject: Reply with quote

No, non l'ho ricompilato, come dovrei fare?
_________________
Davide


Descriverei Gentoo con una sola parola: GENIALE!
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30888
Location: here

PostPosted: Fri Mar 15, 2019 6:22 pm    Post subject: Reply with quote

aenigma wrote:
No, non l'ho ricompilato, come dovrei fare?

Per prima cosa selezioni il kernel desiderato con eselect kernel set <quello_che_desideri>
Visto che hai usato genkernel puoi dare il comando
Code:
# genkernel --kernel-config=/etc/kernels/kernel-config-x86_64-4.19.23-gentoo all

(genkernel ti salva sempre la configurazione del vecchio kernel nella directory /etc/kernels)
e poi ricrei il menu di grub con
Code:
# grub-mkconfig -o /boot/grub/grub.cfg

_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
ænigma
Tux's lil' helper
Tux's lil' helper


Joined: 02 Mar 2019
Posts: 116
Location: Italy

PostPosted: Fri Mar 15, 2019 8:36 pm    Post subject: Reply with quote

Fatto! Grazie gente, quante cose ho ancora da imparare!
Ora posso eliminare il vecchio kernel? Qual'è il modo migliore?
_________________
Davide


Descriverei Gentoo con una sola parola: GENIALE!
Back to top
View user's profile Send private message
ænigma
Tux's lil' helper
Tux's lil' helper


Joined: 02 Mar 2019
Posts: 116
Location: Italy

PostPosted: Sat Mar 16, 2019 9:14 am    Post subject: Reply with quote

Il vecchio kernel l'ho eliminato seguendo il manuale, ma le voci del bootloader come le elimino?
_________________
Davide


Descriverei Gentoo con una sola parola: GENIALE!
Back to top
View user's profile Send private message
xdarma
l33t
l33t


Joined: 08 Dec 2003
Posts: 719
Location: tra veneto e friuli (italy)

PostPosted: Sat Mar 16, 2019 10:23 am    Post subject: Reply with quote

Puoi sempre farlo a mano editando il file /boot/grub/grub.cfg ma è preferibile farlo come ti ha indicato fedeliallalinea:
Quote:

e poi ricrei il menu di grub con
Code:
# grub-mkconfig -o /boot/grub/grub.cfg


_________________
proud user of faKeDE-4.7.3 -> back to windowmaker -> moved to LXQt
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30888
Location: here

PostPosted: Sat Mar 16, 2019 10:44 am    Post subject: Reply with quote

aenigma wrote:
Il vecchio kernel l'ho eliminato seguendo il manuale

C'e' anche l'utility app-admin/eclean-kernel, ma devo essere sincero che elimino sempre a mano i file dei vecchi kernel una volta testato che il nuovo funzioni.

aenigma wrote:
ma le voci del bootloader come le elimino?

Come detto da xdarma
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
ænigma
Tux's lil' helper
Tux's lil' helper


Joined: 02 Mar 2019
Posts: 116
Location: Italy

PostPosted: Sat Mar 16, 2019 11:11 am    Post subject: Reply with quote

Ho eliminato manualmente tutto ciò che riguardava il vecchio kernel (4.19.23) con il comando rm /boot
Spero sia tutto a posto, ciao.
_________________
Davide


Descriverei Gentoo con una sola parola: GENIALE!
Back to top
View user's profile Send private message
sabayonino
Veteran
Veteran


Joined: 03 Jan 2012
Posts: 1012

PostPosted: Sat Mar 16, 2019 11:34 am    Post subject: Reply with quote

Errori grossolani :
1 - rm /boot , è una directory e non te la fa rimuovere
2 - se rmuovi /boot , al prossimo riavvio non ti parte più nulla perchè rimuovi anche /boot/grub (e comuqnue tutto il suo contenuto , kernel compresi)
3 - Ad ogni giornamento del kernel , va aggiornato il grub così da poterlo avere a disposizione all'avvio (se lo si vuole ...)
4 -la più recente versione di eclean-kernel è un salvagente
Code:
eclean-kernel -h
Usage: eclean-kernel [options]

Remove old kernel versions, keeping either N newest kernels (with -n) or only
those which are referenced by a bootloader (with -a).

Options:
  -h, --help            show this help message and exit
  -a, --all             Remove all kernels unless used by bootloader
  -A, --ask             Ask before removing each kernel
  -b BOOTLOADER, --bootloader=BOOTLOADER
                        Bootloader used (auto, lilo, grub2, grub, yaboot,
                        symlinks)
  -d, --destructive     Destructive mode: remove kernels even when referenced
                        by bootloader
  -D, --debug           Enable debugging output
  -l, --list-kernels    List kernel files and exit
  -M, --no-mount        Disable (re-)mounting /boot if necessary
  -n NUM, --num=NUM     Leave only newest NUM kernels (by mtime)
  -p, --pretend         Print the list of kernels to be removed and exit
  -x EXCLUDE, --exclude=EXCLUDE
                        Exclude kernel parts from being removed (comma-
                        separated, supported parts: vmlinuz, systemmap,
                        config, initramfs, modules, build)


Se usata consapevolmente , ti mantiene pulito il sistema rimuovendo
- I kernels vecchi in /boot
- Rimuove /lib/modules/<kernel> non più necessario
- Rimuove /usr/src/<kernel> se presente
- Aggiorna il grub in automatico

Un utilizzo basico potrebbe essere quello di mantenere almeno due kernel (l'ultimo ed uno di riserva,di norma la versione precedente installata) semplicemente eseguendo :
Code:
# eclean-kernel -n2


Poi , si può procedere alla rimozione dei kernel rimossi nel file world (se presenti) che tiene traccia delle installazioni
Code:
# emerge -C gentoo-sources:<versione>


Se hai rimosso /boot ... buon chroot e reinstallazione/ricompilazione kernel e grub.

PS : se stai facendo pratica , ti consiglio di effettuare costantemente un backup del sistema così da ripristinarlo facilmente e riprendere agevolmente la tua fase di apprendimento (ma vale sempre per tutte le situazioni) ...possibilmente salvarlo su un supporto separato.

Un buon tool che potrei raccomandarti , oltre al classico "tar" , prendi in considerazione anche "fsarchiver" il quale fa egregiamente il suo lavoro...
Code:
app-backup/fsarchiver
     Available versions:  0.8.4 (~)0.8.5 {debug lz4 lzma lzo static zstd}
     Installed versions:  0.8.4(19:34:41 08/06/2018)(lzma lzo zstd -debug -lz4 -static)
     Homepage:            http://www.fsarchiver.org
     Description:         Flexible filesystem archiver for backup and deployment tool


E anche qui hai qualcos'altro da studiare...
_________________
LRS i586 on G.Drive
LRS x86-64 EFI on MEGA
Back to top
View user's profile Send private message
ænigma
Tux's lil' helper
Tux's lil' helper


Joined: 02 Mar 2019
Posts: 116
Location: Italy

PostPosted: Sat Mar 16, 2019 12:25 pm    Post subject: Reply with quote

Scusa sabayonino se mi sono espresso male; volevo dire che ho eliminato in /boot tutto ciò che riguardava il kernel 4.19.23 (initramfs-genkernel, kernel-genkernel, System.map-genkernel).
La prossima volta prenderò in considerazione eclean-kernel.
_________________
Davide


Descriverei Gentoo con una sola parola: GENIALE!
Back to top
View user's profile Send private message
marziods
Tux's lil' helper
Tux's lil' helper


Joined: 25 Jun 2009
Posts: 136
Location: <Roma>par lavor | Udine | Friul | Italie

PostPosted: Tue Mar 26, 2019 6:35 am    Post subject: Reply with quote

mi intrufolo nella conversazione ...
a sto punto prova pure a compilare il kernel manualmente... ti divertirai a capire come mai alcune cose non funzionano
:P
_________________
linux user #493115
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian) 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