Linux system partition
Recently, I have been interested in Linux. The following can be my learning notes or my learning experience.
System partitioning uses the Partition editor to divide several logical parts on different disks. In fact, this is also nonsense. The most vivid picture can be compared to your own cabinet.
Partition type: 1. primary partition: a maximum of four (the hard disk structure determines that the hard disk is divided into equal-size sectors, with each sector 512 bytes, of which 446 bytes are used to record startup information, and the remaining 64 bytes are used to represent partitions, every 16 bytes is a partition)
2. extended partition (one partition in the primary partition): the hard disk can only have one partition. data cannot be written and can only contain logical partitions.
3. Logical Partitioning
Formatting (not the kind of deletion, the fundamental purpose is to write to the file system): Logical formatting refers to the file system selected by the user (such as FAT16 (up to 2 GB partition is supported ), FAT32 (the size of a single file cannot exceed 4 GB), NTFS, EXT2, EXT3, EXT4, and so on), then write specific data to a specific Disk Area, and draw a partition to store the file allocation table, directory tables and other disk space used for file management.
Note: After formatting in Linux, the main task is to divide the entire partition into data blocks of the same size. By default, the data block size is 4 kb, And the redundant data blocks cannot be stored, the second is to create a two-dimensional table in the partition list, including the ID of each file, the modification time, the permission (the file is differentiated by the permission in file management), and the file storage location. Formatting does clear the data, but its purpose is not here. At the same time, we should know that everything in Linux is a file. /Dev Device File
Partition representation: 1-4 can only be allocated to the primary partition or extended partition, and the logical partition can only start from 5
Mount: Required partition:/(root partition) swap partition (similar to virtual memory). When the actual memory is no more than 4 GB, the memory is 2 times, not more than 2 GB; when 4 GB is exceeded, it is the same as the memory)
Recommended:/boot (boot partition, 200 M). If no/boot partition exists, it is started in/partition, and all data exists in/node. If all the memory in this partition is used up, the system cannot be started, because the system must have spare memory to start, about dozens of MB, so this/boot recommendation