Por que não posso mais (des) instalar pacotes via apt-get depois de fazer uma dist-upgrade parcial?

1

Eu (estupidamente) executei sudo apt-get dist-upgrade , o que foi parcialmente bem-sucedido, mas agora recebo uma saída semelhante a isso toda vez que tento (un) instalar um pacote:

Aqui, por exemplo, é a saída de sudo apt-get autoremove --purge postgres* :

Removing linux-image-extra-3.13.0-43-generic (3.13.0-43.72) ...
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 3.13.0-43-generic /boot/vmlinuz-3.13.0-43-generic
run-parts: executing /etc/kernel/postinst.d/dkms 3.13.0-43-generic /boot/vmlinuz-3.13.0-43-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.13.0-43-generic /boot/vmlinuz-3.13.0-43-generic
update-initramfs: Generating /boot/initrd.img-3.13.0-43-generic
W: mdadm: the array /dev/md/monolith:0 with UUID 826ef9b8:1c282186:82586683:e0b960b3
W: mdadm: is currently active, but it is not listed in mdadm.conf. if
W: mdadm: it is needed for boot, then YOUR SYSTEM IS NOW UNBOOTABLE!
W: mdadm: please inspect the output of /usr/share/mdadm/mkconf, compare
W: mdadm: it to /etc/mdadm/mdadm.conf, and make the necessary changes.
run-parts: executing /etc/kernel/postinst.d/pm-utils 3.13.0-43-generic /boot/vmlinuz-3.13.0-43-generic
run-parts: executing /etc/kernel/postinst.d/update-notifier 3.13.0-43-generic /boot/vmlinuz-3.13.0-43-generic
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 3.13.0-43-generic /boot/vmlinuz-3.13.0-43-generic
/usr/sbin/grub-mkconfig: 38: /etc/default/grub: function: not found
run-parts: /etc/kernel/postinst.d/zz-update-grub exited with return code 127
dpkg: error processing package linux-image-extra-3.13.0-43-generic (--remove):
 subprocess installed post-removal script returned error exit status 1
Errors were encountered while processing:
 linux-image-extra-3.13.0-43-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)

Aqui está a saída de /usr/share/mdadm/mkconf :

# mdadm.conf
#
# Please refer to mdadm.conf(5) for information about this file.
#

# by default (built-in), scan all partitions (/proc/partitions) and all
# containers for MD superblocks. alternatively, specify devices to scan, using
# wildcards if desired.
#DEVICE partitions containers

# auto-create devices with Debian standard permissions
CREATE owner=root group=disk mode=0660 auto=yes

# automatically tag new arrays as belonging to the local system
HOMEHOST <system>

# instruct the monitoring daemon where to send mail alerts
MAILADDR root

# definitions of existing MD arrays

E aqui está a saída de /etc/mdadm/mdadm.conf :

# mdadm.conf
#
# Please refer to mdadm.conf(5) for information about this file.
#

# by default (built-in), scan all partitions (/proc/partitions) and all
# containers for MD superblocks. alternatively, specify devices to scan, using
# wildcards if desired.
#DEVICE partitions containers

# auto-create devices with Debian standard permissions
CREATE owner=root group=disk mode=0660 auto=yes

# automatically tag new arrays as belonging to the local system
HOMEHOST <system>

# instruct the monitoring daemon where to send mail alerts
MAILADDR root

# definitions of existing MD arrays
ARRAY /dev/md/0 metadata=1.2 UUID=c13ebb40:55db4a69:108822c5:5ee02f0b name=htpc:0

# This file was auto-generated on Thu, 11 Jun 2015 00:15:47 +0200
# by mkconf $Id$

Qual é o meu próximo passo?

Editar: Deve-se notar que não tenho problemas para reiniciar, já que não estou inicializando o RAID.

    
por blz 16.06.2015 / 21:20

1 resposta

1

Rodando

cp /usr/share/grub/default/grub /etc/default/grub
update-grub
sudo apt-get -f install

parece ter resolvido o problema. Eu ainda não sei exatamente por que as coisas ficaram malucas em primeiro lugar, mas espero que isso possa salvar a bunda de outra pessoa ...

    
por blz 16.06.2015 / 23:38