GRUB trouble on Linux after partition movement

categories: pc
tags: linux

I found that the Linux would not boot and the display still showed the boot picture. Press C to enter the GRUB prompt and type,

GRUB> set root=(hd0,1)
GRUB> linux /linuz root=/dev/sda1
GRUB> initrd /initrd.img
GRUB> boot

to boot the Linux. After boot, use shell to recover the problem

# grub-mkconfig -o /boot/grub/grub.cfg