我正在使用以下设置将 Centos 7 minimal 安装到我的虚拟机中
然后我创建单个“/”标准 ext4 分区。
安装后的分区为:
一旦我上传图像并创建实例,实例就无法启动。
以下是我的 centos 7 最小映像实例的日志:
KBD: int09 handler: AL=0
PS2 keyboard initialized
All threads complete.
Scan for option roms
Searching bootorder for: HALT
drive 0x000fd900: PCHS=0/0/0 translation=lba LCHS=1024/255/63 s=20971520
Space available for UMB: 000c0000-000eb800
Returned 122880 bytes of ZoneHigh
e820 map has 7 items:
0: 0000000000000000 - 000000000009fc00 = 1 RAM
1: 000000000009fc00 - 00000000000a0000 = 2 RESERVED
2: 00000000000f0000 - 0000000000100000 = 2 RESERVED
3: 0000000000100000 - 00000000bfffe000 = 1 RAM
4: 00000000bfffe000 - 00000000c0000000 = 2 RESERVED
5: 00000000fffbc000 - 0000000100000000 = 2 RESERVED
6: 0000000100000000 - 0000000130000000 = 1 RAM
Unable to lock ram - bridge not found
KBD: int09 handler: AL=0
enter handle_19:
NULL
Booting from Hard Disk 0...
Booting from 0000:7c00
但只是卡住了。
以下是 Google Centos 7 的日志
KBD: int09 handler: AL=0
PS2 keyboard initialized
All threads complete.
Scan for option roms
Searching bootorder for: HALT
drive 0x000fd920: PCHS=0/0/0 translation=lba LCHS=1024/255/63 s=20971520
Space available for UMB: 000c0000-000eb800
Returned 122880 bytes of ZoneHigh
e820 map has 6 items:
0: 0000000000000000 - 000000000009fc00 = 1 RAM
1: 000000000009fc00 - 00000000000a0000 = 2 RESERVED
2: 00000000000f0000 - 0000000000100000 = 2 RESERVED
3: 0000000000100000 - 00000000bfffe000 = 1 RAM
4: 00000000bfffe000 - 00000000c0000000 = 2 RESERVED
5: 00000000fffbc000 - 0000000100000000 = 2 RESERVED
Unable to lock ram - bridge not found
KBD: int09 handler: AL=0
enter handle_19:
NULL
Booting from Hard Disk 0...
Booting from 0000:7c00
[H [J [1;1H [?25l [m [H [J [1;1H [20;7H [mUse the ^ and v keys to change the selection.
Press 'e' to edit the selected item, or 'c' for a command prompt. [4;80H [7m [4;1H CentOS Linux (3.10.0-327.4.4.el7.x86_64) 7 (Core) [m [4;79H [m [m [5;1H CentOS Linux (3.10.0-229.20.1.el7.x86_64) 7 (Core) [m [5;79H [m [m [6;1H CentOS Linux, with Linux 3.10.0-123.el7.x86_64 [m [6;79H [m [m [7;1H CentOS Linux, with Linux 0-rescue-c237d8614bd9258fe3d4b8048fbe651d [m [7;79H [m [m [8;1H [m [8;79H [m [m [9;1H [m [9;79H [m [m [10;1H [m [10;79H [m [m [11;1H [m [11;79H [m [m [12;1H [m [12;79H [m [m [13;1H [m [13;79H [m [m [14;1H [m [14;79H [m [m [15;1H [m [15;79H [m [m [16;1H [m [16;79H [m [m [17;1H [m [17;79H [m [m [18;1H [m [18;79H [m [18;80H [4;79H [22;1H The selected entry will be started automatically in 5s. [4;79H [22;1H The selected entry will be started automatically in 4s. [4;79H [22;1H The selected entry will be started automatically in 3s. [4;79H [22;1H The selected entry will be started automatically in 2s. [4;79H [22;1H The selected entry will be started automatically in 1s. [4;79H [22;1H The selected entry will be started automatically in 0s. [4;79H [?25h [H [J [1;1H [H [J [1;1H[ 0.000000] Initializing cgroup subsys cpuset
[ 0.000000] Initializing cgroup subsys cpu
[ 0.000000] Initializing cgroup subsys cpuacct
答案1
您的引导加载程序似乎配置不正确。说明表格文章:
在系统上配置引导加载程序,以便它可以在 Compute Engine 上启动。
- 使用您计划导入的启动盘连接到系统上的终端。
- 编辑 GRUB 配置文件。通常此文件位于
/etc/default/grub
,但在某些较旧的发行版中,它可能位于非标准目录中。
对 GRUB 配置文件进行以下更改:
- 删除所有包含 的行
splashimage=
。Compute Engine 不支持启动时显示启动画面。- 删除 rhgb 和 quiet 内核命令行参数。
- 添加
console=ttyS0,38400n8d
到内核命令行参数,以便实例可以与交互式串行控制台一起运行。
重新生成
grub.cfg
文件。根据您的发行版使用以下命令之一。
- Debian 和 Ubuntu:
sudo update-grub
- RHEL、CentOS、SUSE、openSUSE:sudo
grub-mkconfig -o /boot/grub/grub.cfg
- 编辑
/etc/fstab
文件并删除对除启动磁盘本身及其上的分区之外的所有磁盘和分区的引用。无效条目/etc/fstab
可能会导致系统启动过程停止。