Article Title: Hard Disk partitioning and Grub boot settings for multiple operating systems. 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.
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? How big should each area be?
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, what do you do ?? Select and install components as needed.
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.
Take a closer look at the following example:
Here, I 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 1148 7 HPFS/NTFS/dev/hda2 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 3825 + B Win95 FAT32/dev/hda8 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.
[1] [2] Next page