三系統共存:Ubuntu 12.04(主力,磁盤不足)、Ubuntu 14.04、CentOS。嘗試用 GParted Live 刪除後兩系統分區騰出空間。
sda1: Ubuntu 14.04 (原 Win7)sda3: NTFS D 盤sda4: ext4 /boot (關鍵!)sda5: swapsda6: Ubuntu 12.04 /sda7: /homesda8: swapsda9: CentOS /sda10: swap 誤以為 sda4/sda8 屬於 14.04,刪除 sda4(/boot)、sda8 及所有 swap。重啟進入 grub rescue:
error: /grub/i386-pc/normal.mod not found set prefix=(hd0,msdos6)/boot/grub、set root=(hd0,msdos6)。insmod normal 成功(路徑變為 i386-pc),但 normal 命令報 symbol 'grub_term_highlight_color' not found。/boot 到目標分區 → 進入 Live 系統而非目標系統。update-grub 報 failed to get canonical path of /cow。grub-install /dev/sda 報 /boot/grub not readable。chroot 修復:sudo mount /dev/sda6 /mntsudo mount --bind /sys /mnt/syssudo mount --bind /proc /mnt/procsudo mount --bind /dev /mnt/devsudo chroot /mntsudo apt-get install --reinstall grub2 原 12.04 系統分離了 /、/boot、/home 三分區,/etc/fstab 記錄 UUID 掛載關系。修復後需手動補全:
UUID=65a7fc16... / ext4 errors=remount-ro 0 1UUID=aef790b3... /home ext4 defaults 0 2 用 blkid 核對分區 UUID,修正 fstab 後重啟終於進入原 12.04 系統。
lsblk -f/cat /etc/fstab 核對。chroot + grub-install --root-directory,而非直接在 Live 系統運行 update-grub。