For Ubuntu and XP, grub2 is set to XP by default.

Source: Internet
Author: User
For Ubuntu and XP dual-system grub2, when the default startup item is set to XP and the dual-system is installed, you will always want to enable a system to start by default. after Ubuntu and XP dual-system are installed, when the system is started, the Ubuntu system is started by default. what should I do if I want XP to be started by default ?... For Ubuntu and XP dual-system grub2, when the default startup item is set to XP and the dual-system is installed, you will always want to enable a system to start by default. after Ubuntu and XP dual-system are installed, when the system is started, the Ubuntu system is started by default. what should I do if I want XP to be started by default? In the early Ubuntu system, the boot manager used grub. to modify the default boot system, you only need to modify the menu under/boot/grub. lst is enough, but grub2 is used in later Ubuntu systems, while grub2 has no menu. the lst file. Www.2cto.com grub2 consists of the/etc/default/grub file and/etc/grub. d folder, and/boot/grub. cfg file. grub is used in the boot menu when the computer is started. cfg file. How can we understand the relationship between these three parts? In my opinion, after we execute the update-grub (update startup menu) command, the system will follow the/etc/default/grub file and/etc/grub. d folder content generation/boot/grub/directory grub. cfg file, so when the/etc/default/grub file and/etc/grub. d. After the folder is modified, run update-grub and grub. the content of the cfg file is changed or updated. /Etc/default/grub file ---- contains the default start item and countdown time of the boot/etc/grub. the d folder ------- contains various startup items, as shown in the following 00_header 10_linux 30-o-prober README05_debian_theme 20_memtest86 + 40_custom. among them, 30-oss-prober is the startup item of the Windows system, note that each file has a number before it, and the grub generated after update-grub is executed. in the cfg file, the smaller the number, the more advanced it is, that is, the more advanced it is in the startup menu. As mentioned above, the Linux system will be at the top of the boot menu. The following describes three methods for modification. 1. directly modify the grub. cfg file [root ~] # Sudo gedit/boot/grub. cfg ### BEGIN/etc/grub. d/*** ### menuentry "...... "{......} ### END/etc/grub. d/*** ### each item represents each startup item. the higher the position, the higher the Start menu. The set default = "0" in row 12th indicates the default option, that is, the initial option of the cursor selected during startup. Note that the subscript of the item starts from 0, for example, in grub. in cfg, the position of the XP system is the fifth startup item (the simple check method is to check that there are several menuentry "...... "), Set default =" 0 "to set default =" 4 "54th rows (may be different). set timeout = 5 indicates the countdown time, and 5 indicates 5 seconds. After the modification, save the modification and review the effect. The disadvantage is that the update-grub will be restored to its original state, and the system will often execute the update-grub command during installation and update, therefore, this modification method is not recommended. Www.2cto.com 2. modify/etc/default/grub. d [root ~] # Sudo cd/etc/grub. d [root ~] # Ls now we can see 00_header 10_linux 30-o-prober README05_debian_theme 20_memtest86 + 40_custom (this is in my system, you may not) [root ~] # Mv 30_os-prober 06_os-prober (30_os-prober to 06_os-prober) [root ~] # Update-grub: enable grub. cfg will see that the XP system is already at the top. this method is simple, and no matter how many update-grub operations are performed in the future, the XP system items will always be ranked first. we recommend that you use this method. 3. modify/etc/default/grub [root ~] # Sudo gedit/etc/default/grub modify GRUB_DEFAULT = 0 (select the default position where the cursor is located, as shown in this case, if the XP system is in the 5th-bit menu item, modify it to GRUB_DEFAULT = 4) GRUB_TIMEOUT = 5 (countdown time), save it, and update-grub again. this method is used to directly modify the initial position of the selected cursor, however, if there are several more items before the xp items (such as after updating the kernel), it will not work. This method is not recommended. How to change the default item wait time [root ~] # Sudo gedit/boot/grub. cfg convert timeout =? Set the value you want to change.
 

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.