A. Boot steps and GRUB
1 Linux START process analysis
( 1 ) BIOS Self-Test
l hardware detection and initialization
l Boot boot Device
( 2 ) boot boot device
l floppy disk ( first sector of 0 tracks)
l disc (outermost storage track)
l Hard Disk ( MBR)
l USB Storage Devices
( 3 ) Call Linux bootloader to In-memory
l Linux Boot program can use Grub/lilo and other boot software
l Grub/lilo can be installed in theboot sector of the MBR/boot partition
( 4 ) Run Linux Kernel
l The kernel is placed in the/boot directory, andLinux systems can support multiple versions of the kernel at the same time
l Unzip the kernel
l Detecting Hardware
l loading The root file system
( 5 ) Execution Init Process ( Press "I" to run one step )
l start a new process or close a process
l Select startup Mode
l set up a virtual terminal
( 6 ) User Login
l Enter user name and password
l To load a user configuration file
l loading shell programs
2 . Creation of the boot disk
Method One : Created during installation
method Two:Mkbootdisk
#mkbootdisk--device/dev/fd0 2.4.20-8
Method Three: using the DD command
# dd If=/boot/vmlinuz of=/dev/fd0
3 . GRUB
( 1 ) GRUB Introduction
GRUB is a powerful boot loader based on the Intel platform
( 2 ) GRUB features
l support for large hard drives, breaking through the limits of the above-surface cylinders
l supports two interface types ( menu, command line )
l Boot Screen
(3) Installing GRUB
l Install packages
#rpm –IVH grub-0.934.i386.rpm
l installing using the Install command GRUB to MBR
#grub
Grub>root (Hdx,y)
Grub>setup (Hdx[,y])
( 4 ) GRUB the configuration
#vi/boot/grub/grub.conf
grub.conf The configuration commands that are commonly used are:
default= menu item Ordinal /saved
Set the default startup item for the boot menu
Hiddenmenu
Hide Menu Interface
splashimage = image file full path name
Specify a file as the background image of the boot menu
timeout= number of seconds delayed
Set startup delay for Start menu
title menu Item Name
Start the configuration of a menu item, set the name of the menu item
Root (Hdx,y)
Set GRUB root device is the partition where the Linux kernel resides
Kernel Kernel file name
Specify the name of the kernel file and the parameters required to load the kernel
initrd initrd file name
Specify the location of the image file
Map (Hdx[,y]) (Hdx[,y])
Establish virtual disks
Rootnoverify (Hdx,y)
Specify the location of the Windows startup bootstrapper
Makeactive
Identifies the specified partition as the active partition
Chainloader +n/ file name
invoking the specified Windows startup file
Password Password /--MD5 Password redaction
Set GRUB boot Menu and menu item password
Lock
using the global Password lock menu item set by password
Savedefault
Saves the current Startup menu item as the default startup
File instance:
# grub-md5-crypt(Generate password for MD5 ciphertext)
# vi/etc/grub.conf
Default=0
Timeout=50
Splashimage= (hd0,0)/grub/splash.xpm.gz
Password--md5 #!dfdasdf34123!#@$!#@
Title RedHat Linux 9.0
Root (hd0,2)
Kernel/vmlinuz-2.4.20-8 ro root=/label=/
Initrd/initrd-2.4.20-8.img
Password Linux
Tile Windows 2000
Rootnoverify (hd0,0)
Chainloader +1
Lock
( 5 ) GRUB of the FAQ
l use of edit mode
option to temporarily modify the menu, in the menu interface by pressing E key to enter
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/3D/F0/wKiom1PF6C_SiDfKAADHEW5U3bg290.jpg "title=" 1.png " alt= "Wkiom1pf6c_sidfkaadhew5u3bg290.jpg"/>
Menu Main interface
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/3D/F0/wKioL1PF6WiAZeMcAAFcUrVD7WQ979.jpg "title=" 2.png " alt= "Wkiol1pf6wiazemcaafcurvd7wq979.jpg"/>
Edit mode
l use of command-line mode
using command-line commands to set GRUB, press the C key in the menu interface to enter
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/3D/F0/wKioL1PF6X_x4dSzAAEgcbxiMYQ370.jpg "title=" 3.png " alt= "Wkiol1pf6x_x4dszaaegcbximyq370.jpg"/>
Command mode
This article from "feng1992" blog, reproduced please contact the author!