Fedora 16 changes the startup sequence and grub2 configuration skills

Source: Internet
Author: User

Address: http://blog.csdn.net/sabalol/article/details/7043313


1. First find Windows menuentry.

#Cat/Boot/grub2/grub. cfg |GrepWindows

 

Result:

 
Menuentry"Windows 7 (loader) (on/dev/sda1 )" -- ClassWindows-- ClassOS{

 

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

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

 

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

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

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.