root@xiaoming:~# fdisk -l Disk /dev/loop0: 874.75 MiB, 917241856 bytes, 1791488 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 GPT PMBR size mismatch (2130463 != 2130494) will be corrected by write. The backup GPT table is corrupt, but the primary appears OK, so that will be used. The backup GPT table is not on the end of the device.
Disk /dev/sda: 1.02 GiB, 1090813440 bytes, 2130495 sectors Disk model: Virtual disk 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: 79C88912-01B9-8267-AA0B-42099DBC2600
Device Start End Sectors Size Type /dev/sda1 512 33279 32768 16M Linux filesystem /dev/sda2 33280 2130431 2097152 1G Linux filesystem /dev/sda128 34 511 478 239K BIOS boot
Partition table entries are not in disk order.
Disk /dev/sdb: 2 GiB, 2147483648 bytes, 4194304 sectors Disk model: Virtual disk Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes
Welcome to fdisk (util-linux 2.37.3). Changes will remain in memory only, until you decide to write them. Be careful before using the write command.
Device does not contain a recognized partition table. Created a new DOS disklabel with disk identifier 0x91cff149.
Command (m for help): n (输入n 创建分区) Partition type p primary (0 primary, 0 extended, 4 free) e extended (container for logical partitions) Select (default p): p (输入p 创建主分区) Partition number (1-4, default 1): (直接回车,默认创建一个分区) First sector (2048-4194303, default 2048): (直接回车) Last sector, +/-sectors or +/-size{K,M,G,T,P} (2048-4194303, default 4194303):(直接回车)
Created a new partition 1 of type 'Linux' and of size 2 GiB.
Command (m for help): w (输入w 写入分区表) The partition table has been altered. Calling ioctl() to re-read partition table. Syncing disks.
root@xiaoming:~# fdisk -l Disk /dev/loop0: 874.75 MiB, 917241856 bytes, 1791488 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 GPT PMBR size mismatch (2130463 != 2130494) will be corrected by write. The backup GPT table is corrupt, but the primary appears OK, so that will be used. The backup GPT table is not on the end of the device.
Disk /dev/sda: 1.02 GiB, 1090813440 bytes, 2130495 sectors Disk model: Virtual disk 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: 79C88912-01B9-8267-AA0B-42099DBC2600
Device Start End Sectors Size Type /dev/sda1 512 33279 32768 16M Linux filesystem /dev/sda2 33280 2130431 2097152 1G Linux filesystem /dev/sda128 34 511 478 239K BIOS boot
Partition table entries are not in disk order.
Disk /dev/sdb: 2 GiB, 2147483648 bytes, 4194304 sectors Disk model: Virtual disk 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: dos Disk identifier: 0x91cff149
Device Boot Start End Sectors Size Id Type /dev/sdb1 2048 4194303 4192256 2G 83 Linux