When partitioning, it is best to succeed once and do not cause any trouble to install the operating system later. Such as the space size and number of partitions. Number of primary, extended, and logical partitions. These are the most important.
◆ 1. Why is hard disk division important?
You can use PQ in dos, which may be the simplest partitioning tool. It is best to have only one primary partition and one extended partition. Logical partitions are divided according to your own needs. You must plan the partitions to avoid the trouble of installing the operating system in the future. There must be an expectation, that is, to prevent you from installing the operating system in the future without space. Therefore, we need to plan hard disks. To meet our unpredictable needs in the future.
◆ 2. How many areas should I divide my hard disk into? What should I do for each area?
Some may be confused about this problem. In fact, it is nothing more than learning and practice for our players. Therefore, we need to divide each linux into a zone with a space of 6 GB or more. Currently, linux is a huge volume. If you are playing linux for the first time, I suggest you install it completely, so that you can learn it easily. Otherwise, you will not know why. When the technology is similar, you can choose to install components based on your needs.
For example, if I want to install two linux and one windows on a hard disk, I can divide the hard disk. Place windows partitions in the first partition of the hard disk. This partition is often used to install windows. If you want to partition applications and backup files for windows, use the second and third partitions as windows partitions. Linux partitions should be placed behind windows partitions, And the partitions between windows and linux should be avoided. We can use PQ to differentiate linux. For each linux, a larger partition is more than 6 GB. Here, we will install a linux in each partition. In fact, each partition is about 6 GB, this is the root partition for linux installation. Divide a smaller partition, which is twice the size of the memory. If PQ is used for division. Partition format in linux. You do not need to specify it. During system installation, related steps will also be taken to format the disk.
◆ Example:
Take a closer look at the example below. Here, I have installed two linux and one windows. The partition is as follows. The primary partition is hda1 in the format of ntfs, the system is XP, hda2 is an extended partition, and hda5 is a logical partition in the format of nfts. It is a disk for installing application software in windows, hda6, hda7 is a logical partition in the format of fat32. It is also used by windwows to back up and store disks of common programs and documents. Hda8 and hda9 are linux disks.
We can see that the size is about 6-7 GB. In hda8 and hda9, a linux is installed in each partition. That is to say, the two partitions are different linux/root partitions. Hda10 is also a linux disk, with a size of 1.5 times the memory. If your memory is MB or above, the swap partition is the same as the memory size, in the format of/swap. that is, the swap partition of linux.
Linux partitions do not have the concept of C and D disks in windows. You should understand this.
A disk can be divided into up to four primary partitions. An extended partition is also a primary partition. For convenience, a hard disk is divided into a primary partition, an extended partition, and other partitions are logical partitions. The following is an example. The advantage of doing so is that when linux is installed, the partition table will not be wrong, and there will be no such situation or crisis windows partition.
In linux, logical partitions start with hda5. of course, this is the case where one machine has only one hard disk. If there are two hard disks, it may start with hdb5, and so on. If you do not know what is going on, use fdisk-l to view the problem. When installing the system, you can select the installation location, such as hdaX or hdbX partition, without the concept of win c and D disks.
[Root @ linuxsir01 root] # fdisk-l
Disk/dev/hda: 255 heads, 63 sectors, 4865 cylinders.
Units = cylinders of 16065*512 bytes
Device Boot Start End Blocks Id System
/Dev/hda1*1 1147 9213246 7 HPFS/NTFS
/Dev/hda2 1148 4864 29856802 + f Win95 Ext 'd LBA)
/Dev/hda5 1148 2039 7164958 + 7 HPFS/NTFS
/Dev/hda6 2040 2804 6144831 B Win95 FAT32
/Dev/hda7 2805 3824 8193118 + B Win95 FAT32
/Dev/hda8 3825 3830 7768163 + 83 Linux
/Dev/hda9 3831 4799 7783461 83 Linux
/Dev/hda10 4800 4864 522081 82 Linux swap
◆ 3. After partitioning the hard disk, how can I install linux?
We can install windows first, and then install linux. The purpose of this operation is to use grub to Boot windows. If you install linux first, windows may delete grub from MBR. If we reload windwows, this often happens. Just restore GRUB. So for convenience, we need to install windows first, which reduces the workload. Oh ......
◆ Example:
Here, I first install Mandrake 9.0 to hda8. In this way, there is a [custom] During the installation process. [custom] is available when dividing hard disks and installing software. select this item and move the cursor to hda8, [edit, specify the partition format and mount point. The format is ext3, the mount point is/. OK, and then move hda10. Edit the partition in the format of/swap. This is simple. After all partitions are processed, select components to install them. Click the mouse below. Should be simple ...... Until the end.
Then we install redhat 8.0 to hda9. That is to say, we need to set the root partition of redhat 8.0 to hda9. the installation process is the same ...... When partitioning disks, [custom] disk druid is used for partitioning. Move the cursor to hda9 and then [edit]. The format is ext3. The mount point is/. A dialog box may pop up, so choose anyway. You don't need to edit the swap Zone any more, because the system can recognize that hda10 is a swap zone and we don't need to set it any more. Linux swap areas can be shared. After setting hda9, confirm it and start the software installation process. Also [custom for a long time]... Next, let's go all the way.
To the part set by GRUB. We need to install GRUB on MBR. In this way, the GRUB of mandrake is overwritten. This is nothing terrible. We can add it to the Redhat GRUB. After the system is installed, we can set it. Only modify the/etc/grub. conf file.
◆ 4. How to modify/etc/grub. conf
In general releases, GRUB configuration files are all in/etc/grub. conf. If we have installed Multiple linux instances, we need to modify this file. So how can we modify it? In general, windows is automatically loaded to grub. conf. Open grub. conf to view the settings of windows. Sometimes the system may suddenly fail to attract windwows. We need to make the following changes.
Title DOS
Rootnoverify hd0, 0)
Chainloader + 1
Change
Title ## here, WinXP is a required title. You can use another name.
Root hd0, 0)
Chainloader + 1
In this way, the instance can be started.
◆ 5. How to add the guidance of other linux systems to GRUB for guidance? We can use the following method. It is also relatively simple. GRUB guides the linux system through three lines.
Title XXX
Here, XXX is the name of the operating system you want to boot. You can decide by yourself.
Root hdX, Y)
Here, both X and Y represent a value. X is the hard disk on which the linux Root partition is located. If you only have one hard disk. That is, hd0. if one of your linux distributions is installed on the second hard disk, which X means 1. What does Y mean? Y indicates the region in which the linux is installed. This value is a bit different. There is no way to clarify the principles. Use instances. For example, I have installed mandrake to hda8. Then his root hdX, Y) should be written as root hd0, 7), that is, the Z in the root partition hdaZ where linux is located minus 1 is the value of Y: here, Z in hdaZ or hdbZ is also a numerical value. Take a look at the above example to understand.
Use fdisk-l or df-la to view
Kernel/boot/vmlinuz root =/dev/hdaZ
Here, Z is also a numerical value. In the above example, we add the Mandrake pilot to the GRUB of Redhat. You can write it as follows:
Kernel/boot/vmlinuz root =/dev/hda8
Through the above analysis, we want to let the GRUB of Redhat guide the Mandrake 9.0. We want to modify the GRUB configuration file in Redhat and add the following section:
Title MD 1, 8.0
Root hd0, 7)
Kernel/boot/vmlinuz root =/dev/hda8
If you want to add another operating system to GRUB in Redhat, this is the case. The same is true if you want to use GRUB in other releases to guide other releases.
Related Articles]
- How to reinstall windows to repair Ubuntu Grub
- MD5 encryption method of GRUB in Linux
- Grub installation, configuration, and usage