Windows XP and Ubuntu dual system and grub boot

Source: Internet
Author: User
I have seen some help posts from new users like me about grub guidance after XP and Ubuntu coexist n times. In fact, all the major forums have been introduced by Lin, A few posts can be posted on the system, but the experts may not bother with it. I am here to talk about my experiences based on my practical experience, hoping to help some friends struggling between XP and Linux. [Experts can close their eyes and Flash first :)]

1. If you have a Windows XP system and installed Ubuntu later, [of course, you have to install it successfully. If not, what should you do? :)], But grub is not successfully installed, so a system cannot enter. There are two possible cases:

A // grub lacks menu. lst, but you can directly access the command line. This is the first time I installed RedHat.
Solution:

Guide the XP System
Grub>

Code:
Rootnoverify (hd0, 0) // In general, XP is installed on the C drive. You can also press the tab key to view the partition to obtain the coefficient of the system disk.
Makeactive
Chainloader + 1
Boot

Boot Ubuntu
Grub>

Code:
Root (hdx, Y) // here X is the hard disk sequence. If your Linux is installed on the first hard disk, x = 0; on the second hard disk, X = 1; on the third hard disk, [I first dizzy...], And so on. Y is the partition sequence on the hard disk, which can also be viewed by tab; to obtain the partition sequence for Linux installation;
Kernel/boot/vmlinuz-*** root =/dev/sdaz Ro // here z = Y + 1; *** is the Ubuntu version, which can be completed by pressing the tab key.
Initrd/boot/initrd. IMG-*** [same as above]
Boot

Note: In this case, after entering Ubuntu, you need to create and compile the menu. LST file, as shown in the following figure:

Code:
Default 0 // indicates that the default start is the first title. If you want to set the default start as the second title, do you mean default X? If you do not know this, use XP :(
Timeout 10 // No comments required? [There are a lot of things on the floor... Don't scold me]

Title Ubuntu, kernel BRL. 15-26-386
Root (hd0, 7)
Kernel/boot/vmlinuz-2.6.15-26-386 root =/dev/sda8 Ro quiet splash
Initrd/boot/initrd. img-2.6.15-26-386
Savedefault
Boot

Title Ubuntu, kernel 2.6.15-26-386 (recovery mode)
Root (hd0, 7)
Kernel/boot/vmlinuz-2.6.15-26-386 root =/dev/sda8 Ro single
Initrd/boot/initrd. img-2.6.15-26-386
Boot

Title other operating systems:
Root

Title Microsoft Windows XP Professional
Root (hd0, 0)
Savedefault
Makeactive
Chainloader + 1


The specific parameters are determined by yourself. What? Don't you understand? Inverted... I thought there would be a lot of garbage linuxer like me, so don't look down on yourself :)

B // after it is started, it indicates that grub is incorrect. Grub cannot work properly at all! This situation can be seen in many cases, and it may be difficult to do so.
Solution:

Step 1: repair the legendary MBR.
Is there an XP installation disk? Yes! Good. Start from the XP installation disk and go to the repair console. [Is this correct? The system may prompt you to enter the sequence of the installed XP system, enter a non-zero value, and then the Administrator Password]. Execute fixmbr to repair the Master Boot zone. The following is an example: if you cannot access the XP system disk on the console, You can execute fixroot first, provided that the XP system disk has no serious problems. Any problems are beyond the scope of this post. If you are prompted to restart the boot area after the boot area is repaired successfully, or use the common three-key combination "CTRL + ALT + DEL" on the DOS interface to restart the boot area, you can also say :)

Step 2: Use wingrub in XP to guide ubuntu.
Wingrub has been downloaded in souceforge, and the use of it, it is also silly, there are linuxsir North South and South predecessors -- "The elderly" slightly arrogant post for evidence: http://www.linuxsir.org/bbs/showthread.php? T = 214551
Tip: it is best to install the boot to drive C. INI [XP hidden system files] can be cleared later. If you are a senior, you need to listen to the system files. However, if you learn one of the above posts, this problem will be solved, the post is probably a complete tutorial.

Step 3: Install grub in Ubuntu.
Go to Ubuntu, run sudo Nautilus, and delete the entire/boot/GRUB folder. Of course, back up the folder first! Install grub again:

Code:
Sudo grub-install/dev/SDA // install grub in the MBR Master Boot zone.


Installation takes some time. Please wait. At this time, the installed grub does not have menu. lst. You need to create and compile the menu. LST file by yourself. The method is goto this post 1-A-note.

Step 4: Delete the wingrub startup item under XP.
The GRUB menu installed in Ubuntu. after lst is saved, restart the system. You can smoothly enter XP and delete C:/boot. the last line generated in ini, for example, boot = "C:/***" [name generated when the wingrub program generates the Startup File]; clear the boot file generated by wingrub under the C root directory. :( But surely it is not a hidden file!

OK. What's the problem about installing Ubuntu after installing XP first? Let's discuss it together.

2. After Ubuntu is installed successfully, XP is reinstalled again. Because XP is not known as "weird habits", the MBR Main Boot area must be covered. After the restart, the original GRUB boot will not appear and you can directly access the XP Logon interface. XP completely ignores Linux. In this case, you can go to Step 1-B in this post to Solve the Problem smoothly.

Wingrub is really not as easy as grub in Linux, so it cannot follow the system updates in Linux. Therefore, it is strongly recommended to use grub in Linux to guide dual systems or even multiple systems!

 

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.