Imansible aggiornare il kernel dopo 4.16.3

Sono in esecuzione su Ubuntu 16.04 con il kernel 4.16.3, sia sul mio desktop che sul laptop, ogni volta che provo ad aggiornare ad un kernel più recente con UKUU fallisce la configurazione del pacchetto e restituisco questo errore (esempio installando 4.16.6) :

dpkg: error processing package linux-image-unsigned-4.16.6-041606-generic (--install): dependency problems - leaving unconfigured 

E l’unica soluzione è rimuoverlo, come posso risolverlo?

Kernels 4.14.xx , 4.16.xx e 4.17.rc(xx) condividono tutti lo stesso bug in quest’ultima settimana; 24-30 aprile 2018.

Ho appena provato il 4.14.38 stasera e presenta gli stessi errori di 4.14.36 e 4.14.37 come documentato in questo bug report .

Nel mio caso stasera gli errori sono:

 $ sudo dpkg -i *.deb Selecting previously unselected package linux-headers-4.14.38-041438. (Reading database ... 641792 files and directories currently installed.) Preparing to unpack linux-headers-4.14.38-041438_4.14.38-041438.201804300419_all.deb ... Unpacking linux-headers-4.14.38-041438 (4.14.38-041438.201804300419) ... Selecting previously unselected package linux-headers-4.14.38-041438-generic. Preparing to unpack linux-headers-4.14.38-041438-generic_4.14.38-041438.201804300419_amd64.deb ... Unpacking linux-headers-4.14.38-041438-generic (4.14.38-041438.201804300419) ... Selecting previously unselected package linux-image-unsigned-4.14.38-041438-generic. Preparing to unpack linux-image-unsigned-4.14.38-041438-generic_4.14.38-041438.201804300419_amd64.deb ... Unpacking linux-image-unsigned-4.14.38-041438-generic (4.14.38-041438.201804300419) ... Selecting previously unselected package linux-modules-4.14.38-041438-generic. Preparing to unpack linux-modules-4.14.38-041438-generic_4.14.38-041438.201804300419_amd64.deb ... Unpacking linux-modules-4.14.38-041438-generic (4.14.38-041438.201804300419) ... Setting up linux-headers-4.14.38-041438 (4.14.38-041438.201804300419) ... dpkg: dependency problems prevent configuration of linux-headers-4.14.38-041438-generic: linux-headers-4.14.38-041438-generic depends on libssl1.1 (>= 1.1.0); however: Package libssl1.1 is not installed. dpkg: error processing package linux-headers-4.14.38-041438-generic (--install): dependency problems - leaving unconfigured Setting up linux-modules-4.14.38-041438-generic (4.14.38-041438.201804300419) ... Setting up linux-image-unsigned-4.14.38-041438-generic (4.14.38-041438.201804300419) ... /var/lib/dpkg/info/linux-image-unsigned-4.14.38-041438-generic.postinst: 50: /var/lib/dpkg/info/linux-image-unsigned-4.14.38-041438-generic.postinst: linux-update-symlinks: not found dpkg: error processing package linux-image-unsigned-4.14.38-041438-generic (--install): subprocess installed post-installation script returned error exit status 127 Errors were encountered while processing: linux-headers-4.14.38-041438-generic linux-image-unsigned-4.14.38-041438-generic 

Per correggere gli errori ho provato sudo apt install -f ma non lo aggiusterà e causerà un “crash report”:

Kernel 4.14.38 crash.png

Usando sudo rm-kernels ho rimosso 4.14.38 il più ansible:

rimuovere il kernel 4.14.38

Questa volta sono state rimosse solo le intestazioni:

 The following packages will be REMOVED: linux-headers-4.14.38-041438* 0 upgraded, 0 newly installed, 1 to remove and 2 not upgraded. 1 not fully installed or removed. After this operation, 74.6 MB disk space will be freed. Do you want to continue? [Y/n] y (Reading database ... 665813 files and directories currently installed.) Removing linux-headers-4.14.38-041438 (4.14.38-041438.201804300419) ... Setting up linux-image-unsigned-4.14.38-041438-generic (4.14.38-041438.201804300419) ... /var/lib/dpkg/info/linux-image-unsigned-4.14.38-041438-generic.postinst: 50: /var/lib/dpkg/info/linux-image-unsigned-4.14.38-041438-generic.postinst: linux-update-symlinks: not found dpkg: error processing package linux-image-unsigned-4.14.38-041438-generic (--configure): subprocess installed post-installation script returned error exit status 127 Errors were encountered while processing: linux-image-unsigned-4.14.38-041438-generic E: Sub-process /usr/bin/dpkg returned an error code (1) 

Ora vediamo cosa rimane:

 $ apt list | grep 4.14.36 WARNING: apt does not have a stable CLI interface. Use with caution in scripts. linux-image-unsigned-4.14.36-041436-generic/now 4.14.36-041436.201804240906 amd64 [residual-config] 

Proviamo a rimuoverlo:

 $ sudo apt remove linux-modules-4.14.38-041438-generic Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required: bbswitch-dkms dkms gdm libjansson4 libxnvctrl0 linux-gcp-tools-4.10.0-1008 linux-gcp-tools-4.10.0-1009 linux-headers-4.4.0-103 linux-headers-4.4.0-103-generic linux-image-4.4.0-103-generic linux-image-extra-4.4.0-103-generic linux-tools-4.10.0-1008-gcp linux-tools-4.10.0-1009-gcp nvidia-prime nvidia-settings python-compizconfig python-pyudev screen-resolution-extra Use 'sudo apt autoremove' to remove them. The following packages will be REMOVED: linux-image-unsigned-4.14.38-041438-generic linux-modules-4.14.38-041438-generic 0 upgraded, 0 newly installed, 2 to remove and 2 not upgraded. After this operation, 296 MB disk space will be freed. Do you want to continue? [Y/n] y (Reading database ... 641771 files and directories currently installed.) Removing linux-image-unsigned-4.14.38-041438-generic (4.14.38-041438.201804300419) ... /var/lib/dpkg/info/linux-image-unsigned-4.14.38-041438-generic.prerm: 11: /var/lib/dpkg/info/linux-image-unsigned-4.14.38-041438-generic.prerm: linux-check-removal: not found dpkg: error processing package linux-image-unsigned-4.14.38-041438-generic (--remove): subprocess installed pre-removal script returned error exit status 127 dpkg: linux-modules-4.14.38-041438-generic: dependency problems, but removing anyway as you requested: linux-image-unsigned-4.14.38-041438-generic depends on linux-modules-4.14.38-041438-generic. Removing linux-modules-4.14.38-041438-generic (4.14.38-041438.201804300419) ... Errors were encountered while processing: linux-image-unsigned-4.14.38-041438-generic E: Sub-process /usr/bin/dpkg returned an error code (1) 

Modifica il file /var/lib/dpkg/info/linux-image-unsigned-4.14.38-041438-generic.prerm :

 #!/bin/sh set -e version=4.14.38-041438-generic image_path=/boot/vmlinuz-$version (... SNIP ...) 

Appena sotto la prima riga #!/bin/sh inserisci una nuova riga:

 exit 0 

Salva il file e riesegui il comando non riuscito:

 $ sudo apt remove linux-image-unsigned-4.14.38-041438-generic Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required: bbswitch-dkms dkms gdm libjansson4 libxnvctrl0 linux-gcp-tools-4.10.0-1008 linux-gcp-tools-4.10.0-1009 linux-headers-4.4.0-103 linux-headers-4.4.0-103-generic linux-image-4.4.0-103-generic linux-image-extra-4.4.0-103-generic linux-tools-4.10.0-1008-gcp linux-tools-4.10.0-1009-gcp nvidia-prime nvidia-settings python-compizconfig python-pyudev screen-resolution-extra Use 'sudo apt autoremove' to remove them. The following packages will be REMOVED: linux-image-unsigned-4.14.38-041438-generic 0 upgraded, 0 newly installed, 1 to remove and 2 not upgraded. After this operation, 8,663 kB disk space will be freed. Do you want to continue? [Y/n] y (Reading database ... 635588 files and directories currently installed.) Removing linux-image-unsigned-4.14.38-041438-generic (4.14.38-041438.201804300419) ... /var/lib/dpkg/info/linux-image-unsigned-4.14.38-041438-generic.postrm ... removing pending trigger /etc/kernel/postrm.d/initramfs-tools: update-initramfs: Deleting /boot/initrd.img-4.14.38-041438-generic /etc/kernel/postrm.d/zz-update-grub: Generating grub configuration file ... Found background: /home/rick/Pictures/1600x900/19.jpg Found background image: /home/rick/Pictures/1600x900/19.jpg Found linux image: /boot/vmlinuz-4.14.34-041434-generic Found initrd image: /boot/initrd.img-4.14.34-041434-generic Found linux image: /boot/vmlinuz-4.14.31-041431-generic Found initrd image: /boot/initrd.img-4.14.31-041431-generic Found linux image: /boot/vmlinuz-4.14.30-041430-generic Found initrd image: /boot/initrd.img-4.14.30-041430-generic Found linux image: /boot/vmlinuz-4.14.27-041427-generic Found initrd image: /boot/initrd.img-4.14.27-041427-generic Found linux image: /boot/vmlinuz-4.14.15-041415-generic Found initrd image: /boot/initrd.img-4.14.15-041415-generic Found linux image: /boot/vmlinuz-4.14.10-041410-generic Found initrd image: /boot/initrd.img-4.14.10-041410-generic Found linux image: /boot/vmlinuz-4.14.4-041404-generic Found initrd image: /boot/initrd.img-4.14.4-041404-generic Found linux image: /boot/vmlinuz-4.14.2-041402-generic Found initrd image: /boot/initrd.img-4.14.2-041402-generic Found linux image: /boot/vmlinuz-4.13.9-041309-generic Found initrd image: /boot/initrd.img-4.13.9-041309-generic Found linux image: /boot/vmlinuz-4.10.0-42-generic Found initrd image: /boot/initrd.img-4.10.0-42-generic Found linux image: /boot/vmlinuz-4.9.77-040977-generic Found initrd image: /boot/initrd.img-4.9.77-040977-generic Found linux image: /boot/vmlinuz-4.4.0-104-generic Found initrd image: /boot/initrd.img-4.4.0-104-generic Found linux image: /boot/vmlinuz-4.4.0-103-generic Found initrd image: /boot/initrd.img-4.4.0-103-generic Found linux image: /boot/vmlinuz-3.16.53-031653-generic Found initrd image: /boot/initrd.img-3.16.53-031653-generic Found Windows Boot Manager on /dev/[email protected]/EFI/Microsoft/Boot/bootmgfw.efi Found Ubuntu 18.04 LTS (18.04) on /dev/nvme0n1p8 Found Windows Boot Manager on /dev/[email protected]/efi/Microsoft/Boot/bootmgfw.efi Adding boot menu entry for EFI firmware configuration done 

Doppio controllo tutto è ok:

 $ sudo apt install -f Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required: bbswitch-dkms dkms gdm libjansson4 libxnvctrl0 linux-gcp-tools-4.10.0-1008 linux-gcp-tools-4.10.0-1009 linux-headers-4.4.0-103 linux-headers-4.4.0-103-generic linux-image-4.4.0-103-generic linux-image-extra-4.4.0-103-generic linux-tools-4.10.0-1008-gcp linux-tools-4.10.0-1009-gcp nvidia-prime nvidia-settings python-compizconfig python-pyudev screen-resolution-extra Use 'sudo apt autoremove' to remove them. 0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded. 

L’utilizzo di ukuu per installare i kernel passati v4.16.3 ha richiesto questi passaggi

  1. installa libssl1.1 da https://packages.ubuntu.com/bionic/amd64/libssl1.1/download
  2. installare i deboli linux-modules corrispondenti per il kernel

Ad esempio per il kernel 4.16.7 afferrare il deb del modulo linux da

Puoi trovare il tuo kernel su -> http://kernel.ubuntu.com/~kernel-ppa/mainline/

Il kernel fornito con Ubuntu 18.04 ha problemi di luminosità per il mio computer (Lenovo IdeaPad S400). Questo è stato risolto aggiornando la versione del kernel.

Stavo cercando in precedenza di aggiornare il kernel alla versione 4.16.6 usando il software UKUU e non ha funzionato. Poi ho seguito le istruzioni in (usando il terminale): come aggiornare il kernel all’ultima versione mainline senza alcun aggiornamento di Distro?

Per il mio computer ho scaricato i seguenti pacchetti (in http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.16.6/ ):

  1. linux-headers-4.16.6-041606_4.16.6-041606.201804300418_all.deb
  2. linux-headers-4.16.6-041606-generic_4.16.6-041606.201804300418_amd64.deb
  3. linux-image-unsigned-4.16.6-041606-generic_4.16.6-041606.201804300418_amd64.deb
  4. linux-modules-4.16.6-041606-generic_4.16.6-041606.201804300418_amd64.deb

Quindi, seguendo le istruzioni del link sopra, ho scritto:

 cd /path/to/folder/where/you/put/the/debs sudo dpkg -i *.deb 

Ha funzionato perfettamente.

Il problema che ho riscontrato con l’ultima serie di kernel Linux (ovvero quelli successivi a K4.16.3>) è che i file “linux-image.deb” NON sono firmati. È la mancanza di file binari firmati che sta causando tutti i problemi, cioè l’installazione non riesce, il sistema si limita a borks in ogni tentativo.

L’unica soluzione IMO è quella di trattenere e attendere pazientemente la prossima versione del kernel più importante, ad esempio K.4.17 o anche K5.0 nella speranza che i file linux-imge.deb richiesti includano la firma delle chiavi necessaria e quindi installino senza alcuna difficoltà .

Cyteck

Sto usando linux mint 18.3 basato su xenial e sono riuscito ad installare il kernel mainline 4.17 .. Basta installare UKTool seguendo questi passaggi e il programma farà il lavoro per voi .. in bocca al lupo. !!
https://www.2daygeek.com/uktools-easy-way-to-install-latest-stable-linux-kernel-on-ubuntu-mint-and-derivatives/