在 XEN VPS 上配置 GRUB

在 XEN VPS 上配置 GRUB

我有一台安装了 Debian 7 x86_64 的 xen VPS。操作系统自带 GRUB2。问题是运行时

apt-get update
apt-get upgrade -y

GRUB 说The GRUB boot loader was previously installed to a disk that is no longer present, or whose unique identifier has changed for some reason.。然后多次出现以下错误:

/usr/sbin/grub-probe: warn: disk does not exist, so falling back to partition device /dev/xvda1.

当我重新启动之后,服务器不会(可预测地)加载。

我的托管服务提供商告诉我不要升级软件,并拒绝提供帮助。我发现教程关于该主题。但我无法使用它,因为我的版本/usr/sbin/update-grub不包含我应该更改的代码。它的全部内容是:

#!/bin/sh
set -e
exec grub-mkconfig -o /boot/grub/grub.cfg "$@"

/boot/grub/menu.lst我的机器上也没有

以下输出可能有用

fdisk -l

Disk /dev/xvda1: 5368 MB, 5368709120 bytes
255 heads, 63 sectors/track, 652 cylinders, total 10485760 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/xvda1 doesn't contain a valid partition table

您能告诉我该如何解决这个问题吗?

答案1

不知道更多细节,VPS 的内核和 initramdisk 似乎存储在主机域中。因此,当您的 VPS 从虚拟机管理程序启动时,虚拟机管理程序会为客户机提供内核和虚拟机管理程序,无需任何引导加载程序。

这意味着 VPS 本身根本没有安装启动管理器。

这也意味着您无法自行升级内核或 initramdisk,VPS 提供商必须这样做,因为只有他们才能访问虚拟机管理程序。他们也可能不会这样做,因为他们对该服务器上的其他 VPS 实例使用相同的内核和虚拟机管理程序。

因此,该问题无法解决。

相关内容