RedhatLinux9 and Windows dual system construction reference
Source: Internet
Author: User
Article Title: RedhatLinux9 and Windows dual system construction reference. 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.
Although Linux is becoming more and more popular and more users, we generally don't use it to replace Windows, but let the two systems coexist, one for application and entertainment, one is used for learning. But as we all know, Linux has always been the enemy of Windows. It is not easy for them to get along with each other without any problems, next I will take Redhat Linux 9.0 and Windows XP as examples to explain some problems involved in the coexistence of the two:
1. Installation
1. Assume that you have installed Windows XP and the partition format is FAT32;
2. preparations before installing Redhat: use some partitioning tools (such as PQmagic) to free up some free space on your hard disk (that is, the space that has not been divided, neither specify a file system, no drive letter is assigned). The size of the space depends on the Redhat installation method you choose. Generally, 5 GB is enough;
3. Use Redhat to install the CD boot system and configure the language, keyboard, mouse, upgrade check, and installation type pages as prompted;
4. go to the disk partition settings page, select "automatic partitioning", and select "Save all partitions and use free space" on the following page "; click "Next" and the installer will create the partitions required for the Linux system (including one/boot partition, one root partition, and one swap area ); generally, you do not need to modify the settings directly;
Note: On the disk partition settings page, you will see a list box containing your hard disk list --
Linux uses different methods to identify hard disks than Windows. If you use an IDE hard disk, the first hard disk is marked as/dev/hda, and the second disk is/dev/hdb; in addition, the first partition of the first hard disk is marked as/dev/hda1, and the second partition is/dev/hda2. Therefore, if it is a SCSI hard disk, It is/dev/sda, /dev/sdb format.
5. the next step is the key to the coexistence of the two families-the boot program settings page. The installer provides you with two programs for guiding the system-GRUB and LILO. The default value is GRUB. You do not need to change the boot program, select GRUB and select "Advanced Configuration Options" to go to the next advanced options page.
Note: GRUB (GRand uniied Bootloader) is a powerful boot program. GRUB can boot Windows -- GRUB to load Windows boot programs through the chain loading mechanism, and then Windows boot programs to load Windows.
LILO (Linux LOader) is a flexible and versatile Boot LOader for Linux. It does not depend on a specific file system. It can boot the Linux kernel image from a floppy disk or hard disk, or even boot other operating systems.
6. On the advanced options page, confirm that the Master Boot Record (MBR) is selected for the installation location );
7. Follow the prompts to complete the page settings. After restarting, you will be able to see a beautiful guide interface. You can select different entries to enter two operating systems respectively!
[-- NTFS --]
If your Windows XP system uses NTFS partitions, this is troublesome, because neither Linux nor GRUB can understand NTFS. The steps mentioned above are the same, select "the first sector of the boot partition" in step 1, and write down the ID of the installation position (for example,/dev/hda9) in addition, follow the prompts to make a boot floppy disk at the end of the installation. After the installation is complete, you can enter Linux. You need to perform the following steps:
1. boot to Linux with a floppy disk;
2. Insert a blank floppy disk;
3. Input in shell:
Mount-t msdos/dev/fd0/mnt
Dd if =/dev/hda9 of =/mnt/bootrec bs = 512 count = 1
Umount/mnt
4. restart Windows XP, copy the bootrec file on the floppy disk to drive C, modify the boot. ini file, and add a line like C: \ bootrec = "Linux" in [operating systems ].
The modified boot. ini format is as follows:
[Boot loader]
Timeout = 30
Default = multi (0) disk (0) rdisk (0) partition (1) \ WINDOWS
[Operating systems]
Multi (0) disk (0) rdisk (0) partition (1) \ WINDOWS = "Microsoft Windows XP Professional"/fastdetect
C: \ bootrec = "Linux"
5. After the restart, the selection menu appears. Select a Linux entry to enter Linux.
Ii. Shared Files
1. share files in the Windows FAT32 partition in Linux
It's easy to use the mount command,
The basic format is as follows:
Mount? T vfat/dev/hda1/mnt/windows
Create the/mnt/windows directory before use.
Run the hwbrowser hardware browser to check the Linux ID of the windows partition to be mounted.
However, you may find that the Chinese file name in the mounted windows partition cannot be properly displayed;
The solution is as follows:
Open the/etc/fstab file (this file describes the content automatically mounted when the system starts)
Add the following line:
Here,/dev/hda1 indicates the linux ID of the windows partition to be mounted,/home/pogge/winc
For the Mount location, you must first create the/home/pogge/winc directory
2. share files in the Windows NTFS partition in Linux
NTFS support has not been added to the Linux kernel (later kernel versions may be added), but some Linux versions have already added support for NTFS, such as Mandrake.
There is a Linux NTFS project team in the open-source community. You can use the modules developed by this Group to add Redhat Linux 9.0 to NTFS support. The project team's website is http://linux-ntfs.sourceforge.net /;
In addition, there are some third-party software that accesses NTFS in Linux.
Due to space limitations, I will not elaborate on this issue. If you have the opportunity in the future, you can write a topic on this issue.
3. share files in Linux partitions in Windows
Microsoft cannot provide support for the Linux File System in the system, although Linux supports Windows! So we had to use third-party software;
Explore2fs is a free software for accessing Linux ext2 or ext3 partitions in Windows based on graphical interfaces.
After downloading and decompressing the file, run unzip e2fs.exe directly to obtain an interface similar to windows Resource Manager, which is easy to use and will not be described here.
Iii. Restore Linux boot after Windows XP is reinstalled
Generally, GRUB, the Linux boot program, is installed in MBR. When Windows is reinstalled, MBR may be overwritten.
Cause GRUB loss.
But it's easy to recover.
1. Use Redhat to install the disc and press F5
2. Enter linux rescue [Enter] to Enter rescue mode
3. Complete the configuration in rescue mode, mount your linux system to the temporary directory/mnt/sysimage, and enter chroot/mnt/sysimage to change the location of the root partition.
4. Input/sbin/grub-install/dev/hda [Enter] to re-write GURB into MBR.
5. Enter exit [Enter] exit [Enter] to exit and restart. The GRUB boot page is displayed.
If no boot CD is available, use the boot floppy disk that was previously made to go to Linux for Step 2.
If GRUB is mounted on the first sector of the boot partition
Refer to the five steps in [-- NTFS.
Hope your windows and Linux will get along very well.
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