Fault phenomenon: misoperation, remove the/boot file
PS: Fortunately know where to move the boot file
The machine cannot be connected by SSH and will enter after reboot:
Grub Rescue>
In rescue mode, only a few commands are used:
Set setting environment variables
LS Viewing device
Insmod Loading Module
root specifies the partition used to boot the system
Prefix Setting Grub boot path
One, find the operating system file location
LS (HD0,MSDOS1)
LS (HD0,MSDOS1)/usr/boot
Find the System file location via LS
Second, set the boot partition, path, load module, enter the normal mode
Grub rescue> Set root= (HD0,MSDOS1) #设置grub启动分区
Grub rescue> Set prefix= (HD0,MSDOS1)/usr/boot/grub2 #设置grub2启动路径
Grub rescue> Insmod Normal
Grub Rescue> Normal
If the above settings are correct, you can enter the Grub menu of the system normally.
Third, the guidance system
After entering normal mode, there will be grub> such as the prompt, there are a lot of commands to support here.
Grub> set root= (HD0,MSDOS1) #设置正常启动分区
grub> linux/boot/vmlinuz. Ro text root=/dev/sda1 #加载内核文件, enter console mode
Grub> initrd/boot/initrd .... #加载initrd. img File
grub> Boot #引导
Iv. completion of the launch
This article is from the "Python Learning Marping" blog, so be sure to keep this source http://78799999.blog.51cto.com/9500788/1972737
Linux does not boot system grub rescue>