一般咱不出外场的。 不过这次是给乔老师江湖救急的活,去看看吧。

河医测序实验室存储服务器,系统CentOS7,在一次断电后,无法正常切动,显示:

1
2
3
4
dracut-initqueue[631]:Warning: dracut-initqueue timeout - starting timeout scripts
dracut-initqueue[631]:Warning: Could not boot.
dracut-initqueue[631]:Warning: /dev/mapper/centos_hnt64-root does not exist
    Starting Dracut Emergency Shell...

先复盘linux的引导过程:

linux 引导过程

可能性一:BIOS设定错误,BIOS→Boot Settings,从BIOS模式修改为UEFI模式。

可能性二:initramfs损坏,参考这一篇:

warning /dev/centos/root swap centos-root does not exist – after configuring DRBD

The reason why you’re seeing this is due of initramfs kernel image being build for the specific system it’s running on, so migrating to a new hardware will cause it to fail to boot.

Rebuilding initramfs in emergency mode(or go to the Rescue Mode ):

Then

  1. List the initramfs images you have:

ls -ltrh /boot/initramfs-*

  1. Locate the kernel version you’re using and create a backup of it:

cp -iv /boot/initramfs-3.10.0-1062.el7.x86_64.img /boot/initramfs-3.10.0-1062.el7.x86_64.img.back

  1. Rebuild the kernel image for that specific kernel

dracut -f

  1. Select the new kernel image

ls -ltrh /boot/initramfs-*

  1. Specify the new kernel version (For Example):

dracut -f /boot/initramfs-3.10.0-1062.el7.x86_64.img 3.10.0-1062.el7.x86_64

  1. Go to the Grub config

vim /boot/grub2/grub

  1. Delete the old menuentry and make sure that the new menuentry is top of all

  2. Generate a GRUB configuration file

grub-mkconfig

  1. Reboot

  2. Done.

以上流程基本没问题,最后两步做了修改:

因为是UEFI启动,所以有用的grub配置其实是在 /boot/EFI/centos中的grub.conf

grub.conf修改,把最新的启动项放上面去;

然后,变量文件修改一下要默认启动的项目。

为了以防万一,还烧录了一个liveCD虽然最后没用上。

他们还搞了一个VPN,可这个VPN启动有问题,最后发现需要启动两个服务。

1
2
systemctl enable tinc
systemctl enable tinc@cloud

至此,全部解决。