The configuration file of GRUB
The GRUB configuration file is located in /boot/grub/grub.conf ou /boot/grub/menu.lst
Example of a standard configuration
In general the structure of /boot/grub/grub.conf or /boot/grub/menu.lst is as follows (Don't take into account the existing comments).
default N timeout sec color color1 color2 # Configuration for the OS on which Grub is installed title The OS label root (hd<disc>,<partition>) kernel /boot/vmlinuz-2.x.x.xx root=/dev/hdLN options initrd /boot/initrd.img-2.x.x.xx # From here to edit for other OS # For GNU/Linux # For each OS added in Grub add it to write the next block title The additional OS label root (hd<disc>,<partition>) kernel /boot/vmlinuz-2.x.x.xx root=/dev/hdLN options initrd /boot/initrd.img-2.x.x.xx rootnoverify (hd<disc>,<partition>) #For Windows title The OS label root (hd<disc>,<partition>) chainloader +1
- default N - is the system that starts by default with the bootloader dual boot system
- sec timeout - the timeout in seconds before the automatic startup
- color color1 color2 - The background color
<disc> and <partition>and are numbered from zero, so there is no hda, hda1, etc. ..
- 1st partition of 1st disk (hd0, 0)
- 2nd partition of 1st disk (hd0, 1)
- First partition 2nd disk (hd1, 0)
- title - is a label that is displayed in the GRUB boot
Ex: Debian GNU/Linux, kernel 18.104.22.168
Activating a partition as boot partition.
kernel /boot/vmlinuz-2.x.x.xx root=/dev/hdLN options
Loading the kernel:
- If the partition contains activated at startup contains / boot (thus a dedicated partition), use:
kernel /vmlinuz-2.x.x.xx root=/dev/hdLN options
the root=/dev/hdLN argument means the root system
L is a letter representing the disc (a for the first disk, b for second, etc. .., and N is the partition number)
ro for read-only
mem = 'size'
Here is a link : www.tldp.org/HOWTO/BootPrompt-HOWTO.html
The kernel mounts a temporary root system using a compressed image
- If the partition activated at startup contains / boot (thus a dedicated partition), use:
Activation of the boot partition but without mounting it
Use it for the OS for which we must add the configuration file.
Loading a file or blocks that act as secondary loader
Used to activate Windows.
When partitioning the drive, note on a piece of paper all the manipulation performed. It can be used to edit the Grub configuration file later.
Some systems use vmlinuz to refer to the kernel. In fact it is a symbolic link to the kernel.
Similarly initrd will be a symbolic linkfor initrd.img-2.xxxx.
To know which version of the OS kernel :
To see which kernel points to vmlinuz
ls -l /boot/vmlinuz
Grub also has a small shell that can be used to test the commands you want to put in the configuration file.
- To find out about Grub commands at startup you must press the C button and type "help" in the mini shell.
- To get help for any command you must type help + command
- To edit the file make use of a text editor in graphics mode (gedit, kedit, kwrite, xemacs) or in console mode editor (vi, vim, emacs, mc)
- GRUB - The structure of configuration file
- Winscp configuration file - How-To - FTP
- File structure of dos - Articles
- Full recovery of files and folder structure - How-To - Software
- What is the general rule for configuring the initial size of a paging file? - How-To - Windows
- Configuring proxy through batch file ✓ - Forum - Internet/Social Networks