Use win7 to guide grub4dos and grub to guide win7

Source: Internet
Author: User

In the past, it was easy to use grub4dos in Windows XP to guide Linux. Just change boot. ini. Now I have switched to Windows 7, but the result is even more troublesome.

 

The basic steps are as follows:

  1. Download grub4dos: https://gna.org/projects/grub4dos/
  2. Copy grldr. MBR and grldr to C :/
  3. Use bcdedit to add a bootsector type BCD startup Item and run grldr. MBR.
  4. At startup, grldr. MBR searches for grldr in each partition and Loads

For details, see:
Http://bbs.znpc.net/viewthread.php? Tid = 2300 & extra = & page = 1
Http://grub4dos.sourceforge.net/wiki/index.php/grub4dosinstallation and startup

 

But the problem I encountered is even more troublesome: My win7 was activated using grldr simulation bios!

 

That is to say, the content in MBR is grldr. MBR, and C:/has a grldr, but the grldr is customized, contains BIOS information, and comes with menu. LST, which cannot be overwritten or modified.

 

After various attempts, we finally found a solution: Modify grldr. MBR with a hexadecimal editor and replace all grldr with gdldr. Rename the grldr of grub4dos to gdldr and place it under C. In this way, when Windows 7 is started, select the grldr. MBR menu to find and load gdldr. In this way, Windows 7 activated with grldr can no longer use grldr to guide Linux.

 

You can refer to the following two figures:

 

1. If grldr. MBR is not modified and only the conventional method is used, it will fall into an endless loop:

 

2. Modify grldr. MBR to successfully exit the endless loop:

 

There is also the writing of menu. lst. Because I want to be able to access grub in the Windows boot menu, and go back to windows in the GRUB menu. To Boot Windows XP in grub, we only need to write as follows:

Title Windows XP <br/> rootnoverify (hd0, 0) <br/> chainloader + 1

However, since Vista, The Boot manager for Windows has changed from ntldr to bootmgr, And the menu. lst statement should also be as follows:

Title Windows 7 <br/> ACPI <br/> fallback 1 <br/> root (hd0, 0) <br/> chainloader/bootmgr

 

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.