Make RedHatlinux9.0 and XP a dual system

Source: Internet
Author: User
Nowadays, not only has Linux made great progress in the server field, but more and more users are choosing to use it in the desktop application field. The following uses RedHatLinux9.0 as an example to describe how to build a dual system with Windows XP. Division of Linux territory because Linux cannot be installed in windows...

Nowadays, not only has Linux made great progress in the server field, but more and more users are choosing to use it in the desktop application field. The following uses Red Hat Linux 9.0 as an example to describe how to build a dual system with Windows XP.

Dividing Linux into territory

Linux cannot be installed on Windows partitions. Therefore, you must separate a partition on the hard disk for Linux. we recommend that you use a partition magician to perform lossless partitioning. For the sake of convenience, here is an example: a Windows XP computer with a 30 GB hard disk, divided into three areas (drive C, drive D, and drive e ), the Elastic Block Storage (edisk) has 16.6 GB space (about 7 GB space ). Our goal is to strip 7 GB of available space for Red Hat.

1. start the partition magician in Windows XP and view the details of the disk partition in the main window. Click partition E in the Details pane on the right to select it.

2. click the "adjust the capacity of a partition" command in the task list on the left to bring up the "adjust capacity/move partition" dialog box.

3. at the top of the dialog box, there is a bar chart showing the usage of partition E. the black bar on the left shows the used space, and the green bar on the right shows the available space. You can drag the green bar to adjust the size of the edisk. Obviously, the minimum size of an e-disk is the used space (the original data is damaged when the disk is small), and the reduced size becomes its own space.

4. click "OK" to return to the main interface. now we can see the new 7 GB free space. The following steps are very important. Although the 7 GB disk space is already "free", it still belongs to the Windows extended partition, so we need to divide the 7 GB free space from the Windows extended partition.

5. click the extended partition to select it, as shown in 1. Similarly, the 7 GB free space is divided from the extended DOS partition in Windows. Now we have cut a 7 GB free space from the territory of Windows XP for Linux.

 

Divide free space from extended partitions

 

 

Note that free space must be divided from Windows extended partitions because the partition format of Linux is not fully compatible with Windows. If the disk space used by Red Hat belongs to the Windows extended partition, the disk space will be "unacceptable ". Many of my friends reported that after installing Red Hat, Red Hat was blamed for its slow Windows speed. In fact, the root cause was that free space was not removed from the extended partition during partitioning.

There are multiple methods to implement dual boot for Windows and Linux:

◆ For users with dual hard disks, you can install Linux on the second hard disk (Windows is installed on the first hard disk) and ensure that GRUB (LILO) install it in the primary boot sector of the second hard disk, and then specify the hard disk from which to boot each time the BIOS is started.

◆ The most common method is to use the Linux boot loader manager GRUB (LILO) to automatically take over the dual system boot menu.

◆ You can use the Windows xp nt boot program ntldr and boot. ini to enable dual startup. The advantage of this method is that it is more convenient to delete Linux in the future and it complies with our usage habits. The disadvantage is that the implementation is relatively complicated and requires obtaining the boot image file of the Linux system.

◆ You can choose not to install the Linux boot loader manager (or do not install it in the primary boot sector), but remember to create a Linux boot disk during installation. If necessary, use this boot disk to boot the system into Linux.

Here we introduce the implementation solutions of four dual systems. This article will introduce the second and third methods that are common.

Use Linux boot manager

Linux has GRUB and LILO boot manager. Starting from Red Hat 7.2, GRUB replaced LILO and became the default start loader. it can be seen that GRUB has exclusive advantages. GRUB is easier to use and configure, more powerful, and future development direction. Therefore, GRUB is recommended as the dual system boot manager.

Assume that you use the installation CD of Red Hat Linux 9.0 for installation. First, modify the system BIOS settings to enable the boot of the CD, and then use the first Linux to install the CD boot system. when the welcome screen appears, press enter to enter the graphical installation interface.

1. select custom installation

The installation process is very simple. at the beginning, you will be prompted to select the installation language (naturally, you must select the familiar simplified Chinese). then, the system will prompt you to configure the mouse and keyboard. Generally, Linux automatically detects related devices and does not need to be changed.

Next, you will go to the installation type selection page, which has five options: personal desktop, workstation, server, customization, and upgrade of existing systems. Here we select the "custom" installation type with the highest degree of freedom, as shown in figure 2.

 

Select the installation type

 

 

2. create a Linux partition

Creating Linux partitions is difficult. Select "manual partitioning with Disk Druid", select the 7 GB free space just allocated on the following page, and click "new" to create a Linux partition. For beginners, there can be only three partitions:

(1) pilot partition

In the pop-up "add partition" dialog box, create a boot partition in the remaining space. The Mount point is/boot, the capacity can be 100 MB, and the file system is ext3, as shown in 3.

 

Create a boot partition

 

 

(2) swap partitions

You must create a swap partition. Swap partition is a special partition, similar to a page file in Windows XP, it does not have the concept of a Mount point. Select swap as the file type. if the memory size is 128 MB, the swap partition capacity can be set to 256 MB.

(3) root partition

In the pop-up "add partition" dialog box, select mount point as "/" and select file system as ext3, you can allocate all the remaining capacity to the root partition (note that you should leave a little space, otherwise the system will report an error). the capacity should not be less than 1.5 GB.

In Linux, the C and D drive letters are not defined in Windows. Each Linux partition must be mounted to the Linux directory tree for use. A special partition is the root directory/, which is required and is the root of the Linux directory tree.

3. Linux boot manager configuration

After creating a Linux partition, the next step is the configuration of the Linux boot manager. Is the boot loader configuration interface. As you can see, there are already two options in the boot system list in the figure: one Windows XP (DOS), and the other Red Hat. On this installation wizard page, you can make the following settings:

 

Boot loader configuration

 

 

(1) change the default startup system

The Linux boot manager defaults to Linux and can be modified here. For example, you can select the "default" check box before Windows XP (DOS), or after the installation is complete, modify/boot/grub/menu. the ist file achieves the same purpose.

(2) add another operating system

Sometimes, GRUB may not be able to detect all operating systems in the system. In this case, manual addition is required. Click the "add" button on the page shown in 4 to open an "image" dialog box. you can enter the name of the operating system in the "tag" text box, for example, "Windows 98 ", in the device drop-down list, specify the location of the system partition of the operating system, and determine whether to select the operating system as the default boot system.

(3) edit the default project tag

Maybe you have long been unfamiliar with Red Hat and regard Windows XP as DOS. However, you can click the "Edit" button on the page to specify its tag, as shown in figure 5.

 

Specify the name of the startup menu

 

 

After this step is completed, Windows and Linux dual-system installation will be finalized. The subsequent operations are relatively simple and can be easily completed as prompted on the screen. However, do not forget to create a Linux boot disk for emergency purposes.

Use ntldr for dual boot

Using ntldr to boot Windows and Linux systems is much more difficult than GRUB. This is because Windows cannot identify Linux partitions, so it cannot detect the existence of Red Hat Linux. To make ntldr "obedient", you need to perform "surgery" on it ".

To facilitate your understanding, we will first give a brief introduction to the principles of the Windows boot manager. Ntldr is a working parameter provided by the configuration file boot. ini, which is located in the root directory of the Windows XP system partition and has hidden, system, and read-only attributes. We only need to back up the boot record of Red Hat Linux as a file to the root directory of drive C, and correspondingly in boot. add a project in the INI file to point to them to implement a dual system.

If you want to start Windows XP and Red Hat Linux, you 'd better install Red Hat Linux first and then Windows XP. The principle is very simple. if Windows XP is installed first, then the installed Red Hat will automatically claim to use its boot manager to occupy the ntldr site, resulting in the failure to use ntldr to guide multiple systems. The following describes how to save the boot sector of Red Hat Linux 9.0.

1. back up the boot sector in the Red Hat Environment

After installing little Red Hat (assuming it is installed in the/dev/hda6 partition), do not install Windows XP. first enter Little Red Hat, open the terminal window, and type the following command in it:

 

dd bs=512 count=1 if=/dev/hda6 of=bootsect.rh

 

The function of this command is to save the boot sector of Red Hat Linux as a bootsect. rh file, which can be backed up to a floppy disk.

Then install Windows XP (assuming it is installed on drive C ). After the installation is complete, copy the bootsect. rh file to the C root directory. Edit the boot. ini file under the C-drive root directory (remove the system and read-only attributes in advance) and add the following command in it:

 

C:\bootsect.rh="Red Hat Linux 9.0"

 

Save the file. do not forget to set boot. ini and bootsect. rh back to the system, hide and read-only attributes to avoid future misoperations.

It should be noted that Windows XP can be installed first, but remember two points:

(1) when installing the Linux boot manager, remember not to install the boot manager on the master boot record (to avoid overwriting the Windows boot manager );

(2) Make a Linux boot disk.

The subsequent task is simple. after installing Red Hat Linux, use the Linux boot disk to boot the system into Red Hat Linux, and then use the same dd command to create the bootsect. rh file.

2. back up Linux boot sector in Windows XP

Although it is relatively simple to back up Linux boot sectors in Red Hat environments, it still seems a little troublesome for most Windows users. This article describes how to back up Linux boot sectors in a Windows environment. Here we can take two steps: first, find the number of Linux boot sector, and then save the sector as a backup file.

(1) use the partition magician to find the starting sector of Linux

To save the boot sector of a Linux partition in Windows, you must know the sector number of the boot sector. With the help of the partition magician, locate the Linux/boot partition in the main window of the partition magician 8.0, right-click the/boot partition, and select the "Properties" menu item. Switch to the "Partition Info" tab in the "Partition Properties" dialog box, and find the number of sectors of "First physical sector" (First physical sector), as shown in 6. In this example, 53014500 is used.

 

View the sector ID of the boot sector

 

 

(2) use Dskprobe to back up the boot sector

You can use the disk tool to back up the Linux boot sector code. We recommend that you use Dskprobe, which is located in the SUPPORT. cab package under the \ SUPPORT \ TOOLS directory on the Windows 2000/XP installation disc.

Shut down the separation Wizard first, then double-click the dskprobe.exe icon to start Dskprobe. Since no data is read after startup, the information of all sectors is displayed. Next, choose Drives> Pysical Drive on the program interface. The Open Pysical Drive dialog box 7 is displayed.

 

Select an appropriate hard disk

 

 

The "Available Physical Drives" list box in this dialog box lists two disks. if it is a single hard disk system, only PhysicalDrive0 (the first Physical hard disk) is listed ). Double-click the desired physical hard disk. you can see that the "Close Handle" and "Set Active" buttons are activated. click the "Set Active" button and then click the "OK" button, you can return to the main interface.

Choose "Sectors"> "Read" on the main interface to open the "Read Sectors" dialog box. In the "Starting Sector" text box, enter the Number of sectors (53014500 in this example) passed by the partition magician, enter 1 in the "Number of" text box, and then click "Read, the page shown in figure 8 is displayed. this is the content of the boot sector of the Linux/boot partition.

 

Figure 8 Linux Partition Boot sector content

 

 

Choose "File"> "Save as" to specify the storage location (C root directory) and File name (assuming bootsect. rh), and then in the boot. add the appropriate item C: \ bootsect to the INI file. rh = "Red Hat Linux 9.0. After everything is ready, restart the system. The Windows XP startup menu appears. you can select the system to enter as needed.

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.