Modify grub. cfg to print the boot information on ubuntu10.04 screen.

Source: Internet
Author: User

 

#

# Do not edit this file

#

# It is automatically generated/Usr/sbin/grub-mkconfigUsing templates

# From/Etc/grub. dAnd settings from/Etc/default/GRUB

#/Usr/sbin/grub-mkconfig read The configuration information in/etc/default/grub, andUse/Etc/grub. D is automatically generated as a template.

 

### Begin/etc/grub. d/00_header ###

If [-S$ Prefix/grubenv]; Then

Load_env

Fi

Set default = "0"

If [$ {prev_saved_entry}]; then

Set saved_entry =$ {prev_saved_entry}

Save_env saved_entry

Set prev_saved_entry =

Save_env prev_saved_entry

Set boot_once = true

Fi

 

Function savedefault {

If [-Z $ {boot_once}]; then

Saved_entry =$ {chosen}

Save_env saved_entry

Fi

}

 

Function recordfail {

Set recordfail = 1

If [-N $ {have_grubenv}]; then if [-Z $ {boot_once}]; then save_env recordfail; FI

}

Insmod ext2

Set root = '(hd0, 1 )'

Search -- no-floppy -- FS-UUID -- set d98561c1-62af-4753-b6f0-fbcfcb6a7541

IfLoadfont/usr/share/GRUB/Unicode. pf2; ThenThe font file to load.

Set gfxmode = 640x480 GFX mode is 640*480

Insmod gfxterm

Insmod VBE

IfTerminal_output gfxterm; Then true; else

# For backward compatibility with versions of terminal. MOD that don't

# Understand terminal_output

Terminal gfxterm

Fi

Fi

Insmod ext2

Set root = '(hd0, 1 )'

Search -- no-floppy -- FS-UUID -- set d98561c1-62af-4753-b6f0-fbcfcb6a7541

Set locale_dir = ($ root)/boot/GRUB/localeLocalized file directory

Set lang = The en language is English

Insmod gettext

If [$ {recordfail} = 1]; then

Set timeout =-1

Else

Set timeout = 10

Fi

### End/etc/grub. d/00_header ###

 

### Begin/etc/grub. d/05_debian_theme ###

Set menu_color_normal = white/black

Set menu_color_highlight = Black/light-gray

### End/etc/grub. d/05_debian_theme ###

 

### Begin/etc/grub. d/10_linux ###

Menu item

Menuentry'Ubuntu, with Linux 2.6.32-21-generic' -- class Ubuntu -- class GNU-Linux -- class GNU -- class OS {

Recordfail

Insmod ext2

Set root = '(hd0, 1 )'

Search -- no-floppy -- FS-UUID -- set d98561c1-62af-4753-b6f0-fbcfcb6a7541

Linux/boot/vmlinuz-2.6.32-21-generic root = UUID = d98561c1-62af-4753-b6f0-fbcfcb6a7541RO quiet

I will remove the splash here. In this way, the start information is displayed.

Initrd/boot/initrd. img-2.6.32-21-generic

}

Menuentry 'ubuntu, with Linux 2.6.32-21-generic (recovery mode) '-- class Ubuntu -- class GNU-Linux -- class GNU -- class OS {

Recordfail

Insmod ext2

Set root = '(hd0, 1 )'

Search -- no-floppy -- FS-UUID -- set d98561c1-62af-4753-b6f0-fbcfcb6a7541

Echo 'loading Linux 2.6.32-21-generic ...'

Linux/boot/vmlinuz-2.6.32-21-generic root = UUID = d98561c1-62af-4753-b6f0-fbcfcb6a7541 RoSingle

Recovery mode: single-user mode.

Echo 'loading initial ramdisk... 'ramdisk? What is output?

Initrd/boot/initrd. The img-2.6.32-21-generic is the same file as when it is started normally.

}

### End/etc/grub. d/10_linux###

 

EndETC/grub. d/10_linux

Enable/Etc/grub. d/20_memtest86 +


### Begin/etc/grub. d/20_memtest86 +###

Menuentry "Memory Test (memtest86 + )"{

Insmod ext2

Set root = '(hd0, 1 )'

Search -- no-floppy-- FS-UUID -- set d98561c1-62af-4753-b6f0-fbcfcb6a7541

Linux16/boot/memtest86 +. Bin

}

Menuentry "Memory Test (memtest86 +, serial console 115200 )"{

Insmod ext2

Set root = '(hd0, 1 )'

Search -- no-floppy -- FS-UUID -- set d98561c1-62af-4753-b6f0-fbcfcb6a7541

Linux16/boot/memtest86 +. Bin console = ttys0, 115200n8

}

### End/etc/grub. d/20_memtest86 + ###

 

### Begin/etc/grub. d/30_os-prober ###

If [$ {timeout }! =-1]; then

If keystatus; then

If keystatus -- shift; then

Set timeout =-1

Else

Set timeout = 0

Fi

Else

If sleep -- interruptible 3; then

Set timeout = 0

Fi

Fi

Fi

### End/etc/grub. d/30_os-prober ###

 

### Begin/etc/grub. d/40_custom ###You can add menu items as needed.

# This file provides an easy way toDd custom menu entries.Simply type

# Menu entries you want to add after this comment. Be careful not to change

#The 'exec tail' line above.

### End/etc/grub. d/40_custom ###

 

 

 

========================================================== ============================

Today, I found an article on July 22, April 22.

Http://soft.zdnet.com.cn/software_zone/2007/1011/545493.shtml

How to Set VGA in advanced GRUB: zdnet software channel time: 2007-10-11 Author: saide.com technical community | saide.com technical community I would like to comment on ( )
Keywords:In VGA grub Linux. add the VGA parameter at the end of the kernel in the conf startup list. For example, if you set the TTY resolution to (800x600x65536), the TTY resolution given by the default kernel is very limited, the solution is to pass the VGA parameter to the kernel.

  1. How to Set LILO    Lilo: Linux VGA = 318 will start the 1024x768x24bpp mode. The following is the encoding of common resolution + color.

 

Color 640x400 640x480 800x600 1024x768 1280x1024 1600x1200
4 bits ? ? Zero X 302 ? ? ?
8 bits Zero X 300 Zero X 301 Zero X 303 Zero X 305 Zero X 307 0x31c
15 bits ? Zero X 310 Zero X 313 Zero X 316 Zero X 319 0x31d
16 bits ? Zero X 311 Zero X 314 Zero X 317 0x31a 0x31e
24 bits ? Zero X 312 Zero x 315 Zero X 318 0x31b 0x31f
32 bits ? ? ? ? ? ?

 

If you want to set it to 1024x768x24bpp by default, you can modify/etc/Lilo. conf, add the following statement: VGA = 0x318, save and quit, and restart. 2. setting methods in grub    Add the VGA parameter at the end of the kernel in the grub. conf startup list. For example, set the TTY resolution to (800x600x65536)

cat /etc/GRUB.conf
# GRUB.conf generated by anaconda
#
# Note that you do not have to rerun GRUB after making changes to this file
# NOTICE:  You have a /boot partition.  This means that
#          all kernel and initrd paths are relative to /boot/, eg.
#          root (hd0,0)
#          kernel /vmlinuz-version ro root=/dev/sda3
#          initrd /initrd-version.img
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,0)/GRUB/splash.xpm.gz
hiddenmenu
title Red Hat Enterprise Linux AS (2.6.9-22.EL)
        root (hd0,0)
        kernel /vmlinuz-2.6.9-22.EL ro root=LABEL=/ Vga=788
        initrd /initrd-2.6.9-22.EL.img
The following lists common parameters
Linux video = vga16 (640x480X16) <--- default parameter, supports the most common hardware :)
VGA = 769 (640x480x256)
VGA = 771 (800x600x256)
VGA = 788 (800x600x645536)
VGA = 773 (1024x768x256)
VGA = 791 (1024x768x65536)

 

After modification and zhcon (http://sourceforge.net/projects/zhcon) or CCE (http://sourceforge.net/projects/cce2k/) more perfect.

(Large resolution + Chinese display + Chinese Input)

The following is a list of all resolutions:

 

# VESA framebuffer console @ 1024x768x64k Vga = 791 # Normal Vga console # Vga = normal # VESA framebuffer console @ 1024x768x64k # Vga=791 # VESA framebuffer console @ 1024x768x32k # Vga=790 # VESA framebuffer console @ 1024x768x256 # Vga=773 # VESA framebuffer console @ 800x600x64k # Vga=788 # VESA framebuffer console @ 800x600x32k # Vga=787 # VESA framebuffer console @ 800x600x256 # Vga=771 # VESA framebuffer console @ 640x480x64k # Vga=785 # VESA framebuffer console @ 640x480x32k # Vga=784 # VESA framebuffer console @ 640x480x256 # Vga=769

 

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.