$sudofdisk /dev/sdb
Welcome to fdisk (util-linux 2.23.2).
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
Building a new DOS disklabel with disk identifier 0xa6bc9924.Command (m for help): m #查看一下命令
Command action
a toggle a bootable flag
b edit bsd disklabel
c toggle the dos compatibility flag
d delete a partition
g create a new empty GPT partition table
G create an IRIX (SGI) partition table
l list known partition types
m print this menu
n add a new partition
o create a new empty DOS partition table
p print the partition table
q quit without saving changes
s create a new empty Sun disklabel
t change a partition’s system id
u change display/entry units
v verify the partition table
w write table to disk and exit
x extra functionality (experts only)Command (m for help): n #n 表示添加新分区
Partition type:
p primary (0 primary, 0 extended, 4 free)
e extendedSelect (default p): #一个硬盘可以有4个主分区,多个扩展分区,使用默认即可
Using default response pPartition number (1-4, default 1): #默认创建第一个主分区,默认即可
First sector (2048-, default 2048): #第一个主分区的开始扇区,默认即可
Using default value 2048Last sector, +sectors or +size{K,M,G} (2048-, default ): #第一个主分区的结束扇区,默认即可
Using default value
Partition 1 of type Linux and of size 8 GiB is setCommand (m for help): p #打印一下分区表的信息,确认一下
Disk /dev/sdb: 8589 MB, bytes, 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
Disk label type: dos
Disk identifier: 0xa6bc9924
Device Boot Start End Blocks Id System
/dev/sdb1 2048 83 LinuxCommand (m for help): w #将分区表写入磁盘并退出
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.


版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容,请联系我们,一经查实,本站将立刻删除。
如需转载请保留出处:https://51itzy.com/kjqy/140772.html