Ubuntu9.10 explanation of grub. cfg

Source: Internet
Author: User

From waiting for s blog

Grub. cfg is read-only by default. It must be set to writable before modification.
Sudo chmod + w/boot/grub. cfg
Set default = 0
# The default value is 0.
Insmod jpeg
# Add jpg support. To use a png or tga file as the background, add insmod png or insmod tga.
Insmod ext2
# In addition to partitions used for startup, other partition formats can be added under the menu
Set root = (hd0, 7)
# Set the root Partition
Search-no-floppy-fs-uuid-set f255285a-5ad4-4eb8-93f5-4f767190d3b3
# Set the uuid = *** to the root partition, which is the same as the previous sentence and can be deleted.
# Terminal Configuration
If loadfont/usr/share/grub/unicode. pf2; then
# Set the terminal font. unicode. pf2 supports Chinese display
Set gfxmode = 640x480

# Sets the resolution. The default value is 640 × 480. The resolution can be 800 × 768 ×. We recommend that you set the image size to the same as the image size.
Insmod gfxterm
# Insert the gfxterm module, which supports Chinese display and 24-bit Images
Insmod vbe
# Insert the vbe module. GRUB 2 introduces many modules. to use it, you need to add them here.
If terminal_output gfxterm; then true; else
# For backward compatibility with versions of terminal. mod that don't
# Understand terminal_output
Terminal gfxterm
# Set the GRUB 2 terminal to gfxterm
Fi
Fi
Set timeout = 10
Background_image (hd0, 7)/boot/images/1.jpg
# Setting background images
### END/etc/grub. d/00_header ###
### BEGIN/etc/grub. d/05_debian_theme ###
Set menu_color_normal = white/black
Set menu_color_highlight = cyan/black
# The color settings of the menus in Debian. By default, you will find that the background is completely blocked by blue. You need to change blue to black, so that the background will appear.
### END/etc/grub. d/05_debian_theme ###
# 10_linux is the automatically added linux boot item for the current root Partition
### BEGIN/etc/grub. d/10_linux ###
# The menu items must contain menuentry double quotation marks (") and braces {}. Otherwise, the menu is not displayed.
Menuentry "Ubuntu, Linux 2.6.31-9-386 ″{
Insmod ext2
Set root = (hd0, 7)
Search-no-floppy-fs-uuid-set f255285a-5ad4-4eb8-93f5-4f767190d3b3
# This statement is repeated with set root = (hd0, 7) and can be deleted.
Linux/boot/vmlinuz-2.6.31-9-386 root = UUID = f255285a-5ad4-4eb8-93f5-4f767190d3b3 ro quite splash
# Do not like to see a long string, roo = UUID = *** can be replaced by root =/dev/sda7
Initrd/boot/initrd. img-2.6.31-9-386
}
### END/etc/grub. d/10_linux ###
### BEGIN/etc/grub. d/20_memtest86 + ###
Menuentry "Memory test (memtest86 + )"{
Linux16/boot/memtest86 +. bin
}
### END/etc/grub. d/20_memtest86 + ###
# Automatically add system boot items that exist in other partitions
### BEGIN/etc/grub. d/30_os-prober ###
# Windows Startup Menu
Menuentry "Windows Vista (loader) (on/dev/sda1 )"{
Insmod ntfs
# Change the windows format to ntfs or fat32 to insmod fat
Set root = (hd0, 1)
Search-no-floppy-fs-uuid-set ece067d2e067a196
# Deletable
# Grub2 is more advanced. If you find that windows is started through ntldr, set it to 2000/xp/2003, then drivemap-s (hd0) $ {root} will be added here }, the role is equivalent to the map of grub, and the xp/2003 system of non-first hard disk can be started normally.
Chainloader + 1
}
# Find the linux system on another partition and add it automatically
Menuentry "Ubuntu karmic (development branch) (9.10) (on/dev/sda3 )"{
Insmod ext2
Set root = (hd0, 3)
Search-no-floppy-fs-uuid-set 4d893970-0685-44ed-86b3-1de45b2db84a
Linux/boot/vmlinuz-2.6.31-9-generic root =/dev/sda3
Initrd/boot/initrd. img-2.6.31-9-generic
}
# If macos exists, it will be automatically added here.
### END/etc/grub. d/30_os-prober ###
# The following are manually added menu items
### BEGIN/etc/grub. d/40_custom ###
Menuentry "CDLinux "{
Set root = (hd0, 8)
Linux/CDlinux/bzImage root =/dev/ram0 vga = 791 CDL_LANG = zh_CN.UTF-8
Initrd/CDlinux/initrd
}
### END/etc/grub. d/40_custom ###
# When manually added, the hard disk number starts from 0 (hd0), the primary Partition Number starts from 1 (hd0, 1), and the logical Partition Number starts from 5 (hd0, 5)

 

 


 

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.