1 votes

La mise à jour d'Ubuntu échoue quelque chose à propos du noyau ?

J'utilise un serveur ubuntu version 10.04 LTS. J'ai fait un "sudo apt-get upgrade" sur mon serveur aujourd'hui et il a échoué avec ce qui suit :

Setting up linux-image-2.6.32-318-ec2 (2.6.32-318.38) ...
Running depmod.
update-initramfs: Generating /boot/initrd.img-2.6.32-318-ec2
Could not find postinst hook script [update-grub].
Looked in: '/bin', '/sbin', '/usr/bin', '/usr/sbin'
dpkg: error processing linux-image-2.6.32-318-ec2 (--configure):
 subprocess installed post-installation script returned error exit status 2
Setting up linux-image-2.6.32-319-ec2 (2.6.32-319.39) ...
Running depmod.
update-initramfs: Generating /boot/initrd.img-2.6.32-319-ec2
Could not find postinst hook script [update-grub].
Looked in: '/bin', '/sbin', '/usr/bin', '/usr/sbin'
dpkg: error processing linux-image-2.6.32-319-ec2 (--configure):
 subprocess installed post-installation script returned error exit status 2
Setting up linux-image-2.6.32-34-server (2.6.32-34.77) ...
Running depmod.
update-initramfs: Generating /boot/initrd.img-2.6.32-34-server
Could not find postinst hook script [update-grub].
Looked in: '/bin', '/sbin', '/usr/bin', '/usr/sbin'
dpkg: error processing linux-image-2.6.32-34-server (--configure):
 subprocess installed post-installation script returned error exit status 2
dpkg: dependency problems prevent configuration of linux-image-ec2:
 linux-image-ec2 depends on linux-image-2.6.32-319-ec2; however:
  Package linux-image-2.6.32-319-ec2 is not configured yet.
dpkg: error processing linux-image-ec2 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-ec2:
 linux-ec2 depends on linux-image-ec2 (= 2.6.32.319.20); however:
  Package linux-image-ec2 is not configured yet.
dpkg: error processing linux-ec2 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-image-server:
 linux-image-server depends on linux-image-2.6.32-34-server; however:
  Package linux-image-2.6.32-34-server is not configured yet.
dpkg: error processing linux-image-server (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              No apport report written because MaxReports is reached already
                                                                                                                            No apport report written because MaxReports is reached already
                                                                                                                                                                                          No apport report written because MaxReports is reached already
dpkg: dependency problems prevent configuration of linux-server:
 linux-server depends on linux-image-server (= 2.6.32.34.40); however:
  Package linux-image-server is not configured yet.
dpkg: error processing linux-server (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 linux-image-2.6.32-318-ec2
 linux-image-2.6.32-319-ec2
 linux-image-2.6.32-34-server
 linux-image-ec2
 linux-ec2
 linux-image-server
 linux-server
E: Sub-process /usr/bin/dpkg returned an error code (1)

Une idée de la façon de réparer cela ?

0voto

Andrew Schulman Points 8341

La principale erreur est la suivante :

update-initramfs: Generating /boot/initrd.img-2.6.32-318-ec2
Could not find postinst hook script [update-grub].
Looked in: '/bin', '/sbin', '/usr/bin', '/usr/sbin'

Toutes les autres erreurs découlent de celle-là.

Il semble que dpkg veut exécuter update-Grub, mais il n'est pas disponible sur votre hôte. Sur mon hôte, j'ai

$ which update-grub
/usr/sbin/update-grub
$ dpkg --search /usr/sbin/update-grub
grub-pc: /usr/sbin/update-grub
$ apt-cache policy grub-pc
grub-pc:
  Installed: 1.98+20100804-5ubuntu3.3
  Candidate: 1.98+20100804-5ubuntu3.3
  Version table:
 *** 1.98+20100804-5ubuntu3.3 0
        500 http://us.archive.ubuntu.com/ubuntu/ maverick-updates/main amd64 Packages
        100 /var/lib/dpkg/status
     1.98+20100804-5ubuntu3 0
        500 http://us.archive.ubuntu.com/ubuntu/ maverick/main amd64 Packages

En fonction de votre matériel, il se peut que vous ayez installé un autre des paquets Grub-* :

$ apt-file -x search '/usr/sbin/update-grub$'
grub: /usr/sbin/update-grub
grub-coreboot: /usr/sbin/update-grub
grub-efi-amd64: /usr/sbin/update-grub
grub-efi-ia32: /usr/sbin/update-grub
grub-ieee1275: /usr/sbin/update-grub
grub-pc: /usr/sbin/update-grub

Vous avez très certainement installé l'un des paquets ci-dessus. Utilisez dpkg --search /usr/sbin/update-grub pour savoir lequel c'est, puis apt-get --reinstall install pour le réinstaller.

SistemesEz.com

SystemesEZ est une communauté de sysadmins où vous pouvez résoudre vos problèmes et vos doutes. Vous pouvez consulter les questions des autres sysadmins, poser vos propres questions ou résoudre celles des autres.

Powered by:

X