Remove unnecessary Ubuntu startup options

Source: Internet
Author: User

Ubuntu10.04:

Modify the grub. cfg file instead of the menu. LST file.

Sudo Vim/boot/GRUB/grub. cfg

I blocked the startup Item of window 7. The file content is as follows:

#
# Do not edit this file
#
# It is automatically generated by/usr/sbin/grub-mkconfig using templates
# From/etc/grub. D and settings from/etc/default/GRUB
#

### 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, 8 )'
Search -- no-floppy -- FS-UUID -- set eb174937-50bb-4f69-a112-2d92c7630470
If loadfont/usr/share/GRUB/Unicode. pf2; then
Set gfxmode = 640x480
Insmod gfxterm
Insmod VBE
If terminal_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, 8 )'
Search -- no-floppy -- FS-UUID -- set eb174937-50bb-4f69-a112-2d92c7630470
Set locale_dir = ($ root)/boot/GRUB/locale
Set lang = ZH
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/06_os-prober ###
# Menuentry "Windows 7 (loader) (on/dev/sda1 )"{
# Insmod NTFS
# Set root = '(hd0, 1 )'
# Search -- no-floppy -- FS-UUID -- set a09e9f229e9ef050
# Chainloader + 1
#}
### End/etc/grub. d/06_os-prober ###

### Begin/etc/grub. d/10_linux ###
Menuentry 'ubuntu, Linux 2.6.32-38-generic '-- class Ubuntu -- class GNU-Linux -- class GNU -- class OS {
Recordfail
Insmod ext2
Set root = '(hd0, 8 )'
Search -- no-floppy -- FS-UUID -- set eb174937-50bb-4f69-a112-2d92c7630470
Linux/boot/vmlinuz-2.6.32-38-generic root = UUID = eb174937-50bb-4f69-a112-2d92c7630470 Ro quiet splash
Initrd/boot/initrd. img-2.6.32-38-generic
}
Menuentry 'ubuntu, Linux 2.6.32-38-generic (recovery mode) '-- class Ubuntu -- class GNU-Linux -- class GNU -- class OS {
Recordfail
Insmod ext2
Set root = '(hd0, 8 )'
Search -- no-floppy -- FS-UUID -- set eb174937-50bb-4f69-a112-2d92c7630470
Echo 'Load Linux 2.6.32-38-generic ...'
Linux/boot/vmlinuz-2.6.32-38-generic root = UUID = eb174937-50bb-4f69-a112-2d92c7630470 Ro single

Echo 'Load And initialize the memory disk ...'
Initrd/boot/initrd. img-2.6.32-38-generic
}
Menuentry 'ubuntu, Linux 2.6.32-21-generic '-- class Ubuntu -- class GNU-Linux -- class GNU -- class OS {
Recordfail
Insmod ext2
Set root = '(hd0, 8 )'
Search -- no-floppy -- FS-UUID -- set eb174937-50bb-4f69-a112-2d92c7630470
Linux/boot/vmlinuz-2.6.32-21-generic root = UUID = eb174937-50bb-4f69-a112-2d92c7630470 Ro quiet splash
Initrd/boot/initrd. img-2.6.32-21-generic
}
Menuentry 'ubuntu, Linux 2.6.32-21-generic (recovery mode) '-- class Ubuntu -- class GNU-Linux -- class GNU -- class OS {
Recordfail
Insmod ext2
Set root = '(hd0, 8 )'
Search -- no-floppy -- FS-UUID -- set eb174937-50bb-4f69-a112-2d92c7630470
Echo 'Load Linux 2.6.32-21-generic ...'
Linux/boot/vmlinuz-2.6.32-21-generic root = UUID = eb174937-50bb-4f69-a112-2d92c7630470 Ro single

Echo 'Load And initialize the memory disk ...'
Initrd/boot/initrd. img-2.6.32-21-generic
}
### End/etc/grub. d/10_linux ###

### Begin/etc/grub. d/20_memtest86 + ###
Menuentry "Memory Test (memtest86 + )"{
Insmod ext2
Set root = '(hd0, 8 )'
Search -- no-floppy -- FS-UUID -- set eb174937-50bb-4f69-a112-2d92c7630470
Linux16/boot/memtest86 +. Bin
}
Menuentry "Memory Test (memtest86 +, serial console 115200 )"{
Insmod ext2
Set root = '(hd0, 8 )'
Search -- no-floppy -- FS-UUID -- set eb174937-50bb-4f69-a112-2d92c7630470
Linux16/boot/memtest86 +. Bin console = ttys0, 115200n8
}
### End/etc/grub. d/20_memtest86 + ###

### Begin/etc/grub. d/30_os-prober.old ###
# Menuentry "Windows 7 (loader) (on/dev/sda1 )"{
# Insmod NTFS
# Set root = '(hd0, 1 )'
# Search -- no-floppy -- FS-UUID -- set a09e9f229e9ef050
# Chainloader + 1
#}
### End/etc/grub. d/30_os-prober.old ###

### Begin/etc/grub. d/40_custom ###
# This file provides an easy way to add 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 ###

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.