Summary of hard drive Linux installation in win7

Source: Internet
Author: User

Not long ago, John was idle recently and installed centos on it. I encountered some problems in the middle. Here I will make a summary for your reference.

The purpose is to install centos from the hard disk in the existing win7 system without disrupting the one-key restoration function provided by the computer.

Environment or software:

Win7 64-bit flagship edition (step 1 of XP is to modify boot. ini. You can search for it)

Centos image (using a minimal CentOS-6.2-x86_64-minimal.iso)

Grub4dos

Easybcd

Preparation or knowledge:

You need to prepare a FAT32 partition, copy the CentOS-6.2-x86_64-minimal.iso to the root directory of the partition, and extract the images folder and place it in the root directory.

If the ISO image file is not in the root directory, modify the path in the menu. LST file in step 1.

Do not use NTFS partition, because Linux cannot directly Mount NTFS partition. If NTFS partition is used, the system will prompt that the file (install. IMG) cannot be found at Step 1 below ).

The hard disk reserves an unallocated area or an existing partition (both primary and logical partitions are supported, about 20 GB, Which is set as needed) for installing centos.

Windows partition naming rules: (hdx, Y), where X indicates the hard disk number, starting from 0; y indicates the Partition Number, starting from 0, because a maximum of four primary partitions are allowed, so 0 ~ 3 indicates the first to fourth primary partitions, and the logical Partition Number starts from 4. For example: (hd0, 0) indicates the first primary partition of the first hard disk, (hd1, 4) the first logical partition of the second hard disk.

LINUX partition naming rules:/dev/sdxy, where X indicates the hard disk number, starting from a; y indicates the Partition Number, starting from 1. Therefore, in Windows (hd0, 0), it is/dev/sda1 in Linux, and so on (this is the hard disk of the SCSI/SATA interface, if it is the hard disk of the IDE interface, /dev/hdxy ).

The procedure is as follows:

1. download the latest version of grub4dos, decompress it, and copy grldr, grldr. MBR, and menu. lst to the root directory of the win7 system disk (usually drive C.

Http://download.gna.org/grub4dos/

2. Execute the following commands (administrator privilege required) in sequence at the doscommand prompt to add the grub4dos boot item.

Bcdedit/create/D "grub4dos"/Application bootsector
The command result should return a guid. Replace it with the guid in the following command.
Bcdedit/set {guid} device partition = C:
Bcdedit/set {guid} path \ grldr. MBR
Bcdedit/displayorder {guid}/addlast

For more information, see bcdedit help (bcdedit /?).

3. Modify the menu. LST file and add the following content at the appropriate location.

Title install CentOS-6.2-x86_64-minimal.iso
Fallback 9
Find -- Set-root/CentOS-6.2-x86_64-minimal.iso
MAP/CentOS-6.2-x86_64-minimal.iso (0xff) | map -- MEM/CentOS-6.2-x86_64-minimal.iso (0xff)
Map -- hook
Chainloader (0xff)
Savedefault -- Wait = 2

Where title is the title of the option, fallback indicates that the item that fails to jump to the corresponding number (starting from 0), find will automatically search for the CentOS-6.2-x86_64-minimal.iso at the specified position of each partition.

4. restart the computer, select "grub4dos" in the boot item, enter grub4dos, and then select "Install CentOS-6.2-x86_64-minimal.iso".

5. Go to the centos installation page, select hard driver from the installation source location, and select the partition/dev/sdxy where the ISO image is located (if you do not know exactly what xy is, can be tried one by one). If the extracted images folder is placed under the root directory, the path can be left blank (that is, the default is/images/install. IMG ).

6. When selecting the installation partition, you must be careful. If you make a wrong choice, it will be a tragedy.

7. When installing the boot loader, select the partition where the Linux instance is located and do not install the boot loader in MBR. Otherwise, the restoration function may fail with one click.

8. After the installation is complete and restart, you will not see the centos startup Item. If you are not in a hurry, use the advanced win7 software and add new entry-> Add a new item under Linux/BSD, note that the right partition is selected (the one that identifies Linux ).

9. restart the system and you will see the centos startup Item. All operations have been completed.

Postscript:

Possible problems:

1. if you delete the partitions in front of the LINUX partition during use, the system will stop at the grub> command prompt when you enter Linux. This is because the partition number has been deleted and changed. Just fix it, run the following command at the grub> command prompt to fix the problem.

Root (hdx, Y)

Setup -- prefix =/GRUB (hdx, Y)

2. Too many logical partitions (I guess this is the reason) will cause the one-click Restore function to fail to be started. After the partition is reduced, it can be started normally.

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.