由于我的机器所需内核缺乏对网卡的支持而出现一些问题(虽然我知道如何编译我的网卡驱动程序,但我不想这样做,因为目标内核的内核头存在一些问题),我决定尝试另一种方法 - 在 AWS EC2 上安装我正在评估的软件(我之前在使用 EC2 方面有一些有限的经验)。
我正在评估的软件(HUBzero - 用于科学研究和协作的开源平台)是一个庞大而复杂的各种软件模块套件。这没问题,但是,为了实现完整功能,它需要(并尝试安装)使用非默认(对于 Debian 7)内核,具体来说,是基于 2.6 的 OpenVZ 内核。虽然 OpenVZ 内核之外的大多数安装都成功了,只需要进行一些配置和调整(因为安装说明适用于标准 Debian 7 安装,而不是 AWS - AWS Marketplace 中存在一个 HUBzero VM 映像,但版本要旧得多,因此我努力安装/评估最新版本)。
无论如何,当我尝试使用 OpenVZ 内核映像安装 HUBzero 的软件包时,它产生了以下输出,并出现了一些警告(请参阅下面的“Hmm”消息),最后出现了错误。如果我理解正确的话,错误是由于我的试点系统上没有安装“grub”。请注意,我使用的是使用“hvm”虚拟化代替“pvm”, 所以这不适用。因此,我决定通过“apt-get”安装 GRUB,然后将其删除,希望找到旧版 (v1),该版本使用安装脚本所需的“/boot/grub/grub.cfg”。但是,尽管出现消息“注意,选择‘grub-legacy’而不是‘grub’”,但我没有看到“grub”配置文件以及相关的“.lst”文件。
问题:如何按照 HUBzero 的安装脚本(似乎依赖于 GRUB v1)的预期设置 GRUB,并修复整个情况?所有建议和/或帮助都将不胜感激。
节日快乐!
承诺产出:
Output from "apt-get install hubzero-openvz":
---------------------------------------------
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
libcgroup1 libparted0debian1 libploop1 linux-image-2.6.32-openvz-042stab112.15-amd64 linux-image-openvz-amd64 parted ploop vzctl
vzquota
Suggested packages:
libparted0-dev libparted0-i18n fdutils linux-doc-2.6.32-openvz-042stab112.15-amd64 linux-source-2.6.32-openvz-042stab112.15-amd64
ksymoops linux-image-2.6.32-openvz-042stab112.15-amd64-dbg parted-doc pv bash-completion
The following NEW packages will be installed:
hubzero-openvz libcgroup1 libparted0debian1 libploop1 linux-image-2.6.32-openvz-042stab112.15-amd64 linux-image-openvz-amd64
parted ploop vzctl vzquota
0 upgraded, 10 newly installed, 0 to remove and 30 not upgraded.
Need to get 56.1 MB of archives.
After this operation, 161 MB of additional disk space will be used.
Do you want to continue [Y/n]?
Get:1 http://cloudfront.debian.net/debian/ wheezy/main libparted0debian1 amd64 2.3-12 [348 kB]
Get:2 http://download.openvz.org/debian/ wheezy/main linux-image-2.6.32-openvz-042stab112.15-amd64 amd64 1 [55.0 MB]
Get:3 http://packages.hubzero.org/deb/ ellie-deb7/main hubzero-openvz amd64 2.0.0-1+deb7 [2,300 B]
Get:4 http://cloudfront.debian.net/debian/ wheezy/main libcgroup1 amd64 0.38-1 [43.8 kB]
Get:5 http://cloudfront.debian.net/debian/ wheezy/main parted amd64 2.3-12 [158 kB]
Get:6 http://download.openvz.org/debian/ wheezy/main vzquota amd64 3.1-1 [105 kB]
Get:7 http://download.openvz.org/debian/ wheezy/main vzctl amd64 4.9.4-2 [351 kB]
Get:8 http://download.openvz.org/debian/ wheezy/main libploop1 amd64 1.13.2-1 [102 kB]
Get:9 http://download.openvz.org/debian/ wheezy/main linux-image-openvz-amd64 amd64 042stab112.15 [3,118 B]
Get:10 http://download.openvz.org/debian/ wheezy/main ploop amd64 1.13.2-1 [38.5 kB]
Fetched 56.1 MB in 8s (6,948 kB/s)
Preconfiguring packages ...
Selecting previously unselected package libparted0debian1:amd64.
(Reading database ... 116346 files and directories currently installed.)
Unpacking libparted0debian1:amd64 (from .../libparted0debian1_2.3-12_amd64.deb) ...
Selecting previously unselected package linux-image-2.6.32-openvz-042stab112.15-amd64.
Unpacking linux-image-2.6.32-openvz-042stab112.15-amd64 (from .../linux-image-2.6.32-openvz-042stab112.15-amd64_1_amd64.deb) ...
Done.
Selecting previously unselected package libcgroup1.
Unpacking libcgroup1 (from .../libcgroup1_0.38-1_amd64.deb) ...
Selecting previously unselected package vzquota.
Unpacking vzquota (from .../vzquota_3.1-1_amd64.deb) ...
Selecting previously unselected package vzctl.
Unpacking vzctl (from .../vzctl_4.9.4-2_amd64.deb) ...
Selecting previously unselected package parted.
Unpacking parted (from .../parted_2.3-12_amd64.deb) ...
Selecting previously unselected package libploop1:amd64.
Unpacking libploop1:amd64 (from .../libploop1_1.13.2-1_amd64.deb) ...
Selecting previously unselected package linux-image-openvz-amd64.
Unpacking linux-image-openvz-amd64 (from .../linux-image-openvz-amd64_042stab112.15_amd64.deb) ...
Selecting previously unselected package hubzero-openvz.
Unpacking hubzero-openvz (from .../hubzero-openvz_2.0.0-1+deb7_amd64.deb) ...
Selecting previously unselected package ploop.
Unpacking ploop (from .../ploop_1.13.2-1_amd64.deb) ...
Processing triggers for man-db ...
Setting up libparted0debian1:amd64 (2.3-12) ...
Setting up linux-image-2.6.32-openvz-042stab112.15-amd64 (1) ...
Hmm. There is a symbolic link /lib/modules/2.6.32-openvz-042stab112.15-amd64/build
However, I can not read it: No such file or directory
Therefore, I am deleting /lib/modules/2.6.32-openvz-042stab112.15-amd64/build
Hmm. The package shipped with a symbolic link /lib/modules/2.6.32-openvz-042stab112.15-amd64/source
However, I can not read the target: No such file or directory
Therefore, I am deleting /lib/modules/2.6.32-openvz-042stab112.15-amd64/source
Running depmod.
WARNING: could not open /lib/modules/2.6.32-openvz-042stab112.15-amd64/modules.builtin: No such file or directory
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 2.6.32-openvz-042stab112.15-amd64 /boot/vmlinuz-2.6.32-openvz-042stab112.15-amd64
update-initramfs: Generating /boot/initrd.img-2.6.32-openvz-042stab112.15-amd64
WARNING: could not open /var/tmp/mkinitramfs_iDGwaW/lib/modules/2.6.32-openvz-042stab112.15-amd64/modules.builtin: No such file or directory
run-parts: executing /etc/kernel/postinst.d/zz-extlinux 2.6.32-openvz-042stab112.15-amd64 /boot/vmlinuz-2.6.32-openvz-042stab112.15-amd64
P: Checking for EXTLINUX directory... found.
P: Writing config for /boot/vmlinuz-3.2.0-4-amd64...
P: Writing config for /boot/vmlinuz-2.6.32-openvz-042stab112.15-amd64...
P: Updating /boot/extlinux/linux.cfg...
Setting up libcgroup1 (0.38-1) ...
Setting up vzquota (3.1-1) ...
Setting up vzctl (4.9.4-2) ...
Running kernel is not an OpenVZ kernel
invoke-rc.d: initscript vz, action "start" failed.
Setting up parted (2.3-12) ...
Setting up libploop1:amd64 (1.13.2-1) ...
Setting up linux-image-openvz-amd64 (042stab112.15) ...
Setting up hubzero-openvz (2.0.0-1+deb7) ...
Setting up ploop (1.13.2-1) ...
=====
Output from "hzcms configure openvz --enable":
----------------------------------------------
enabling openvz
Traceback (most recent call last):
File "/usr/bin/hzcms", line 5159, in <module>
args.func(args)
File "/usr/bin/hzcms", line 3703, in _openvzConfigure
openvzEnable()
File "/usr/bin/hzcms", line 3744, in openvzEnable
grubfh = open(grubfn,'r')
IOError: [Errno 2] No such file or directory: '/boot/grub/grub.cfg'