Article title: start LINUX from the NT boot program. 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.
We often have to deal with the following situations: let LINUX and NT two different systems coexist in the same machine. There are already a lot of related HOW-TO literature-it's not bad TO see a look at the recommendations-TO see how to set lilo to complete this kind of work. Unfortunately, the classic literature basically does not involve the NT boot program. Yes, for many people, there is a door-to-door competition between Linux and NT, but our goal is just to complete this job.
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 remembering this, you should note that * cannot * install LILO into MBR, but to the root partition of Linux. In this way, NT will not cause problems, and Linux can survive without MBR.
Guiding process of NT
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"
TBOOT. 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.
Linux
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 installer 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.
Finally, you can set LILO to boot DOS on Linux and C: when selecting the prompt. You can return to C: the 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.
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