The FDISK command partitioning process:
1. Add a new hard drive
2. View the new drive:
Fdisk-l
3. Use the FDISK command partition:
Fdisk hard drive device file name (e.g. Fdisk/dev/sdb)
Fdisk Interactive instruction Description:
4. Re-read the partition table information (must be restarted if not in effect):
Partprobe
5. Format the partition:
Mkfs-t EXT4/DEV/SDB1
6. Set up the mount point and mount it:
7. Automatic Partition mount:
Because FDISK partitions are mounted manually using the Mount command, each restart of the machine will fail. So we need to mount the partition automatically, that is, to write a configuration file/etc/fstab
Use the Mount-a Auto mount command to automatically mount the configuration file to test that the configuration file is correctly written to prevent the system from crashing.
8. If the configuration file is wrong, the Fstab file must be repaired to start properly, and the configuration file cannot be modified until the root directory is re-read or written before repair:
9. Allocate the SWAP partition:
The process of creating a new swap partition is to create a new normal partition and then change the partition ID to 82, which is the swap partition:
To format a swap partition:
Add a swap partition (similar to a normal partition) and cancel the swap partition:
Swap partition boot automatically mount:
Linux notes: File System Management-fdisk partition