dpkg: 处理 linux-image-3.5.0-28-generic 时出错

dpkg: 处理 linux-image-3.5.0-28-generic 时出错

我在服务器上安装了 Ubuntu Server 12.04.2 LTS。运行后

    apt-get update & apt-get upgrade & apt-get dist-upgrade

我的内核版本已更改为linux-image-3.5.0-28-generic。 (原来的是linux-image-3.5.0-23-generic

但是,经过上述操作后,当我运行apt-get upgradeapt-get autoremoveapt-get install ntp(或其他包)时,shell打印出以下错误信息:

root@network:/boot# apt-get upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
3 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue [Y/n]? y
Setting up linux-image-3.5.0-28-generic (3.5.0-28.48~precise1) ...
Running depmod.
update-initramfs: deferring update (hook will be called later)
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 3.5.0-28-generic /boot/vmlinuz-3.5.0-28-generic
run-parts: executing /etc/kernel/postinst.d/dkms 3.5.0-28-generic /boot/vmlinuz-3.5.0-28-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.5.0-28-generic /boot/vmlinuz-3.5.0-28-generic
update-initramfs: Generating /boot/initrd.img-3.5.0-28-generic
run-parts: executing /etc/kernel/postinst.d/update-notifier 3.5.0-28-generic /boot/vmlinuz-3.5.0-28-generic
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 3.5.0-28-generic /boot/vmlinuz-3.5.0-28-generic
/usr/sbin/grub-probe: error: cannot find a device for / (is /dev mounted?).
run-parts: /etc/kernel/postinst.d/zz-update-grub exited with return code 1
Failed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/linux-image-3.5.0-28-generic.postinst line 1010.
dpkg: error processing linux-image-3.5.0-28-generic (--configure):
 subprocess installed post-installation script returned error exit status 2
 E: Sub-process /usr/bin/dpkg returned an error code (1)

有人有什么办法让它工作吗?(我甚至不知道这有什么问题?)或者如何回滚到以前的 Linux 内核版本?(因为以前的版本没有问题linux-image-3.5.0-23-generic。)谢谢!

答案1

通过谷歌,我刚刚发现了问题所在。

实际上,我的问题和

http://ubuntuforums.org/showthread.php?t=1553405

因为我的服务器也是无盘 NFS 启动服务器...

我的问题的解决方案很简单: http://jeffwelling.github.io/2011/08/29/Diskless-Upgrade-Problem.html

exec update-grub只需在文件中注释掉即可/etc/kernel/postinst.d/zz-update-grub

(NFS 启动不需要 grub。)

谢谢!

相关内容