In-depth Exploration of dual hard drive and multi-system guidance

Source: Internet
Author: User
Article title: Dual Hard Drive multi-system guidance for in-depth exploration. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
When Linux and Windows systems coexist, the boot process is relatively complex. And may cause some false concepts. For example, some netizens often ask: "Should I use Lilo, Grub, or nt OS Loader to Guide XXX Linux ?"
  
The actual Linux boot path only includes boot software, loots, Grubers, and loadin.exe boot in ms-dosenvironments. Nt OS Loader cannot guide Linux. When we use the "so-called" nt OS Loader to guide Linux, we must use Lilo or Grub in the middle. In another word, if your Linux installation does not install the boot program, but you want to always use a floppy disk to boot the Linux, you will not be able to use the nt OS Loader to boot the Linux.
  
The process of using nt OS Loader to guide Linux should be like this: nt OS Loader-> grub (or lilo)-> Linux.
  
This process is implemented through the following steps:
1. install Grub or Lilo on the MBR or the boot sector of a partition so that it can successfully boot Linux.
2. use the dd command in Linux to read the installed Grub or Lilo and write it in a file. This step is equivalent to backing up Grub or Lilo, then, even if the original Grub or Lilo installation is cleared, you can use the remaining file to implement the same boot process with the nt OS Loader.
3. modify Boot. ini to enable the nt OS Loader to Boot the Grub or Lilo just read.
  
As for what Grub can do when it is guided by the nt OS Loader, you can modify the Menu by referring to your own configuration. the lst file directs him to any supported system or another boot program. You can set the default time to 0 to guide a Linux system. This causes the illusion that the nt OS Loader directly directs the Linux system. It can also let him boot N systems from Linux to Unix and BSD and discharge a long list of systems. I even made the nt OS Loader and Grub cyclically guide each other.
  
In this case, the nt OS Loader and Grub are on the same footing, and they can guide each other, but they have their own skills to support the system. When nt OS Loader leaves Grub, do not want to guide Linux/Unix/BSD; while Grub is very strong, it is also impossible to bypass the nt OS Loader to directly guide the MS NT4/2000/XP/Server2003.
  
But the concept of a system like MS-DOS, Windows9X/Me is blurred. To put it bluntly, such early Microsoft systems can be directly guided by nt OS Loader or Grub. If you have only one MS-DOS/9X/Me on your machine and Grub is installed without nt OS Loader, Grub will direct the system. If you already have nt OS Loader when installing Grub, Grub will guide the system through nt OS Loader. It can even be like this: nt OS Loader on hard disk 1> Grub on hard disk 1> Windows9X/Me/MS-DOS on hard disk 2. (Symbol-> indicates direct guidance)
  
Note the following points:
1. Grub can theoretically boot any nt OS Loader on the same or different hard disks, but on the contrary, it cannot boot Grub on different hard disks with nt OS Loader. Grub on different hard disks means that Grub is installed on a different hard disk than nt OS Loader before it is converted into a file by dd.
2. Grub and Grub can directly guide each other (however, too many times of mutual loop boot will cause memory overflow and crash, even if indirect guidance through nt OS Loader in the middle cannot be avoided, grub seems to have higher requirements on memory than nt OS Loader), but it is not possible between nt OS Loader and nt OS Loader. You can only use Grub to connect two nt OS loaders. This allows indirect mutual guidance. In this way, even if the two nt OS loaders are connected to each other, there will be no error.
3. a Linux on the same machine can be guided by different N Grub instances. However, an NT system cannot be guided by two nt OS loaders. M $ may have something to do later, so that the system of the NT core will be tied to the default nt OS Loader during installation (it can be a cross-hard disk binding ). After the installation is complete, you can only use this nt OS Loader to guide him. Any attempt to boot the NT system from other nt OS Loader will be rejected by an error that cannot find the file.
4. nt OS Loader on hard disk 1> Grub on hard disk 1> MS-DOS on hard disk 2. In this mode of boot, if the last MS-DOS to be booted with Windows3.x, then the MS-DOS although it will start normally, but Windows3.x will be unable to enter properly because of the prompt that the file cannot be found. The solution is to install an nt OS Loader in hard disk 2. It will start smoothly as follows:
  
Nt OS Loader on hard disk 1-> Grub on hard disk 1-> nt OS Loader on hard disk 2-> MS-DOS on hard disk 2-> enter Windows3.x.
  
Finally, for users who want Windows and Linux to coexist on two hard disks, the following suggestions are provided:
First, we recommend that you put all Windows on one hard disk and all Linux on another hard disk. Otherwise, some of the following suggestions may not be implemented.
  
1. the Windows type is redundant in Linux.
This type of Grub can be used as the primary boot program, so that you do not have to care about the location where each boot program is installed. Because Grub only supports all hard disks.
(1) first install all Windows.
(2) install Linux one by one, and install Linux with the Grub version you want.
(3) install Grub on the MBR of the Linux disk during the last Linux installation.
In this way, the Grub menu is displayed after the instance is started. you can select:
1. select any Linux system in the Grub menu.
2. go to the nt OS Loader menu and select any Windows system.
  
2. Linux is redundant in Windows.
This type of boot program can be used as the primary boot program using nt OS Loader. However, because nt OS Loader does not support booting other boot programs across hard disks, Grub must be installed on Windows disks.
(1) when partitioning, you need to specify one more partition at the end of the Windows Disk. the partition size is theoretically 512 bytes. In fact, it is usually used to splitting a few MB (not supported if it is too small ). Format it to FAT or ext.
(2) then install all the systems in the "1," sequence.
(3) after "1,", go to Linux, enter the Grub prompt, and use setup (hdx, x) to install Grub in the new partition after the Windows Disk.
(4) Use the dd command to read the first 512 bytes of the small partition and save the data as a file.
(5) add the file to the startup options of the nt OS Loader.
(6) set the Windows disk as the master boot hard disk.
In this way, the nt OS Loader menu is displayed after the boot, you can choose:
1. select any Windows system in the nt OS Loader menu.
2. go to the Grub menu and select any Linux system.
  
Grub is a flexible software, and nt OS Loader is not stupid. Although the two are lacking in each other, if they are used together, no matter how many hard disks or systems you have, you can design a fast and clean guide solution.

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.