Linuxgrub system startup configuration file

Source: Internet
Author: User
Article Title: Linuxgrub system startup configuration file. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.

After studying Linux grub for a long time, you may encounter a Linux grub problem. Here we will introduce how to solve the Linux grub problem. Linux itself is the core part of the operating system, that is, the kernel of the operating system. The kernel is the most basic program for completing operations. It is responsible for the startup and termination of other programs (such as text editor programs), memory application processing, hard disk access, network connection management, and other work.

Forget the root password. For Linux grub

1. When the Linux grub screen appears, use the up/down key to select which option to start Linux, and press the e key.

2. Select kernel/boot /......... Then press the e key

3. Modify the currently seen command line. The result of adding single is as follows:

Kernel/boot/vmlinuz-2.4.20-8 single ro root = LABEL =

4. Press enter to return, and press B to start. After single mode is started, the system directly enters the linux Command Line.

Run: passwd root

Change your password.

When Linux grub is started, a configuration file named menu. lst is located in/boot/grub/. If the file cannot be found, the configuration file directly enters the command line mode without entering the menu mode. Menu. lst is a text file. You can open it in any text editor. Each line represents a configuration command. If the first character of a line is "#", this line is annotated. You can simply add or remove comment lines to change the configuration.

Edit menu. lst. Generally there are the following lines

Timeout second

Set to boot the default Operating System after second seconds. In the blue-point Linux grub, the default value is timeout 5, which means that the system will be guided in 5 seconds without other commands. If it is set to-1, Linux grub will wait until the user selects an option.

Default num

By default, the option num + 1 is started. That is to say, if default = 0, the operating system of the first line of the menu is started by default. If default = 1, the system of the second line is started, and so on.

Splash pathname/filename

Specifies the path and file name of the file on the boot screen. For example, splash/boot/logo/800x600x8. img indicates the 800x600. imgfile used in the/boot/logo path as the boot screen.

Title OSname title

The subsequent characters are the options you see in the menu. You can write the Linux grub operating system name and description, for example, using title BluePoint Linux, single Mode indicates that this option is the Single-user Mode that directs the blue-dot Linux. The following describes the meanings of several boot options based on the two system boot descriptions.

Title BluePoint Linux, Default Mode

Root (hd0, 1)

Kernel/boot/vmlinuz vga = auto root =/dev/hda2

Hd0 refers to the first hard disk (primary hard disk) (hd0, 1) refers to the second partition of the first hard disk. Kernel/boot/vmlinuz indicates that the Linux core path is in/boot/vmlinuz. Vga = auto sets the display mode. root =/dev/hda2 sets the second partition of the first hard disk as the root mount point ("/").

Title Microsoft Windows

Root (hd1, 0)

Chainloader (hd1, 0) + 1

Root (hd1, 0) indicates the first partition of the second hard disk (from the hard disk ).

Chainloader (hd1, 0) + 1 loads data from one slice and then gives the boot permission to it.

The above is an introduction to the Linux grub startup system.

Related Article

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.