Use BootManager to enable both Vista and Linux

Source: Internet
Author: User
Article Title: Use BootManager to enable both Vista and Linux. Linux is a technology channel of the IT lab in China. Some basic categories, such as desktop applications, Linux system management, kernel research, embedded systems, and open-source systems, can implement dual-boot of Windows and Linux by installing Grub on hard disk MBR. Grub has been used for a long time, but Grub has a disadvantage (in fact, it is a disadvantage of Windows) that Grub will be overwritten every time you reinstall Windows. The restoration of Grub requires a good Linux installation CD (such as Debian) or a system repair CD with Grub.
 
In fact, Windows Boot Manager can also start Linux. First, you need to install Grub on a specific Linux partition (instead of a hard disk MBR). Generally, Grub will have this option during installation. You can also manually Mount Grub to a Linux partition. If your linux partition is/dev/hda2, that is, in Grub (hd0, 0 ):
 
# Grub
 
Grub> setup (hd0, 1)
 
......
 
Then read the 512 bytes header of/dev/hda2 and write it to the file linux. boot (the file name can be obtained as needed ).
 
# Dd if =/dev/hda2 of = linux. boot bs = 512 count = 1 and then try to put linux. boot is transferred to a windows partition. It is difficult to write NTFS partitions. A reasonable method is to copy the data to another machine on the network in Linux, or copy the data to a USB flash disk, and then copy the data back to Windows. Assume that linux. boot is copied to C: \ linux. boot.
 
For Windows XP, the next dual-start setting is simple. You can directly edit the C: \ boot. ini file and add the following content:
 
Linux. boot = "Linux"
 
After restarting, you can see the Linux option. The Grub menu appears. However, the configuration of Vista Boot Manager is not that simple. First, run
 
Bcdedit/enum all | find "{ntldr}" If identifier {ntldr} is returned, solution B is used; otherwise, solution A is used. Solution:
 
Bcdedit/create {ntldr}/d "Linux"
 
Bcdedit/set {ntldr} device boot
 
Bcdedit/set {ntldr} path linux. bootbcdedit/displayorder {ntldr}/addlast
 
Solution B (modify the result returned by the First Command ):
 
C:> bcdedit/copy {ntldr}/d "Linux"
 
The entry was successfully copied to {bcfa924e-07e0-11db-9d86-accf6fd346a1 }.
 
C:> bcdedit/set {bcfa924e-07e0-11db-9d86-accf6fd346a1} device boot
 
The operation completed successfully.
 
C:> bcdedit/set {bcfa924e-07e0-11db-9d86-accf6fd346a1} path linux. boot
 
The operation completed successfully.
 
C:> bcdedit/displayorder {bcfa924e-07e0-11db-9d86-accf6fd346a1}/addlast
 
The operation completed successfully.
 
After the restart, you can see the Linux option on the Vista startup interface.
 
Related Article

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.