CentOS7 GRUB 重建方式

GRUB1.X
1. 使用DVD或USB Boot啟動Linux光碟
2. 按下 F5 或 輸入 linux rescue 進入救援模式
3. 選擇 mount /mnt/sysimage
4. 輸入 grub-install /dev/sda 假如開機曹為 /dev/sda
5. 用 vi 看一下/etc/grub.conf 或 /boot/grub/grub.conf ,不同Linux Distribution有不同的位置。
6.重啟動

GRUB2.x
1.指令需 root 權限
    mount / /dev/sdb1 #假設拔到另一台作業系統,或是Live DVD 或是 Ctrl+D修復模式下
2.  grub-install --root-directory=/ /dev/sdb
3.  update-grub2


 
1. Boot from boot DVD or usb iso image
2. Press F5 or type linux rescue to enter the rescue environment
3. Select the option to allow mount system root partition in /mnt/sysimage or type chroot /mnt/sysimage
4. type grub-install /dev/sda to reinstall GRUB boot loader, if your Linux boot partition in /dev/sda
5. Check /etc/grub.conf or /boot/grub/grub.conf for in accordance with your Linux version
6. Reboot your system by combo keys Ctrl + Alt + Del

這個網誌中的熱門文章

Upgrade php and httpd(apache) on CentOS 7

Installing VMware workstation pro on Ubuntu 22.X (Jammy Jellyfish)