NT and Linux dual-system full solution

Source: Internet
Author: User
NT and Linux dual-system complete solution-Linux Enterprise Application-Linux server application information, the following is a detailed description. The simplest way for NT to coexist with Linux is to install lilo in the boot area of the linux primary partition when installing lilo in LInux. Then, after the boot disk of win98 is restarted, run fdisk to set the linux primary partition to active. In this way, you can first select lilo when the system is started. If you do not select linux, then, enter the nt loader.

But sometimes you need to use nt loader to guide linux for convenience. The following is the implementation method.

The most important thing you should keep in mind is that many software products will use the only valuable Master Boot Record MBR on the hard disk. NT is like this, there is no choice; Linux is also like this, if you like. The BIOS of the machine executes the information stored in the active partition to initialize the desired operating system.

After NT is installed, the MBR will be changed to a program named NTLDR under the root directory of the active partition. The original MBR will be stored in a small file named BOOTSECT. DOS. After NT is installed, remember to never overwrite the MBR; otherwise, NT will not start. Just in case, NT users need NT Emergency Repair disks (Emergency Repair Disk, ERD ).

After you remember this, you should be aware that when you set LILO, you should install * ** not ** in MBR, but in the root partition of Linux. In this way, NT will not cause problems, and Linux can survive without MBR.

NT guiding process

When NTLDR is started and NT users see "OS Loader V4.xx", It switches the processor to 386 and starts a very small file system. Next, it reads the BOOT. ini file to see if other operating systems exist and displays a selection menu. The following is a typical BOOT. INI:

[Boot loader]
Timeout = 30
Default = multi (0) disk (0) rdisk (0) partition (2) WINNT

[Operating systems]
Multi (0) disk (0) rdisk (0) partition (2) WINNT = "NT V4 is here"
Multi (0) disk (0) rdisk (0) partition (2) WINNT = "NT V4 VGAMODE"/basevideo/sos
C: = "DOS is here"

BOOT. INI consists of two parts. The "boot loader section" section specifies the stay time of the menu on the screen, and the default menu options. The "opearating systems section" section specifies an optional operating system type. You can see that the machine can start NT (in standard mode or VGA safe mode) and DOS. From this example, we can infer that DOS is started from hard disk C: The first partition of the first hard disk), while NT is started from the second partition. During Typical installation, a C: partition will be formatted with the dos fat file system, and NT will be installed in another NTFS (NT File System) partition.

If you choose to start NT and another program NTDETECT. COM, the hardware check starts. If everything works, the NT kernel will be loaded, as we all know.

Let's take a look at the case where NT is not started. In this case, NTLDR needs to know which boot sector is necessary for non-nt OS boot. At this time, the corresponding Boot Sector image must be in a small 512-byte file. For example, to boot DOS, NTLDR will look for a boot sector image file named BOOTSECT. DOS. This image file is generated by the NT installer.

How does one guide Linux? This is simple. All you need is a boot sector image file, which is called BOOTSECT. LIN (you will see how to get this file later ). You must put BOOTSECT. LIN in C: and modify BOOT. INI. In this case, the "operating systems ection" part should look like this:

[Operating systems]
Multi (0) disk (0) rdisk (0) partition (2) WINNT = "NT V4 is here"
Multi (0) disk (0) rdisk (0) partition (2) WINNT = "NT V4 VGAMODE"/basevideo/sos
C: = "DOS is here"
C: BOOTSECT. LIN = "Now Linux is here"

Modify BOOT. INI by using any common ASCII text editor (such as NotePad ). The normal attribute of this file is system-hide-read-only. Therefore, you must use the 'B B' DOS command or change the attribute in the file Properties dialog box in NT.

Now let's focus on Linux. We need to install Linux, customize LILO, and generate the BOOTSECT. LIN file.

The first step is to install Linux. We all know how to do this: select the appropriate system, SWAP, and user partition for Linux, run the installer, and so on. This step can be completed within 45 minutes when everything goes well.

Next we need to customize LILO. We know how to do this, but note that * cannot * install LILO into MBR (unless you want to swallow NT :-)). When you set LILO, you need to choose to install it to your Linux root partition. If you do not know how to set LILO, take a few minutes TO read the HOW-TO document, or use some good installation programs. u. s. e. so my installation program is 'yast '(Yet Another Setup Tool ).

After LILO is customized, we must use 'dd' to generate a boot record image file (for ease of writing, assuming that the Linux root partition is/dev/hda3. After using root Login, follow these steps:

# Dd if =/dev/hda3 bs = 512 count = 1 of =/dosc/bootsect. lin

If you cannot mount the fat c: partition to/dosc, for example, the partition cannot be accessed because it is formatted in NTFS mode. At this time, you can write BOOTSECT. LIN to a disk formatted in DOS mode, or other partitions that NT can read. If BOOTSECT. LIN is not placed in C:, remember to modify the BOOT. ini file accordingly.

Now your boss can select Linux from her NT Loader menu. NTLDR will load BOOTSECT. INI and she will be able to see the LILO prompt. Then she can try her new Linux machine. Finally, you can set LILO to boot DOS on Linux and C: When selecting the prompt. Your boss can return to C: NT Loader on the partition again. The methods described above can be repeated. If you want to boot multiple Linux systems, you must generate a corresponding Boot Sector image file for each Linux system.
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.