Display and modify Grub command lines when Linux is started

Source: Internet
Author: User

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 ).

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.