A concise tutorial on the GRUB command line boot system _linux

Source: Internet
Author: User
Tags md5 encryption

Today, the server, to modify the grub.conf file caused the system does not come up. Then I learned how to start from the Grub command.

Grub boot is actually pretty simple, just a few simple steps.

First, specify the partition where the/boot is located

Copy Code code as follows:
grub> Root (hd0,0)

#指定第一块硬盘的第一个分区. This root (hd[0,n],y) can be omitted, and if omitted, we will specify in the KERENL command
Second, specify kernel image and root partition
Copy Code code as follows:
grub> kernel/boot/vmlinuz-2.6.11-1.1369_fc4 ro root=label=/

# kernel directive, used to specify the Linux kernel and/or the partition in which it resides
iii. Designation of INITRD.IMG
Copy Code code as follows:
Grub> initrd/boot/initrd-2.6.11-1.1369_fc4.img
# INITRD command line to specify INITRD file

Iv. Launch
Copy Code code as follows:
Grub>boot
#输入boot, then you can hit the carriage.


My grub configuration file on a virtual machine (SUSE10.0):
v. Booting Windows through the GRUB Directive

If we start Windows, just type in the instructions on the line;

For example, Windows partition in (hd0,0), we after the boot, press CTRL + C, into Grub command mode; You can use the following

Copy Code code as follows:

Grub> rootnoverify (hd0,0)
Grub> Chainloader +1
grub> Boot


Attach: Grub Start command Details

One, menu commands
menu commands can only be used in the global configuration section of the grub configuration file and not in the Grub command-line interface, which should be placed before other commands in the configuration file.
1. Default//Set menu item to start
2. Fallback//Set menu items returned after a failed start
3, Hiddenmenu//Hidden Menu interface
4, timeout//Set the menu automatically start the delay time
5. Title//Start a menu item
Ii. General Orders
General commands can be in the configuration file and the grub command-line interface, and the general commands you can use are
1, BOOTP//BOOTP initialization of network equipment
2, Color//Set Menu interface colors
3. Device//Designated device file as drive
4. DHCP Initialize network device with DHCP//
5. Hide//Hide a section
6. Ifconfig//Manually Configure network equipment
7, pager//change the status of the internal page program
8. Partnew//Create a new primary partition
9, PartType//change the type of partition
10, password set the password for the menu interface
11, Rarp///through the RARP initialization of the network settings
12, Serial//Set serial equipment
13, Setkey//Set keyboard mapping
14, Splashimage//Set grub boot background picture file
15, termainal//select terminal type
16. Tftpserver//Designated TFTP server
17. Unhide//Restore a hidden partition
three, command line and menu item commands
Command line and menu item commands can be used in the menu item settings of the GRUB configuration file or in the Grub command interaction interface.
1, bolcklist//show the location of a file partition (Block list notation)
2, boot//boot operating system
3. CAT//Display file contents
4, Chainloader///Start the control of the soft to another boot boot device
5. CMP//Compare two files
6, ConfigFile//loading the existing grub configuration file
7, Debug//set to debug mode
8. DISPLAYAPM//Display APM BIOS information
9, DISPLAYMEM//Display memory configuration
10. Embed//embed stage 1.5 files
11, Find//Look for all the equipment including a file
12. Fstest//test file system
13, Geometry//Display the physical information of a drive
14, Halt//Stop the computer running (software shutdown)
15. Help//Display GRUB Command assistance information
16, Impsprobe//query symmetric multiprocessor (SMP) information
17. INITRD//Loading INITRD file
18. Install//Install Grub
19, Ioprobe//query a drive's input/output (I/O) port
20. Kernel//boot operating system kernel
21, lock//Lock A GRUB Guide menu item so that it can be entered into a password before starting
22. Makeactive//Activate a primary partition
23. Map//virtual map a drive
24, Md5crypt//using MD5 encryption password
25. Module//Loading modules
26, Modulenounzip//Loading module does not extract
27, Pause//pause and wait for key
28. Quit//Exit Grub
29. Reboot//Restart computer
30, read//reading contents in memory
31, root//Set grub root device
32. Rootnoverify//Device grub root device without loading file system
33, Savedefault///Save the current Startup menu item to start by default
34. Setup/Install grub automatically
35, TestLoad//From the file system test read a file
36. TESTVBE//test VESA BIOS EXTENSION
37, Uppermem//forced to set host upper memory size
38, Vbeprobe//query VESA BIOS Extension Information

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.