End scheme of Multi-System Startup Menu

Source: Internet
Author: User
Article Title: The ending scheme of the Multi-System Startup menu. 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.
   Preface
  
There are many tools for implementing multi-boot, such as System Commander, bootstar, Linux lilo, and OS Loader that comes with WindowsNT. There are two principles: Modify the MBR (Master Boot Record) and use the jmp command to jump to your own code at the end of the MBR to control the guiding process; another method is to modify the Boot Code of the first sector in the primary partition to implement multiple boot operations.
  
MBR (the primary Boot Record) refers to the 0th sector (sector) of The 0th track of The 0th cylinder of the hard disk ). Primary partition: for dos, windows, and other operating systems that use fat file systems, it is a drive C; in Linux, It is the partition where the root file system is located.
  
System Commander and lilo use the MBR modification method, while OS Loader uses the latter method. Modifying the MBR may cause serious compatibility problems and may be mistaken by some anti-virus software for virus killing. I don't like to modify MBR, so I usually use OS Loader. The following uses linux as an example to describe how to use OS Loader to implement multiple guidance:
  
   1. Install OS Loader:
  
If you want to install Windows 98, Windows SNT, and Redhat Linux on your hard disk, you can install Windows 98 first and then Windows snt. After WindowsNT is installed, the OS Loader is automatically installed. If there is an error in this order, you need to use the program and script in the attachment. It can install OS Loader for you. At this time, your system can actually perform multiple boot operations.
  
   2. Obtain boot files for various operating systems:
  
When adding some operating systems to the OS Loader, you need to find a way to read the Boot Code of other OS after installing WindowsNT and store it in the file, that is, read 512 bytes of the first sector of the primary partition. In DOS, this can be done by using debug or norton diskedit, or by writing a small program.
  
In fact, after the OS Loader is installed, the system already has a bootsect. dos, which is the boot file of win9x. The following debug Method is usually not used.
  
Debug
  
-R cx
  
Cx 1, 0000
  
200 // set the read length of CX to 512 bytes
  
-L 100 2 0 1
  
// Read the Main Boot Sector to the memory ds: 100
  
-N bootsect. w98 // suppose you are under Win98,
  
Save the Boot Sector file as bootsect. w98
  
-W 100 // write the bootsect. w98 File
  
-Q // exit the Debug program
  
There is a ready-made utility in Linux that can be used to directly read and write sectors.
  
There are two points to note when installing Linux.
  
First, do not install lilo into MBR when installing lilo, because I want to use OS Loader for multiple boot. You should install lilo in the first sector of the primary partition (note that the primary partition here is not the C disk, but the partition where Linux is installed ).
  
Second, you should make a boot disk so that you can access Linux. Because lilo is not installed in MBR, it cannot be directly booted from the hard disk to Linux. In Linux, use the following method to obtain the Linux boot sector file:
  
Take Red Hat Linux 6.0 as an example:
  
# Dd if =/dev/hda3 of = bootsect. lnx bs = 512 count = 1
  
Assume that you have installed LILO in Red Hat Linux on/hda3 and saved the Boot Sector file as bootsect. lnx.
  
Taking FreeBSD3.2 as an example:
  
# Dd if =/dev/rwd02 of = bootsect. bsd bs = 512 count = 1
  
Assume that FreeBSD is installed on the second basic partition, And the Boot Sector file is saved as bootsect. bsd.
  
Store Linux boot sector files to DOS partitions
  
The Linux boot sector file obtained in the preceding method is stored in the Linux partition. nt OS Loader cannot be directly read and needs to be stored in the partition where the nt OS Loader is located, which is generally a drive C.
  
Take Red Hat Linux 6.0 as an example:
  
# Mount-t msdos/dev/hda1/mnt
  
# Cp bootsect. lnx/mnt/bootsect. lnx
  
Taking FreeBSD3.2 as an example:
  
# Mount-t msdos/dev/wd0s1/mnt
  
# Cp bootsect. bsd/mnt/bootsect. bsd
  
   3. Modify the boot. ini file
  
Open the Boot. ini file and add the Boot records of the operating system you want to Boot. For example:
  
[Boot loader]
  
Timeout = 30
  
Default = multi (0) disk (0) rdisk (0) partition (1) \ WINNT
  
[Operating systems]
  
C: \ bootsect. w98 = "Microsoft Windows 98"
  
C: \ bootsect. lux = "Red Hat Linux 6.0"
  
C: \ bootsect. bsd = "FreeBSD Release 3.2"
  
Multi (0) disk (0) rdisk (0) partition (1) \ WINNT = "Microsoft Windows 2000 Professional"/fastdetect
  
   Iv. Attachment:
  
This file is the rarfile under the dos directory. After the file is downloaded, it is changed to .exe. You can decompress it to the c: \ OS directory under dos or windows (where the install script is created based on the c: \ OS directory). You can modify it according to your actual situation.
  
This file only provides the function of creating the OS Loader menu. If you want to start other OS, please note that you should not install it to MBR, only install its boot module to its own partition ., Then extract the first sector (512 bytes) to save it as a file and add it to boot. ini.
  
For details, see the manual file in the compressed package.
  
Download OSLOADER. RAR

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.