Judgment method: 1. Use the "fdisk -l" command. If the value of "Disk label type" in the displayed result is dos, the partition is mbr. If the value of the result is gpt, the partition is gpt; 2. Use the "parted -l" command. If the value of "Partition Table" in the displayed result is msdos, the partition is mbr. If the value of the result is gpt, the partition is gpt.
#The operating environment of this tutorial: linux7.3 system, Dell G3 computer.
Method 1:
fdisk -l
The example is as follows:
Method 2:
parted -l
The example is as follows:
##Use the parted command to change the disk partition format[root@m8-9p51-duanzhengnan ~]# parted /dev/sdb (parted)mktable New disk label type? msdos Warning: The existing disk label on /dev/sdb will be destroyed and all data on this disk will be lost. Do you want to continue? Yes/No?Yes
parted /dev/sdb mklabel msdos -s #转换成mbr格式 parted /dev/sdb mklabel gpt -s #转化成gpt格式
The above is the detailed content of How to determine whether a partition is mbr or gpt in linux. For more information, please follow other related articles on the PHP Chinese website!