리눅스 하드디스크 이전후 부팅이 안될때, 시스템 복원후 부팅이 안 되는 증상은 bios 부팅모드가 맞지 않아 발생하는 문제로 바이오스를 맞춰주거나, 또는 grub2를 재설치해주면 된다.
centos liunx 부팅 안될때 grub2 설치방법
재설치를 위해서는 리눅스설치USB로 부팅후 복구모드로 진입하면 되는데 순서는 다음과같다.
- centos linux 설치USB 로 부팅
- Troubleshooting > Rescue a CentOS system 을 선택
- 복구보드로 부팅이 되면 1번 continue 를 선택하고 엔터를 치면 쉘프롬프트가 뜨는데 이때 엔터키를 친다.
- chroot /mnt/sysimage 입력
- /sbin/grub2-install /dev/sda 입력
- reboot 하면 됨.



grub2-install: error: /usr/lib/grub/x86_64-efi/modinfo.sh doesn’t exist. Please specify –target or –directory 에러조치방법
입력을 했는데 아래 그림과같이 에러가 뜰때 조치방법입니다.

# grub2-install /dev/sda
grub2-install: error: /usr/lib/grub/x86_64-efi/modinfo.sh doesn't exist. Please specify --target or --directory.
증상은 BIOS에서 legacy(CSM)과 UEFI를 바꾸면된다.
지금의 경우는 legacy 모드의 이미지를 복구후 에러가 발생해 하는수 없이 다른PC(삼성)에서 BIOS설정을 CSM으로 해서 USB부팅을 해주니 조치가 되었다.