Fedora 16 changes the startup sequence and grub2 configuration skills

Source: Internet
Author: User

 

This is an example of Windows Startup by default:

 

 

1. First find Windows menuentry.

 

# Cat/boot/grub2/grub. cfg | grep Windows

 

 

Result:

 

Menuentry "Windows 7 (loader) (on/dev/sda1)" -- class windows -- class OS {

 

2. Set Windows as the default startup Item (here you can only use the content in the double quotation marks "" or single quotation marks "in the Command output above)

 

 

# Grub2-set-default "Windows 7 (loader) (on/dev/sda1 )"

 

 

3. Verify the default startup Item

 

 

# Grub2-editenv list

 

Output:

 

Saved_entry = Windows 7 (loader) (on/dev/sda1)

 

 

4. Generate and update grub. cfg (optional)

 

 

 

The following command uses/etc/grub. the automatic configuration script under d and the variables defined in/etc/default/grub automatically generate the GRUB2 configuration file (including the kernel under/boot), and-o specifies the output file, /boot/grub2/grub. cfg is the default configuration file. If it is a multi-system, it will automatically find them and add them to the Startup Menu list.

 

 

 

# Grub2-mkconfig-o/boot/grub2/grub. cfg

 

 

Timeout and background images can be configured in/etc/default/grub.

For example:

 

GRUB_TIMEOUT = 5

GRUB_DISTRIBUTOR = "Fedora"

GRUB_DEFAULT = saved

GRUB_CMDLINE_LINUX = "rd. md = 0 rd. lvm = 0 rd. dm = 0 KEYTABLE = us quiet SYSFONT = latarcyrheb-sun16 rhgb rd. luks = 0 LANG = en_US.UTF-8"

 

GRUB_BACKGROUND =/boot/grub2/background.png

 

GRUB_TERMINAL_OUTPUT = gfxterm

GRUB_THEME =/boot/grub2/mytheme/theme.txt

 

 

Note: The following command sets Fedora as the default startup Item:

 

 

 

# Cat/boot/grub2/grub. cfg | grep Fedora

 

 

Result:

 

Menuentry 'ora ora Linux, with Linux 3.1.2-1. fc16.i686. pae' -- class Fedora -- class OS {

 

Menuentry 'ora ora Linux, with Linux 3.1.1-1. fc16.i686. pae' -- class Fedora -- class OS {

Menuentry 'ora ora Linux, with Linux 3.1.0-7. fc16.i686. pae' -- class Fedora -- class OS {

 

# Grub2-set-default "Fedora Linux, with Linux 3.1.2-1. fc16.i686. PAE"

 

# Grub2-editenv list

 

# Grub2-mkconfig-o/boot/grub2/grub. cfg

 

From A Curious Programmer

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.