sunnyADboy 发表于 2011-5-29 10:05:44

lnmp 0.7 在Debian 6.0 32位环境下安装出现循环错误

军哥你好,我在Debian 5.0 32位环境下安装、运行lnmp 0.7都非常好,但是在Debian 6.0 32位环境下安装就出现如下循环错误:

Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up linux-image-2.6.32-5-686-bigmem (2.6.32-34squeeze1) ...
Running depmod.
Running update-initramfs.
update-initramfs: Generating /boot/initrd.img-2.6.32-5-686-bigmem
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 2.6.32-5-686-bigmem /boot/vmlinuz-2.6.32-5-686-bigmem
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 2.6.32-5-686-bigmem /boot/vmlinuz-2.6.32-5-686-bigmem
Searching for GRUB installation directory ... found: /boot/grub
warning: grub-probe can't find drive for /dev/xvda1.
grub-probe: error: cannot find a GRUB drive for /dev/xvda1.Check your device.map.
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-2.6.32-5-686-bigmem.postinst line 799, <STDIN> line 2.
dpkg: error processing linux-image-2.6.32-5-686-bigmem (--configure):
subprocess installed post-installation script returned error exit status 2
configured to not write apport reports
                                    Errors were encountered while processing:
linux-image-2.6.32-5-686-bigmem
E: Sub-process /usr/bin/dpkg returned an error code (1)

请军哥帮忙看下如何解决 谢谢

licess 发表于 2011-5-29 11:12:38

按如下方法试试:执行:mknod /dev/xvda b 202 0
编辑:/boot/grub/device.map
修改(hd0) /dev/sda 为:(hd0) /dev/xvda

编辑:/usr/sbin/update-grub

修改find_device ()
{
      if ! test -e ${device_map} ; then
                echo quit | grub --batch --no-floppy --device-map=${device_map} > /dev/null
      fi
      grub-probe --device-map=${device_map} -t device $1 2> /dev/null
}为find_device ()
{
      if ! test -e ${device_map} ; then
                echo quit | grub --batch --no-floppy --device-map=${device_map} > /dev/null
      fi
      #grub-probe --device-map=${device_map} -t device $1 2> /dev/null

      echo /dev/xvda
}再执行:update-grub 0

再执行:sed -i "s/xvda/xvda1/g" /boot/grub/menu.lst

apt-get upgrade 看看行了吧

sunnyADboy 发表于 2011-5-30 22:33:30

回复 2# 的帖子

军哥V5 我的一个VPS按照你说的弄已经OK了,不过另一家的一个有点倔 还是不行
当我执行到:update-grub 0 时
它还是显示:
root@vps:~# update-grub 0
Searching for GRUB installation directory ... found: /boot/grub
warning: grub-probe can't find drive for /dev/xvda1.
grub-probe: error: cannot find a GRUB drive for /dev/xvda1.Check your device.map.

不知道军哥你还有办法不? (最近加班有点小忙没及时上来反馈效果 不好意思啊 呵呵)

licess 发表于 2011-5-31 09:07:16

回复 3# 的帖子

/dev/xvda1 这个设备不存在,可能设备名不是这个,打开/boot/grub/device.map看看是那个
页: [1]
查看完整版本: lnmp 0.7 在Debian 6.0 32位环境下安装出现循环错误