To add a new startup item using GRUB (menu entry)

Source: Internet
Author: User

Grub Version: GRUB2

Basic knowledge:

related file and directory structure :

A. /etc/grub.d/

There is a 40_custom script: You can add a custom startup item by modifying the 40_custom scripts.

B. /etc/grub2.cfg or/etc/grub2-efi.cfg (which file depends on how the system starts)

These two files contain some startup items (different kernel versions)

Start to say the right thing:

How to add a custom startup item

Outline

Modify the file 40_custom in the/etc/grub.d/directory first, and then execute the GRUB2-MKCONFIG program to generate the GRUB2 configuration file grub2-efi.cfg

1. How to modify: Find a ready-made menu entry template in the section related to the menu entry (in the configuration file grub2-efi.cfg), copy and paste into the new file

Vim a newentry, use it instead of/etc/grub.d/40_custom

(OK this custom startup item, just copy the contents of the previous startup item)

Menuentry ' Custom content '

2. Generate a new grub configuration file

Executes the Grub2-mkconfig-o/etc/grub2.cfg command, which generates a new grub2-efi.cfg configuration file.

3.reboot Restart to detect if a new startup item is available.

Successful, the cursor is the new startup item.

Reference: <linux Kernel fundamentals> 019 Challenge solution Instructional video.

To add a new startup item using GRUB (menu entry)

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.