Windows 7 Hard Drive installation CentOS 6.0

Source: Internet
Author: User
This is the first time to install the system, it is now very familiar, but still put it, forget to spare. http://ftcl.hit.edu.cn/main/?p=854

1 Related Backgrounds

No CentOS 6.0 system CD, there is a U disk but do not want to use it to make Linux startup disk, the reason is great damage to u disk, how to do it. Or the hard drive installation bar.

From hit FTP (ftp://run.hit.edu.cn) downloaded from the Centos-6.0-i386-bin-dvd.iso, there are 4.4GB. Because the FAT32 file system supports a single file that cannot exceed 4GB of size, it cannot be placed in a FAT32 type of file system, and Linux cannot recognize the NTFS file system, so it can only be placed under the ext2 (or ext3) type of file system. The following details its process of installing CentOS 6.0 on a hard disk under an existing Windows 7 system.


2 The following software is required for your preparation :
(1) CentOS system image file: Centos-6.0-i386-bin-dvd.iso
(2) Acronis disk Director suite or partition Magic, which is used to partition and format the hard disk: Acronis disk Director Suite
(3) EASYBCD, supporting multiple booting of multiple operating systems: EasyBCD2.1.2
(4) EXT2FSD copy files to the ext2 (or ext3) file system under Windows, because the ext2 type of file system is not recognized under Windows, that is, the ext2 type of partition is hidden invisible under windows, EXT2FSD The ext2 partition can be displayed by setting to enable the copying of the corresponding files (primarily CentOS system mirrors) to the ext2 partition. This article uses the EXT2FSD is Ext2fsd-0.51.exe installs the version, the best does not use after decompression can use.

If the installed system mirrors ISO less than 4GB, the EXT2FSD tool is not needed as long as it is formatted as a FAT32 file system.


3 The required environment for setting up the installation assumes that the current hard drive already has 4 partitions: C, D, E, and F. C, D, F partitions are not used, can only be installed with the E-partition CentOS.

If the installation CentOS only a partition, that is, only/partitions (others, such as/boot,/home, are mounted in/below and not divided into separate partitions), simply format the partition e (E disk) as EX2 (or ext3). However, if you want to divide into separate partitions, such as/,/boot,/home, and so on separate division area, we should delete the partition E to become unallocated, similar to Figure 1 form, When the CentOS partition interface is installed, partitions that are used by the CentOS are divided from the parts of the unallocated that are not divided into logical partitions.



Figure 1 After you delete a partition

This article divides the CentOS into 4 partitions,/boot partitions,/partitions,/home partitions, and/swap partitions.


3.1 Partitioning partition first deletes the E partition with the Acronis Disk Director Suite, which becomes the unallocated (extended partition), Then, a logical partition of about 5GB (guaranteed to be larger than the size of the CentOS system Mirror file) is divided from the unallocated that has just been deleted, and the file system type is ext2 (or ext3), which is used to store the CentOS system mirroring file, which is described in the following logical partition as " Hard drive Installation Partition ".

After the hard disk installation partition is formatted, you need to copy the files to this partition, but Windows does not recognize the ext2 type of partition, which is not seen in the "My Computer", where you need to use the EXT2FSD tool, when you install the tool, notice a place, as shown in Figure 2, Three options are ticked in the diagram.



Figure 2 Installing Ext2fsd-0.51.exe

After installation, the following interface appears, as shown in Figure 3:



Figure 3 Interface after installing EXT2FSD

The selected partition is the "hard drive installation Partition" that is being prepared, then configure it, select it, right-click, and select "Profile System", as shown in Figure 4:



Figure 4 Configuring the hard disk installation partition

As shown in the figure, click "Enable" and "Change and exit." Continue to select this disk right-click and select Configure Ext2 volume properties as shown in Figure 5:



Figure 5 Configuring the "Hard drive Installation Partition" configuration as shown in the figure, the drive letter selection is optional, click "Save and Exit."

Continue to select this disk right click, select "Disk and Partition Properties", select "Change Drive letter/Assembly point", appear figure 6



Figure 6 After you select Change Drive/Assembly point

Select Add, as shown in Figure 7:



Figure 7 "Add" and follow the above configuration, click "Load and Exit".
At this point the configuration is complete, open My computer found the E disk, and can be opened normally, copy/paste/delete operation and Windows is the same. Note that a Lost+found folder will appear in e-disk, please do not delete it.

After the hard disk installation partition is configured, copy the downloaded CentOS image file to the hard disk installation partition, which is just the E disk that appears, and extracts the images folder and Isolinux folder from the mirrored file: Images folder and mirrored file to "hard disk installation Partition" Root (the original mirror remains); The Isolinux folder is placed in the Windows 7 system disk, which is the root directory of C disk. As shown in Figure 8, Figure 9:



Figure 8 "Hard disk Installation partition content"

Figure 9 Isolinux folder in C disk

Figure Isolinux Folder Contents, note initrd.img and Vmlinuz

At this point, the hard drive installation partition is configured.


3.2 Making multiple boot programs

Install EASYBCD The default installation can be. The start interface is shown in Figure 11:



Figure EasyBCD Start interface

Click and select the Neogrub tab, which appears as shown in Figure 12:



Figure 12 Click neogrub tab

Notice that this is not available at this time and becomes available when clicked, as shown in Figure 13:



The "Configure" button becomes available

Click, and then there will be a Notepad open text file Menu.lst, which is the operating system's multiple boot file, as shown in Figure 14:



Figure 14 The text file that appears after you click "Configure" adds the following code to the Open text file:
Title CentOS 6.0
Root (hd0,0)
Kernel (hd0,0)/isolinux/vmlinuz
INITRD (hd0,0)/isolinux/initrd.img

The hd0 in parentheses indicates that the boot file is in the partition of the first hard drive, and if it is hd1 on the second hard drive, the latter 0 indicates that the bootstrapper is in the first partition and that is the C disk.

After the addition, the scenario is shown in Figure 15:



Figure 15 Adding content to Menu.lst

After you save it, EASYBCD will save the file in the C:\NST directory, as shown in Figure 16:



Map Menu.lst File storage location

The configuration is complete at this time.


4 Installation CentOS configuration, restart the computer will want you to choose to start Windows 7 or Neogrub bootloader, select Neogrub Bootloade can be normal installation CentOS.

During the installation you will be asked to select the partition where the CentOS image file is located, and the hard disk partition is shown in Figure 17:



Figure 17 Hard disk partition situation
The hard disk is divided into a primary partition, that is, C disk,/DEV/SDA1, an extended partition/dev/sda2, there are three logical partitions are:/DEV/SDA5,/DEV/SDA6,/DEV/SDA7, respectively, representing the D disk, E disk and F disk under Windows. Because SDA1, Sda2, Sda3, sda4 are reserved for primary or extended partitions, the first logical partition is SDA5. CentOS's mirrored file is in e disk, that is, in/dev/sda6.
Finally, some points need to be explained.
(1) If you select Neogrub bootloader boot boot fails, a command prompt gub> is displayed. There may be a hidden partition or multiple hard drives, causing the partition in which the boot file is located that is the above C disk not (hd0,0). At this point you need to modify (hd0,0) to a different value. Can be modified directly in the grub>, according to the prompts to repair.
(2) Select the custom partition in the partition, namely the manual partition, divides into three partitions:/boot partition,/partition and/home partition, because now the host board is newer, the BIOS can successfully identify the large capacity hard disk, so the/boot partition does not have to "force primary partition". In the traditional Linux specification file, there is a special designation: Swap is best 1.5 to twice times the physical memory, so the swap partition is based on the physical memory size.

(3) In addition, it is best to select the EXT4 type of file system when selecting a file system for the three partitions/boot,/and/home for CentOS.


5. Ext4 File System Brief

EXT4 is an extended log file system for EXT3 systems, and the Linux kernel has officially supported 2.6.32 file systems since 2.6.28 (CentOS 6.0 kernel is EXT4). EXT4 is an improved version of ext3 that modifies some of the important data structures in ext3, rather than just adding a log function, as in ext3. EXT4 provides better performance and reliability than ext3, and some of its performance improvements are as follows:

(1) compatible with ext3. If you want to upgrade from ext3 to EXT4, you don't need to format the file system or reinstall the system, just execute a few commands.

The original EXT3 data structure is unchanged and EXT4 is used for new information.

(2) Support for larger file systems and files. The maximum file systems and files supported by EXT3 are 16TB and 2TB respectively. The EXT4 supports 220TB file systems and 16TB files, respectively. This is actually the result of increased inode size, ext3 inode size is 128Byte, and ext4 inode size is 256Byte.

(3) Introduction of extents. EXT3 using indirect mapping, if the operation is large files, the efficiency is very low. such as a 100M size file, in the ext3 to establish 25,600 datablocks (using the 4K size block). and Ext4 introduced the concept of extents in modern file system, each extent as a set of contiguous blocks of data, the above file expressed as "the file data is stored in the next 25,600-blocks", obviously increased efficiency.

(4) Multiple-block allocation at a time. EXT3 when allocating blocks of data, only one piece can be allocated at a time, and 100M of files need to call 25,600 times the data block allocator, that is, 25,600 times allocated. And EXT4 uses a multiple-block allocator called "Multiblock Allocator", which supports allocating multiple blocks at a time, and efficiency gains are obvious, especially when allocating data blocks for large files.

The main performance improvement relative to EXT3,EXT4 is mainly above 4 points. In the reliability of the promotion is also not to be overlooked, such as the log check function.

So in the CentOS partition, please choose the Ext4 file system decisively.
6. Upgrade from ext3 to EXT4 below describes how to upgrade from Ext3 to Ext4, as shown in Figure 18,

Figure 18 File System situation

/boot partitions are ext3 types, and note that their corresponding file system is/dev/sda1. To upgrade it to EXT4, you need to uninstall the pre-upgraded file system and execute the following command, as shown in Figure 19,

Figure 19 Uninstalling the file system first

Command Tune2fs:adjust tunable filesystem parameters on Ext2/ext3/ext4filesystems, perform the following command to upgrade, as shown in Figure 20,


Figure 20 The command to upgrade ext3 to Ext4

After that, be sure to hold the e2fsck command to check the file system, otherwise EXT4 will not be able to mount the new file system, execute the following command, as shown in Figure 21,


Figure 21 Checking the Ext4 file system

After performing a file system check, you can hang on to the file system, as shown in Figure 22,

Figure 22 mount a new file system

At this point, the file system upgrade is complete.

Ha ha! Good luck to me!!! Sung 2012/3/16 23:02


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.