Display and modify Grub command lines when Linux is started
1. When the Linux system is started, if the/boot/grub. cfg file is corrupted or does not exist, the Grub command line prompt is displayed when the Linux system is started.
Follow these steps to rename the grub. cfg file.
2. After the system is restarted, the boot menu is not displayed as expected.
3. At the grub command prompt, you can use some commands to load the kernel and file system and set partitions in the root directory.
Some grub use linux/boot/vmlinuz-xx some grub use kernel/boot/vmlinuz-xx, you can enter the first letter and press the TAB key to view it.
4. The following interface will appear later.
5. To avoid entering the command every time you enter the system, you need to regenerate the grub. cfg file.
-> Sudo update-grub
-> Sudo grub-install/dev/sda
After the two commands are entered, the New grub. cfg is generated, which is the same as that of the previous file (provided that no changes are made to the file ).