grub 40_custom.save newline error

0

Estou usando o 16.04 e tenho o win7 instalado. Sempre que eu tento instalar algo terminal me mostra monte de erros

Generating grub configuration file ...
Found linux image: /boot/vmlinuz-4.13.0-39-generic
Found initrd image: /boot/initrd.img-4.13.0-39-generic
Found linux image: /boot/vmlinuz-4.13.0-38-generic
Found initrd image: /boot/initrd.img-4.13.0-38-generic
Found linux image: /boot/vmlinuz-4.13.0-36-generic
Found initrd image: /boot/initrd.img-4.13.0-36-generic
Found linux image: /boot/vmlinuz-4.4.0-122-generic
Found initrd image: /boot/initrd.img-4.4.0-122-generic
Found memtest86+ image: /boot/memtest86+.elf
Found memtest86+ image: /boot/memtest86+.bin
Found Windows 7 (loader) on /dev/sda1
/etc/grub.d/40_custom.save: 2: /etc/grub.d/40_custom.save: Syntax error: newline unexpected
run-parts: /etc/kernel/postinst.d/zz-update-grub exited with return code 2
Failed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/linux-image-4.13.0-38-generic.postinst line 1052.
dpkg: error processing package linux-image-4.13.0-38-generic (--configure):
 subprocess installed post-installation script returned error exit status 2
No apport report written because MaxReports is reached already

dpkg: dependency problems prevent configuration of linux-image-extra-4.13.0-38-generic:
 linux-image-extra-4.13.0-38-generic depends on linux-image-4.13.0-38-generic; however:
  Package linux-image-4.13.0-38-generic is not configured yet.

dpkg: error processing package linux-image-extra-4.13.0-38-generic (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
Errors were encountered while processing:
 friendly-recovery
 linux-image-4.4.0-122-generic
 linux-image-extra-4.4.0-122-generic
 linux-image-generic
 linux-generic
 linux-image-4.13.0-39-generic
 linux-image-extra-4.13.0-39-generic
 linux-image-generic-hwe-16.04
 linux-generic-hwe-16.04
 linux-image-4.13.0-38-generic
 linux-image-extra-4.13.0-38-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)

e o arquivo 40_custom.save se parece com isso

>#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.

não há nova linha após a segunda linha. Eu também tentei excluir esses 3 comentários, mas eu recebo os mesmos erros.

alguém pode me ajudar, isso se tornou muito chato: (

    
por moonbyt3 05.05.2018 / 02:43

1 resposta

2

Parece que você tem uma cópia do 40_custom como 40_custom.save. E o grub-update executa qualquer arquivo em /etc/grub.d que começa com dois números & um sublinhado e tem o bit de execução ativado.

Portanto, desative o bit de execução de 40_custom.save ou exclua esse arquivo.

sudo chmod a-x /etc/grub.d/40_custom.save
    
por oldfred 05.05.2018 / 16:58