我遇到了一个问题,在 1 个 SDD 上安装 installimage,并留下 2 个 HDD 供将来的 RAID 使用。清理 installimage 后,服务器没有响应。只有救援才能让它恢复运行。
答案1
解决方案是强制在所有驱动器上安装 grub。安装完镜像后,您需要将根目录更改为全新安装,然后在所有磁盘上运行 grub-install。
root@rescue ~ # installimage
# Assuming /SDC is SDD
# set->SWRAID 0, Comment DISK[n], ensue DISK1 is on SDD
root@rescue ~ # mount /dev/sdc3 /mnt/
root@rescue ~ # mount /dev/sdc2 /mnt/boot/
root@rescue ~ # cfdisk /dev/sda
# delete all. create single partition.primary. write. quit.
root@rescue ~ # cfdisk /dev/sdb
# delete all. create single partition.primary. write. quit.
root@rescue ~ # cd /mnt/
# set all proc/sys/dev avaliable from fresh install mount
root@rescue /mnt # mount -t proc /proc proc/
root@rescue /mnt # mount --rbind /sys sys/
root@rescue /mnt # mount --rbind /dev dev/
# https://www.ibm.com/docs/en/zos/2.3.0?topic=descriptions-chroot-change-root-directory-execution-command
root@rescue /mnt # chroot /mnt/
root@Ubuntu-1212 / # grub-install /dev/sdc
Installing for i386-pc platform.
Installation finished. No error reported.
root@Ubuntu-1212 / # grub-install /dev/sdb
Installing for i386-pc platform.
Installation finished. No error reported.
root@Ubuntu-1212 / # grub-install /dev/sda
Installing for i386-pc platform.
Installation finished. No error reported.
root@Ubuntu-1212 / # exit
root@rescue ~ # reboot
附言:我特意留下了注释和 shell 信息,因为你需要了解每个命令的作用。