Linux laruence's private dish (3)-host planning and disk partition Reading Notes

Source: Internet
Author: User

  1. IDE \ Jumper
  1. Master
  1. Slave
  1. IDE1 (Primary)
  1. /Dev/hda
  1. /Dev/hdb
  1. IDE2 (Secondary)
  1. /Dev/hdc
  1. /Dev/hdd
1. The file names of each Hardware Device in Linux are in the Linux system, and each device is treated as a file. And almost all hardware device files are in the/dev directory. the relationship between the disk connection mode and the device file name is based on the IDE interface. Because an IDE flat cable can be used to connect two IDE devices, the host usually provides two IDE interfaces, therefore, you can connect to up to four IDE devices. These two IDE interfaces are generally called IDE1 (primary) and IDE2 (secondary), and the IDE Device on each flat cable can be distinguished as Master and Slave. The names of the four IDE devices are determined by the order in which the SATA/USB interface device files are detected by the Linux kernel.
If your PC has two SATA disks and one USB disk, and the motherboard has six SATA slots. These two SATA disks are respectively installed in SATA1 and SATA5 slots on the motherboard. What is the device file name of these three disks in Linux? File Name on the SATA1 slot:/dev/sdaSATA5 slot file name:/dev/sdbU disk (recognized by the system after startup ): /dev/sdc3. disk composition review disk composition: disk, mechanical arm, head and Spindle Motor Disk: sector (sector) and Cylinder (Cylinder ), the first sector of each slice records two important information: Master Boot Record (MBR): Where the Boot loader can be installed, there is a 446 bytes partition table (partition table ): record the status of the entire hard disk partition. The minimum unit of the 64-bytes cylindrical file system is also the smallest unit of the partition. The partition is divided by the cylindrical number. In linux, the file names are respectively (assume the hard drive device file name is/dev/sda): P1:/dev/sda1 P2:/dev/sda2 P3:/dev/sda3 P4: /dev/sda4. in Windows, it corresponds to the C, D, E, and F disk partitions. Note that the so-called "partition" is only used to configure the 64-bytes partition table! By default, the partition table of the hard disk can only write information about the four-component partition. We call it the Primary partition or Extended partition. The minimum unit of the partition is cylinder) when the system needs to write data to the disk, it must refer to the disk partition table to process Extended partitions for a partition: Because the partition table where the first sector is located) you can only record four data records. You can use an additional sector to record more partition information. The partition partitioned by an extended partition, called a logical partition, corresponds to the device name P1:/dev/sda1 P2:/dev/sda2 L1 in Linux: /dev/sda5 L2:/dev/sd6 L3:/dev/sda7 L4:/dev/sda8 L5: the first four numbers of/dev/sda9 are reserved for Primary or Extended, and the number of the device in the logical partition starts from 5. Primary partition, extended partition, and logical partition features: Primary partition and extended partition can have up to four (Hard Disk restrictions) extended partitions can have up to one (Operating System Restrictions) A logical partition is a segmentation slot that is continuously cut out by an extended partition. After being formatted, it is used as the primary partition and logical partition for data access. Extended partitions cannot be formatted. The number of logical partitions varies according to the operating system. In Linux, the IDE Hard Disk can have a maximum of 59 logical partitions (numbers 5 to 63 ), the SATA hard drive has 11 logical partitions (numbers 5 to 15 ). Boot Process and Main Boot partition (MBR) BIOS: the software that is actively executed during boot will know the first device to boot MBR: the primary boot partition in the first sector of the first boot device, which contains the boot loader. Boot loader: A software Kernel File that can be read/written to the kernel file for execution: Start the operating system function Boot loader function: Provides the menu: you can choose different boot options. The multi-boot function loads the Kernel File: directly points to the program segment that can be started to start the operating system and transfers it to another loader: the boot loader function is transferred to other loaders to take charge of the preceding three notes: in addition to being able to install the boot loader in MBR, it can also be installed in the boot sector of each partition. Summary: each partition has its own boot sector (boot sector). The system partitions in the figure are the first and second partitions. The actual core files that can be started are placed in each partition! Loader only recognizes the core file that can be started in its system partition, and other loaders. loader can direct directly or indirectly forward management rights to another management program. If you want to install multi-boot, it is best to install Windows before installing Linux: when installing Linux, you can choose to install the startup management program on the MBR or the startup sector of individual partitions, in addition, you can manually configure the menu (M1, m2...) for Linux loader ...), therefore, you can add the Windows Startup option to the Linux boot loader. During Windows installation, the installer will overwrite the MBR and the startup sector of the partition, you don't have a chance to choose, and he didn't let us select the menu function. 4. Selection of disk partitions in Linux installation mode (very important)

The root directory is the primary, indicating the method "/".

"Mount": Use a directory as the entry point, and place the data in the disk partition under this directory, that is, you can access the data in this partition.

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.