1.gparted 先切出未分配空间。
2.fdisk 进行添加分区,设置相应大小
先rreboot,不然会special device /dev/sda7 does not exist
3.mkfs.ext4 格式化
挂载,mount /dev/sdb1 /mnt/tmp
4.修改/etc/fstab
fdisk /dev/sda
Welcome to fdisk (util-linux 2.27.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
Command (m for help): p
Disk /dev/sda: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 4D8563CE-0F81-43AA-8C89-D6D03D895A6D
Device Start End Sectors Size Type
/dev/sda1 2048 1050623 1048576 512M EFI System
/dev/sda3 1937065984 1953523711 16457728 7.9G Linux swap
/dev/sda4 586989568 684643864 97654297 46.6G Linux filesystem
/dev/sda5 6