How to install CentOS

  
on Windows?

A few days ago, the hard disk installed CentOS6, the download is CentOS binDVD version, more than 4G, FAT partition can not be placed, NTFS partition can be put down, but the CentOS installer can not find the partition... toss Half a day finally got it, it seems that the method is still there, with a little Linux system toss each time.

Test environment:

System platform and version: Windows
XP SP3, Windows
7 Just use a similar modification to start.

Grub4Dos: http://download.gna.org/grub4dos/, (test: grub4dos-0.4.4-2009-06-20.zip)

CentOS image file DVD, CD Yes, download address: CentOS download and version selection

Ext2fsd software may be required, a Windows platform to read and write Linux partition software

may require partition software, such as AcronisDiskDirector. More references:

Common disk partitioning software and system partitioning function comments

If your system is WIN7, you may also need EasyBCD to modify the boot options.

Windows dual-purpose EasyBCD uses tutorial

Special Note: The installer may overwrite your partition. Please confirm the relevant data security before installation. When you choose to install CentOS, Partition installation or full disk installation, if the selection is wrong, the original disk data may be lost! ! !

First, the CentOS universal installation method

This method is suitable for downloading CentOS less than 4G, can be placed in the FAT partition, (if you download the DVD image, you may need to put more than 4G into the NTFS partition ( But the downloaded Grub4Dos can't be installed from NTFS by default. Maybe other settings, plugins can, have not tried, Grub4Dos can? GNU Grub can not know NTFS?), please use the following installation method.)

1 The last partition is reserved under Windows XP, and no idle state is allocated for installing CENTOS.

2. Put the downloaded CentOS image file on any disk in FAT format, assuming E:\\disk.

3, extract the vmlinuz and initrd.img under the isolinux folder in the CENTOS image (if vmlinuz0 only vmlinuz0, the following instructions also need to be modified) to the E:\\ disk root directory (if the isolinux directory is used) The whole decompression can also be done, the following menu.lst should also be modified accordingly, add the path can be), that is to say in the same directory as CENTOS ISO.

4. Decompress grub and copy GRLDR to the C:\\disk root directory (note that GRLDR is not GRLDR.MBR).

5. Open C:\\boot.ini and add c:\\grldr="CentOS" at the end of the file. It can't be edited directly. You can right click on the desktop and click on my desktop. > Computer
” icon, then set in startup recovery.

6, set menu.lst below, there are two ways:

Method 1: Do not MENU.LST, directly restart the machine

When the GRUB4DOS option appears, select After entering, select Command line, enter the command:

  • grub>root (hd0,2)
  • grub>kernel /vmlinuz
  • grub>initrd /initrd. Img
  • grub>boot

    Complete output information reference:

  • grub>root (hd0,2)
  • Filesystem type is Fat, partition type 0x0C
  • grub>kernel /vmlinuz
  • [Linux-bzImage,setup=0x3400,size=0x37bf80]
  • grub>initrd /initrd.img
  • [Linux-initrd @ 0x3d3c8000,0x82f3c5 bytes]
  • grub>boot

    Here, CentOS will start.

    Here, if vmlinuz and initrd.img are decompressed (isolinux), then write:

  • grub>root (hd0,2)
  • grub> Kernel /isolinux/vmlinuz
  • grub>initrd /isolinux/initrd.img
  • grub>boot

    Note: root (hd0,2) is setting the current root Directory location, hd0 represents the first hard disk, 2 is the device code (partition, the first C drive is 0, D drive 1, E drive 2, etc.), representing the fat partition where vmlinuz and initrd.img are placed. If you can't correct it, you can modify it. After root (hd0, 2) enters the carriage return, you will be prompted to similar:

    If there is no such partition, you will be prompted: Error 22: No such partition

    If there is this partition, you will be prompted: Filesystem type is fat, partition type 0x0C

    The subsequent instructions can be input continuously. It doesn't matter if you input the error. If you are wrong, you can't enter the CentOS installation program. OK will start.

    Method 2: Add menu.lst in advance, and restart the machine after modification.

    menu.lst can be extracted in the grub archive, copied to the C:\\ root directory (can also be placed in /boot/menu.lst, can also be placed in /grub/menu.lst, Grub automatically searches for these three directories when it starts.)

    Modify menu.lst content:

  • title CentOS
  • kernel (hd0,2)/vmlinuz
  • initrd (hd0,2) /initrd.img

    If vmlinuz and initrd.img are decompressed in the whole directory (isolinux), write it as:

  • kernel (hd0,2)/isolinux/Vmlinuz
  • initrd (hd0,2)/isolinux/initrd.img


    Second, CentOS Ultimate Installation Method

    This method is compatible Better, but need to involve partition operations before installation, pay attention to protect data. Tianyuan also installed CentOS-6.0-i386-LiveDVD on the DELL machine. According to the above method, the installation always prompts:

    signal caught! boot has failed, sleeping forever

    error, so change Into the binDVD version, but the original image is only about 1.6G, and CentOS-6.0-i386-bin-DVD.iso has a pothole of 4G, FAT32 can not put it, and there is no way to engrave, so "self-made" the following method :

    1. On XP, reserve a free partition for the CentOS (delete partition), use the partition tool to create a 5G EXT3 partition at the beginning of the free partition, and the remaining space can be created as one. EXT3 partition (the actual installation can also be customized, it seems to have to be created first, otherwise it seems to prompt the error when installing, too many times to forget the turn), note that the start is not the last, if the ISO partition is placed last , then the following error will be prompted when actually installing to the manual partition:

    Could not allocate requested partitions:

    Partitioning failed: Could not allocate

    partitions as primary partitions.< Br>

    Not enough space left To create partition

    At this point, the last EXT3 partition number has changed, so the installer can't find the original copy of the installation file. So it is better to divide the partition first (Tianyuanguang tried it back and forth several times here).

    2, then find the Ext2fsd tool, modify the load to write the drive, and copy the 4G file (originally placed on the NTFS partition).

    3, extract the ISO isolinux directory and image directory (less one can not, if there is no image, the installation will appear /images/install.img look for errors), the same copy to the EXT3 partition root .

    4, the subsequent steps are similar to the above, but do not know the ID number of this EXT partition when setting root, so use the following statement:

  • title CentOS-6.0-i386- bin-DVD.iso
  • find --set-root --ignore-floppies --ignore-cd /CentOS-6.0-i386-bin-DVD.iso
  • kernel /isolinux/vmlinuz
  • initrd /isolinux/initrd.img
  • boot

    The above Find statement, if you know which drive, you can also directly root (hd0, x) Set, if you don't know the find command, then use this to look at:

  • find --set-root /CentOS-6.0-i386-bin-DVD.iso

    Output (hd0, 4), OK found. Root runs wood problem.

    5, automatically start into the installation interface, the notes are as follows:

  • In the Installation Method step, select Hard drive, select the drive where your ISO is located in the Select Partition step. This step will look for the /images/install.img file.
  • Which type of installation would you like? Generally choose the Replace Existing Linux System way, be sure to check the following options: Review and modify partitioning layout

    6, if 4 choose Method 2 above, enters GRUB and automatically enters without editing.

    Special reminder:

    When installing the "Which type of installation would you like?" setting interface,

    , anyway, you can confirm it again, otherwise, install The program did not repent, and began to install directly.

  • Copyright © Windows knowledge All Rights Reserved