Windows and Ubuntu are enabled by default.

Source: Internet
Author: User
Because too many times of updating the kernel of UbuntuLinux are involved, the startup information of multiple kernels is included in the file. So simply put WindowsXP to the first position, because the first one is started by default. Under setdefault = "0" is the/etc/grub. cfg # DONOTEDITTHISFILE # Itisautomaticallygenerated of Ubuntu10.04 on my desktop

Because the Ubuntu Linux kernel has been updated too many times, the startup information of many kernels is in the file.

So simply put Windows XP in the first place, because

The first one is started by default.

Set default = "0"


Below is the/etc/grub. cfg of Ubuntu 10.04 on my desktop

#

# 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, 14 )'

Search -- no-floppy -- fs-uuid -- set 2d78a415-57ce-48d8-88f8-638bdef7e281

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, 12 )'

Search -- no-floppy -- fs-uuid -- set 3c5a19f0-a474-4895-a069-f42763c91fe7

Set locale_dir = ($ root)/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 ### header settings

### BEGIN/etc/grub. d/05_debian_theme ### set the topic

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 ### start linux settings

Menuentry "Microsoft Windows XP Professional (on/dev/sda1 )"{

Insmod ntfs

Set root = '(hd0, 1 )'

Search -- no-floppy -- fs-uuid -- set 98643d6b643d4d6e

Drivemap-s (hd0) $ {root}

Chainloader + 1

}

Menuentry 'ubuntu, Linux 2.6.32-27-generic '-- class Ubuntu -- class gnu-linux -- class gnu -- class OS {

Recordfail

Insmod ext2

Set root = '(hd0, 12 )'

Search -- no-floppy -- fs-uuid -- set 3c5a19f0-a474-4895-a069-f42763c91fe7

Linux/vmlinuz-2.6.32-27-generic root = UUID = 2d78a415-57ce-48d8-88f8-638bdef7e281 ro quiet splash

Initrd/initrd. img-2.6.32-27-generic

}

Menuentry 'ubuntu, Linux 2.6.32-27-generic (recovery mode) '-- class Ubuntu -- class gnu-linux -- class gnu -- class OS {

Recordfail

Insmod ext2

Set root = '(hd0, 12 )'

Search -- no-floppy -- fs-uuid -- set 3c5a19f0-a474-4895-a069-f42763c91fe7

Echo 'Load Linux ...'

Linux/vmlinuz-2.6.32-27-generic root = UUID = 2d78a415-57ce-48d8-88f8-638bdef7e281 ro single

Echo 'Load the boot virtual disk ...'

Initrd/initrd. img-2.6.32-27-generic

}

Menuentry 'ubuntu, Linux 2.6.32-26-generic '-- class Ubuntu -- class gnu-linux -- class gnu -- class OS {

Recordfail

Insmod ext2

Set root = '(hd0, 12 )'

Search -- no-floppy -- fs-uuid -- set 3c5a19f0-a474-4895-a069-f42763c91fe7

Linux/vmlinuz-2.6.32-26-generic root = UUID = 2d78a415-57ce-48d8-88f8-638bdef7e281 ro quiet splash

Initrd/initrd. img-2.6.32-26-generic

}

Menuentry 'ubuntu, Linux 2.6.32-26-generic (recovery mode) '-- class Ubuntu -- class gnu-linux -- class gnu -- class OS {

Recordfail

Insmod ext2

Set root = '(hd0, 12 )'

Search -- no-floppy -- fs-uuid -- set 3c5a19f0-a474-4895-a069-f42763c91fe7

Echo 'Load Linux ...'

Linux/vmlinuz-2.6.32-26-generic root = UUID = 2d78a415-57ce-48d8-88f8-638bdef7e281 ro single

Echo 'Load the boot virtual disk ...'

Initrd/initrd. img-2.6.32-26-generic

}

Menuentry 'ubuntu, Linux 2.6.32-25-generic '-- class Ubuntu -- class gnu-linux -- class gnu -- class OS {

Recordfail

Insmod ext2

Set root = '(hd0, 12 )'

Search -- no-floppy -- fs-uuid -- set 3c5a19f0-a474-4895-a069-f42763c91fe7

Linux/vmlinuz-2.6.32-25-generic root = UUID = 2d78a415-57ce-48d8-88f8-638bdef7e281 ro quiet splash

Initrd/initrd. img-2.6.32-25-generic

}

Menuentry 'ubuntu, Linux 2.6.32-25-generic (recovery mode) '-- class Ubuntu -- class gnu-linux -- class gnu -- class OS {

Recordfail

Insmod ext2

Set root = '(hd0, 12 )'

Search -- no-floppy -- fs-uuid -- set 3c5a19f0-a474-4895-a069-f42763c91fe7

Echo 'Load Linux ...'

Linux/vmlinuz-2.6.32-25-generic root = UUID = 2d78a415-57ce-48d8-88f8-638bdef7e281 ro single

Echo 'Load the boot virtual disk ...'

Initrd/initrd. img-2.6.32-25-generic

}

Menuentry 'ubuntu, Linux 2.6.32-24-generic '-- class Ubuntu -- class gnu-linux -- class gnu -- class OS {

Recordfail

Insmod ext2

Set root = '(hd0, 12 )'

Search -- no-floppy -- fs-uuid -- set 3c5a19f0-a474-4895-a069-f42763c91fe7

Linux/vmlinuz-2.6.32-24-generic root = UUID = 2d78a415-57ce-48d8-88f8-638bdef7e281 ro quiet splash

Initrd/initrd. img-2.6.32-24-generic

}

Menuentry 'ubuntu, Linux 2.6.32-24-generic (recovery mode) '-- class Ubuntu -- class gnu-linux -- class gnu -- class OS {

Recordfail

Insmod ext2

Set root = '(hd0, 12 )'

Search -- no-floppy -- fs-uuid -- set 3c5a19f0-a474-4895-a069-f42763c91fe7

Echo 'Load Linux ...'

Linux/vmlinuz-2.6.32-24-generic root = UUID = 2d78a415-57ce-48d8-88f8-638bdef7e281 ro single

Echo 'Load the boot virtual disk ...'

Initrd/initrd. img-2.6.32-24-generic

}

Menuentry 'ubuntu, Linux 2.6.32-21-generic '-- class Ubuntu -- class gnu-linux -- class gnu -- class OS {

Recordfail

Insmod ext2

Set root = '(hd0, 12 )'

Search -- no-floppy -- fs-uuid -- set 3c5a19f0-a474-4895-a069-f42763c91fe7

Linux/vmlinuz-2.6.32-21-generic root = UUID = 2d78a415-57ce-48d8-88f8-638bdef7e281 ro quiet splash

Initrd/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, 12 )'

Search -- no-floppy -- fs-uuid -- set 3c5a19f0-a474-4895-a069-f42763c91fe7

Echo 'Load Linux ...'

Linux/vmlinuz-2.6.32-21-generic root = UUID = 2d78a415-57ce-48d8-88f8-638bdef7e281 ro single

Echo 'Load the boot virtual disk ...'

Initrd/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, 12 )'

Search -- no-floppy -- fs-uuid -- set 3c5a19f0-a474-4895-a069-f42763c91fe7

Linux16/memtest86 +. bin

}

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

Insmod ext2

Set root = '(hd0, 12 )'

Search -- no-floppy -- fs-uuid -- set 3c5a19f0-a474-4895-a069-f42763c91fe7

Linux16/memtest86 +. bin console = ttyS0, 115200n8

}

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

 


### BEGIN/etc/grub. d/30_os-prober ### OS search?

# Xp previusly here

Menuentry "linux (on/dev/sda11 )"{

Insmod ext2

Set root = '(hd0, 9 )'

Search -- no-floppy -- fs-uuid -- set 98fac466-8cb2-4b90-ba14-57c86b67a63c

Linux/vmlinuz BOOT_IMAGE = linux root = UUID = ed3c6553-966e-467e-b199-1f96b234340a

Initrd (hd0, 8)/initrd. img

}

Menuentry "failsafe (on/dev/sda11 )"{

Insmod ext2

Set root = '(hd0, 9 )'

Search -- no-floppy -- fs-uuid -- set 98fac466-8cb2-4b90-ba14-57c86b67a63c

Linux/vmlinuz BOOT_IMAGE = failsafe root = UUID = ed3c6553-966e-467e-b199-1f96b234340a failsafe

Initrd (hd0, 8)/initrd. img

}

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

### 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 ###

Related Article

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.