第一次启动总是失败。有可能让它发挥作用吗?
处理修改后的操作系统映像。它使用版本 3.10(Centos 7.6)的内核,但 grub 仍然是旧版本 0.97。
当部署操作系统映像时。它始终停留在[达到目标本地加密卷。],但重新启动/重置后图像工作正常。根据日志,我发现首次启动期间存在安装问题。
如果我更改挂载点 /mnt 或任何其他路径。它会在第一次启动时启动。因此很明显,initramfs 映像安装在“/”处,当它读取 fstab 时,它尝试在“/”处重新安装根文件系统,但失败了。
fstab 文件:
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0
tmpfs /tmp tmpfs size=64M 0 0
LABEL=/ / ext3 defaults 0 1
LABEL=/var/log /var/log ext3 defaults 0 2
grub.conf:
default=0
timeout=5
title <TITLE> (3.10.0-957.1.3.el7.x86_64)
root(hd0,1)
kernel /boot/vmlinuz-3.10.0-957.1.3.el7.x86_64 rw root=LABEL=/ console=ttyS0,9600 ipv6.disable=1 net.ifnames=0 biosdevname=0
initrd /boot/initramfs-3.10.0-957.1.3.el7.x86_64.img
启动日志
[ 5.443809] scsi 0:0:0:0: Direct-Access VMware Virtual disk 1.0 PQ: 0 ANSI: 2
[ 6.082467] sd 0:0:0:0: [sda] 67108864 512-byte logical blocks: (34.3 GB/32.0 GiB)
[ 6.084567] sd 0:0:0:0: [sda] Write Protect is off
[ 6.085880] sd 0:0:0:0: [sda] Cache data unavailable
[ 6.087230] sd 0:0:0:0: [sda] Assuming drive cache: write through
[ 6.126988] sda: sda1 sda2 sda3 sda4 < sda5 sda6 sda7 >
[ 6.130980] sd 0:0:0:0: [sda] Attached SCSI disk
[ 6.298133] random: fast init done
[ 6.488183] EXT4-fs (sda2): mounting ext3 file system using the ext4 subsystem
[ 6.506629] EXT4-fs (sda2): mounted filesystem with ordered data mode. Opts: (null)
[ 6.638000] dracut: Checking ext3: /dev/disk/by-label/\x2f
[ 6.640891] dracut: issuing e2fsck -a /dev/disk/by-label/\x2f
[ 6.719509] dracut: /: ignoring check interval, broken_system_clock set
[ 6.723541] dracut: /: clean, 25095/625664 files, 1137935/5000000 blocks
[ 6.733432] dracut: Mounting /dev/disk/by-label/\x2f with -o defaults,rw
[ 6.787698] EXT4-fs (sda2): mounting ext3 file system using the ext4 subsystem
[ 6.795954] EXT4-fs (sda2): warning: checktime reached, running e2fsck is recommended
[ 6.799898] EXT4-fs (sda2): mounted filesystem with ordered data mode. Opts: (null)
[ 6.902962] dracut: Mounted root filesystem /dev/sda2
[ 7.122655] dracut: Switching root
[ 7.263505] random: crng init done
[ 7.726233] ip_tables: (C) 2000-2006 Netfilter Core Team
[ 7.729639] systemd[1]: Inserted module 'ip_tables'
[ 7.735397] systemd[1]: Configuration file /etc/systemd/system.conf is marked executable. Please remove executable permission bits. Proceeding anyway.
[ 7.746005] systemd[1]: systemd 219 running in system mode. (+PAM +AUDIT +SELINUX +IMA -APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 -SECCOMP +BLKID +ELFUTILS +KMOD +IDN)
[ 7.753805] systemd[1]: Detected virtualization vmware.
[ 7.756236] systemd[1]: Detected architecture x86-64.
Welcome to [0;31mCentOS Linux 7 (Core)[0m!
[ 9.084894] systemd[1]: Created slice system-serial\x2dgetty.slice.
[[32m OK [0m] Created slice system-serial\x2dgetty.slice.
[ 9.090775] systemd[1]: Reached target Slices.
[[32m OK [0m] Reached target Slices.
[ 9.095230] systemd[1]: -.mount: Directory / to mount over is not empty, mounting anyway.
[ 9.099881] systemd[1]: Mounting /...
Mounting /...
[ 9.127149] systemd[1]: -.mount mount process exited, code=exited status=32
[ 9.130870] systemd[1]: Failed to mount /.
[[1;31mFAILED[0m] Failed to mount /.
See 'systemctl status -.mount' for details.