grub-pc在Debian jessie上配置了一半

用户3371854

通过安装linux,新内核在上个月给了我一些无人值守升级的问题

# cat /var/log/unattended-upgrades/unattended-upgrades-dpkg.log
Log started: 2018-05-02  00:33:09
Lettura dei changelog...
/usr/bin/locale: 1: /usr/bin/locale: %!PS-Adobe-3.0: not found
/usr/bin/locale: 2: /usr/bin/locale: Syntax error: word unexpected 
(expecting ")")
Preconfigurazione dei pacchetti in corso
Selezionato il pacchetto linux-image-3.16.0-6-amd64 non precedentemente  
selezionato.
(Lettura del database... 207164 file e directory attualmente installati.)
Preparativi per estrarre .../linux-image-3.16.0-6-amd64_3.16.56- 
1_amd64.deb...
/usr/bin/locale: 1: /usr/bin/locale: %!PS-Adobe-3.0: not found
/usr/bin/locale: 2: /usr/bin/locale: Syntax error: word unexpected 
(expecting ")")
Estrazione di linux-image-3.16.0-6-amd64 (3.16.56-1)...
Preparativi per estrarre .../linux-image- 
amd64_3.16+63+deb8u2_amd64.deb...
Estrazione di linux-image-amd64 (3.16+63+deb8u2) su (3.16+63+deb8u1)...
Preparativi per estrarre .../linux-libc-dev_3.16.56-1_amd64.deb...
Estrazione di linux-libc-dev:amd64 (3.16.56-1) su (3.16.51-3+deb8u1)...
Configurazione di linux-image-3.16.0-6-amd64 (3.16.56-1)...
/usr/bin/locale: 1: /usr/bin/locale: %!PS-Adobe-3.0: not found
/usr/bin/locale: 2: /usr/bin/locale: Syntax error: word unexpected 
(expecting ")")
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-3.16.0-6-amd64
/etc/kernel/postinst.d/zz-update-grub:
/usr/bin/gettext: 1: /usr/bin/gettext: %!PS-Adobe-3.0: not found
/usr/bin/gettext: 2: /usr/bin/gettext: Syntax error: word unexpected 
(expecting ")")
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-3.16.0-6-amd64.postinst line 634.
dpkg: errore nell'elaborare il pacchetto linux-image-3.16.0-6-amd64 (-- 
configure):
il sottoprocesso installato script di post-installation ha restituito lo 
stato di errore 1
dpkg: problemi con le dipendenze impediscono la configurazione di linux- 
image-amd64:
linux-image-amd64 dipende da linux-image-3.16.0-6-amd64; comunque:
Il pacchetto linux-image-3.16.0-6-amd64 non è ancora configurato.

dpkg: errore nell'elaborare il pacchetto linux-image-amd64 (--configure):
problemi con le dipendenze - lasciato non configurato
Configurazione di linux-libc-dev:amd64 (3.16.56-1)...
Si sono verificati degli errori nell'elaborazione:
linux-image-3.16.0-6-amd64
linux-image-amd64
Error in function: 
Log ended: 2018-05-02  00:36:46

Log started: 2018-05-05  13:26:51
Lettura dei changelog...
/usr/bin/locale: 1: /usr/bin/locale: %!PS-Adobe-3.0: not found
/usr/bin/locale: 2: /usr/bin/locale: Syntax error: word unexpected 
(expecting ")")
(Lettura del database... 210939 file e directory attualmente installati.)
Preparativi per estrarre .../libmad0_0.15.1b-8+deb8u1_amd64.deb...
Estrazione di libmad0:amd64 (0.15.1b-8+deb8u1) su (0.15.1b-8)...
Configurazione di linux-image-3.16.0-6-amd64 (3.16.56-1)...
/usr/bin/locale: 1: /usr/bin/locale: %!PS-Adobe-3.0: not found
/usr/bin/locale: 2: /usr/bin/locale: Syntax error: word unexpected 
(expecting ")")
vmlinuz(/boot/vmlinuz-3.16.0-6-amd64
) points to /boot/vmlinuz-3.16.0-6-amd64
(/boot/vmlinuz-3.16.0-6-amd64) -- doing nothing at 
/var/lib/dpkg/info/linux-image-3.16.0-6-amd64.postinst line 263.
initrd.img(/boot/initrd.img-3.16.0-6-amd64
) points to /boot/initrd.img-3.16.0-6-amd64
(/boot/initrd.img-3.16.0-6-amd64) -- doing nothing at 
/var/lib/dpkg/info/linux-image-3.16.0-6-amd64.postinst line 263.
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-3.16.0-6-amd64
/etc/kernel/postinst.d/zz-update-grub:
/usr/bin/gettext: 1: /usr/bin/gettext: %!PS-Adobe-3.0: not found
/usr/bin/gettext: 2: /usr/bin/gettext: Syntax error: word unexpected 
(expecting ")")
 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-3.16.0-6-amd64.postinst line 634.
dpkg: errore nell'elaborare il pacchetto linux-image-3.16.0-6-amd64 (-- 
configure):
il sottoprocesso installato script di post-installation ha restituito lo 
stato di errore 1
dpkg: problemi con le dipendenze impediscono la configurazione di linux- 
image-amd64:
linux-image-amd64 dipende da linux-image-3.16.0-6-amd64; comunque:
Il pacchetto linux-image-3.16.0-6-amd64 non è ancora configurato.

dpkg: errore nell'elaborare il pacchetto linux-image-amd64 (--configure):
problemi con le dipendenze - lasciato non configurato
Configurazione di libmad0:amd64 (0.15.1b-8+deb8u1)...
Elaborazione dei trigger per libc-bin (2.19-18+deb8u10)...
Si sono verificati degli errori nell'elaborazione:
linux-image-3.16.0-6-amd64
linux-image-amd64
Error in function: 
Log ended: 2018-05-05  13:28:47

Log started: 2018-05-06  10:01:20
Lettura dei changelog...
/usr/bin/locale: 1: /usr/bin/locale: %!PS-Adobe-3.0: not found
/usr/bin/locale: 2: /usr/bin/locale: Syntax error: word unexpected 
(expecting ")")
Preconfigurazione dei pacchetti in corso
(Lettura del database... 210939 file e directory attualmente installati.)
Preparativi per estrarre .../tzdata_2018e-0+deb8u1_all.deb...
Estrazione di tzdata (2018e-0+deb8u1) su (2018d-0+deb8u1)...
Configurazione di tzdata (2018e-0+deb8u1)...
/usr/bin/locale: 1: /usr/bin/locale: %!PS-Adobe-3.0: not found
/usr/bin/locale: 2: /usr/bin/locale: Syntax error: word unexpected 
(expecting ")")

Current default time zone: 'Europe/Rome'
Local time is now:      Sun May  6 10:01:48 CEST 2018.
Universal Time is now:  Sun May  6 08:01:48 UTC 2018.
Run 'dpkg-reconfigure tzdata' if you wish to change it.

Configurazione di linux-image-3.16.0-6-amd64 (3.16.56-1)...
/usr/bin/locale: 1: /usr/bin/locale: %!PS-Adobe-3.0: not found
/usr/bin/locale: 2: /usr/bin/locale: Syntax error: word unexpected 
(expecting ")")
vmlinuz(/boot/vmlinuz-3.16.0-6-amd64
) points to /boot/vmlinuz-3.16.0-6-amd64
 (/boot/vmlinuz-3.16.0-6-amd64) -- doing nothing at 
/var/lib/dpkg/info/linux-image-3.16.0-6-amd64.postinst line 263.
initrd.img(/boot/initrd.img-3.16.0-6-amd64
) points to /boot/initrd.img-3.16.0-6-amd64
(/boot/initrd.img-3.16.0-6-amd64) -- doing nothing at 
/var/lib/dpkg/info/linux-image-3.16.0-6-amd64.postinst line 263.
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-3.16.0-6-amd64
/etc/kernel/postinst.d/zz-update-grub:
/usr/bin/gettext: 1: /usr/bin/gettext: %!PS-Adobe-3.0: not found
/usr/bin/gettext: 2: /usr/bin/gettext: Syntax error: word unexpected 
(expecting ")")
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-3.16.0-6-amd64.postinst line 634.
dpkg: errore nell'elaborare il pacchetto linux-image-3.16.0-6-amd64 (-- 
configure):
il sottoprocesso installato script di post-installation ha restituito lo 
stato di errore 1
dpkg: problemi con le dipendenze impediscono la configurazione di linux- 
image-amd64:
linux-image-amd64 dipende da linux-image-3.16.0-6-amd64; comunque:
Il pacchetto linux-image-3.16.0-6-amd64 non è ancora configurato.

dpkg: errore nell'elaborare il pacchetto linux-image-amd64 (--configure):
problemi con le dipendenze - lasciato non configurato
Si sono verificati degli errori nell'elaborazione:
linux-image-3.16.0-6-amd64
linux-image-amd64
Error in function: 
Log ended: 2018-05-06  10:04:18

之后,解决了我的问题,我尝试清除并重新安装grub2,然后按照步骤操作获得了该文件

# dpkg --configure -a 
Configurazione di grub-pc (2.02~beta2-22+deb8u1)...
/usr/bin/locale: 1: /usr/bin/locale: %!PS-Adobe-3.0: not found
/usr/bin/locale: 2: /usr/bin/locale: Syntax error: word unexpected 
(expecting ")")
/usr/bin/locale: 1: /usr/bin/locale: %!PS-Adobe-3.0: not found
/usr/bin/locale: 2: /usr/bin/locale: Syntax error: word unexpected 
(expecting ")")
Installing for i386-pc platform.
Installazione completata, nessun errore segnalato.
/usr/bin/gettext: 1: /usr/bin/gettext: %!PS-Adobe-3.0: not found
/usr/bin/gettext: 2: /usr/bin/gettext: Syntax error: word unexpected 
(expecting ")")
dpkg: errore nell'elaborare il pacchetto grub-pc (--configure):
il sottoprocesso installato script di post-installation ha restituito lo 
stato di errore 2
Si sono verificati degli errori nell'elaborazione:

我担心的是,如果冲突不是grub,则grub的重新安装不起作用,那么将无法启动。我也没有用chroot来解决,只有修复grub不起作用。我的dpkg状态文件在grub-pc上告诉我

Package: grub-pc
Status: install ok half-configured
Priority: optional
Section: admin
Installed-Size: 514
Maintainer: GRUB Maintainers <[email protected]>
Architecture: amd64
Multi-Arch: foreign
Source: grub2
Version: 2.02~beta2-22+deb8u1
Replaces: grub, grub-common (<= 1.97~beta2-1), grub-coreboot, grub-efi-$
Depends: debconf (>= 0.5) | debconf-2.0, grub-common (= 2.02~beta2-22+d$
Conflicts: grub (<< 0.97-54), grub-coreboot, grub-efi-amd64, grub-efi-i$
Conffiles:
/etc/kernel/postinst.d/zz-update-grub 269828d3b8e5bfb266c58fb0a00abcd5
/etc/kernel/postrm.d/zz-update-grub 269828d3b8e5bfb266c58fb0a00abcd5
...

其他信息:

# uname -r
3.16.0-6-amd64
# apt-cache policy grub-pc
grub-pc:
Installato: 2.02~beta2-22+deb8u1
Candidato:  2.02~beta2-22+deb8u1
Tabella versione:
*** 2.02~beta2-22+deb8u1 0
500 http://ftp.uk.debian.org/debian/ jessie/main amd64 Packages
500 http://security.debian.org/ jessie/updates/main amd64 Packages
100 /var/lib/dpkg/status
# ls -al /vmlinuz*
lrwxrwxrwx 1 root root 27 mag  2 00:35 /vmlinuz -> boot/vmlinuz-3.16.0-6- 
amd64
lrwxrwxrwx 1 root root 27 gen 26 13:30 /vmlinuz.old -> boot/vmlinuz- 
3.16.0-5-amd64
# ls -a /initrd.img*
/initrd.img  /initrd.img.old
# ls -al /boot
totale 62164
drwxr-xr-x  3 root root     4096 mag 11 11:35 .
drwxr-xr-x 22 root root     4096 mag 11 14:20 ..
-rw-r--r--  1 root root   157756 dic 14 22:27 config-3.16.0-4-amd64
-rw-r--r--  1 root root   157786 gen  9 12:42 config-3.16.0-5-amd64
-rw-r--r--  1 root root   157842 mag  8 19:36 config-3.16.0-6-amd64
drwxr-xr-x  5 root root     4096 mag 12 10:47 grub
-rw-r--r--  1 root root 15164265 mag  7 11:27 initrd.img-3.16.0-4-amd64
-rw-r--r--  1 root root 15164783 gen 26 13:31 initrd.img-3.16.0-5-amd64
-rw-r--r--  1 root root 15310597 mag 11 11:35 initrd.img-3.16.0-6-amd64
-rw-r--r--  1 root root  2684316 dic 14 22:27 System.map-3.16.0-4-amd64
-rw-r--r--  1 root root  2683305 gen  9 12:42 System.map-3.16.0-5-amd64
-rw-r--r--  1 root root  2683087 mag  8 19:36 System.map-3.16.0-6-amd64
-rw-r--r--  1 root root  3137712 dic 14 22:25 vmlinuz-3.16.0-4-amd64
-rw-r--r--  1 root root  3139776 gen  9 12:40 vmlinuz-3.16.0-5-amd64
-rw-r--r--  1 root root  3170464 mag  8 19:34 vmlinuz-3.16.0-6-amd64
# df -h
File system     Dim. Usati Dispon. Uso% Montato su
/dev/sda1        46G   21G     24G  47% /
udev             10M     0     10M   0% /dev
tmpfs           401M  6,0M    395M   2% /run
tmpfs          1001M   28M    973M   3% /dev/shm
tmpfs           5,0M  4,0K    5,0M   1% /run/lock
tmpfs          1001M     0   1001M   0% /sys/fs/cgroup
/dev/sda2       180G   34G    137G  20% /home
tmpfs           201M   12K    201M   1% /run/user/1000
/dev/sdb1       3,8G  3,8G       0 100% /media/stefano/Debian 8.0.0 amd64 
1
# df -i
File system       Inode IUsati  ILiberi IUso% Montato su
/dev/sda1       3055616 448579  2607037   15% /
udev             253925    424   253501    1% /dev
tmpfs            256068    604   255464    1% /run
tmpfs            256068    129   255939    1% /dev/shm
tmpfs            256068      4   256064    1% /run/lock
tmpfs            256068     13   256055    1% /sys/fs/cgroup
/dev/sda2      11968512 320153 11648359    3% /home
tmpfs            256068     18   256050    1% /run/user/1000
/dev/sdb1             0      0        0     - /media/stefano/Debian 8.0.0 
amd64 1

编辑1

我的语言环境文件

# locale
/usr/bin/locale: riga 1: fg: nessun controllo dei job
/usr/bin/locale: riga 2: errore di sintassi vicino al token non atteso 
"ImageMagick"
/usr/bin/locale: riga 2: `%%Creator: (ImageMagick)'
# cat /etc/default/locale 
#  File generated by update-locale
LANG="it_IT.UTF-8"
# gettext -d coreutils -s "write error"/usr/bin/gettext: riga 1: fg: 
nessun controllo dei job
/usr/bin/gettext: riga 2: errore di sintassi vicino al token non atteso 
"ImageMagick"
/usr/bin/gettext: riga 2: `%%Creator: (ImageMagick)'
电信

您的/usr/bin/locale/usr/bin/gettext命令似乎遇到了类似于PostScript文档标题的内容,并导致了一些错误。这些错误可能是也可能不是您问题的根本原因,但是它们肯定会干扰其他系统功能。

/etc/default/locale也许您有什么奇怪的东西吗?它应仅包含sh-style变量定义和/或注释。

如果您跑步会locale怎样?它应该显示您当前的语言环境设置,并且没有错误消息。

或者,如果您跑步gettext -d coreutils -s "write error"怎么办?它应该根据您当前的语言环境设置输出“ write error”消息的翻译版本。

也许PostScript文件已进入您的邮件目录目录?然后,此命令可能会找到它:

find /usr/share/locale -type f -exec file {} \+ |grep -E -v 'GNU (gettext )?message catalog'

该命令应标识/ usr / share / locale下的所有不是消息目录文件的文件。如果您的file命令输出也已翻译,则可能必须在此命令前加上LC_ALL=C标准美国英语的tme消息,以便搜索字符串将正确地从输出中排除消息目录文件。


原来,您的/usr/bin/locale,似乎也/usr/bin/gettext已被ImageMagick创建的PostScript文件所取代。这听起来可能是文件系统损坏,或者以root用户身份运行ImageMagick命令可能会引起“麻烦”。

要修复/usr/bin/locale/usr/bin/gettext,请运行以下命令:

apt-get install --reinstall libc-bin gettext-base

这将重新安装libc-binandgettext-base软件包的所有文件,不会先删除任何依赖于它们的软件包。这应该可以解决至少一些原始错误消息。然后,您可以尝试dpkg --configure -a再次运行以查看这是否是整个问题的真正根本原因,或者是否还有更多需要解决的问题。

文件系统损坏的可能性使我认为您应该检查dmesg | less输出:是否有任何看起来像磁盘错误的内容?

smartctl -a /dev/<your system disk device>磁盘是否通过了内部SMART运行状况检查?该命令输出很多信息,但重要的部分应如下所示:

=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED

如果未显示“ PASSED”,则表明您的磁盘出现故障,应该更换。

即使smartctl认为磁盘可以,也可以进行完整备份,然后再进行完整的文件系统检查。如果您需要有关文件系统检查的帮助,请为此提出一个新问题。

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章

防止Debian搞砸grub配置

与Debian Jessie一起制作Multiboot GRUB USB

使用双启动,在Debian上安装GRUB

双重引导仅在Windows上不再加载Debian / GRUB

在Windows 10上安装了Debian,但GRUB未显示

如何在Debian上重新获得GRUB菜单

修复正在运行的Debian上的grub v2引导程序配置

如何在Debian中配置预置文件以使grub配置指向正确的驱动器

在配置grub-pc时,Software Updater变为非活动状态(灰色)

为什么GRUB在我的多重引导配置中引导Debian 32位而不是Ubuntu 64位?

Debian不遵守GRUB2分辨率设置–屏幕上出现垃圾

双启动 Ubuntu / Ubuntu 安装,非 UEFI PC。如何删除其中一个 GRUB?

配置Apache 2.4以允许在Debian Jessie上使用CGI

Debian安装的内核未显示在GRUB中

我可以通过grub更新Debian吗?

Debian 7.3.0-GRUB是否必要?

从备份还原Debian后如何还原GRUB?

Ubuntu 卡在 Grub 上

GRUB屏幕上的错误

卡在GRUB Bootloader上

网站在PC中是响应式的,但在移动浏览器的一半中显示

通过VMware将UEFI Debian安装到USB上(用于另一台PC)

如果GRUB2无法在我的PC上正常运行,备用引导加载程序是否可以工作?

SSD(系统)和HDD(数据)上的Ubuntu 13.10。缺少/grub/i386-pc/normal.mod

Debian Jessie挂在引导上

之后在 USB 上安装 GRUB

从12.04升级到14.04后,grub-install失败(grub-pc损坏)

grub错误:找不到/boot/grub2/i386-pc/normal.mod

更新-grub上出现grub错误“多余的RAID成员”