linux 磁盘标签类型MBR转换为GPT

root@localhost /\]# fdisk -l 磁盘 /dev/sda:299.4 GB, 299439751168 字节,584843264 个扇区 Units = 扇区 of 1 \* 512 = 512 bytes 扇区大小(逻辑/物理):512 字节 / 512 字节 I/O 大小(最小/最佳):512 字节 / 512 字节 磁盘标签类型:dos 磁盘标识符:0x000e7372 设备 Boot Start End Blocks Id System /dev/sda1 \* 2048 2099199 1048576 83 Linux /dev/sda2 2099200 584843263 291372032 8e Linux LVM 磁盘 /dev/mapper/centos-root:53.7 GB, 53687091200 字节,104857600 个扇区 Units = 扇区 of 1 \* 512 = 512 bytes 扇区大小(逻辑/物理):512 字节 / 512 字节 I/O 大小(最小/最佳):512 字节 / 512 字节 磁盘 /dev/mapper/centos-swap:16.8 GB, 16844324864 字节,32899072 个扇区 Units = 扇区 of 1 \* 512 = 512 bytes 扇区大小(逻辑/物理):512 字节 / 512 字节 I/O 大小(最小/最佳):512 字节 / 512 字节 磁盘 /dev/mapper/centos-home:227.8 GB, 227826204672 字节,444973056 个扇区 Units = 扇区 of 1 \* 512 = 512 bytes 扇区大小(逻辑/物理):512 字节 / 512 字节 I/O 大小(最小/最佳):512 字节 / 512 字节 \[root@localhost /\]# #### 利用gdisk工具进行分区转换 ``` [root@localhost /]# yum install -y gdisk ``` 转换/dev/sda2分区,sda1分区为系统启动分区,不需要转换 [root@localhost /]# gdisk /dev/sda2 GPT fdisk (gdisk) version 0.8.10 Partition table scan: MBR: not present BSD: not present APM: not present GPT: not present Creating new GPT entries. Command (? for help): w Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING PARTITIONS!! Do you want to proceed? (Y/N): 输入y,开始 OK; writing new GUID partition table (GPT) to /dev/sda2. Warning: The kernel is still using the old partition table. The new table will be used at the next reboot. The operation has completed successfully. [root@localhost /]# 查看分区类型 [root@localhost /]# fdisk -l /dev/sda2 WARNING: fdisk GPT support is currently new, and therefore in an experimental phase. Use at your own discretion. 磁盘 /dev/sda2:298.4 GB, 298364960768 字节,582744064 个扇区 Units = 扇区 of 1 * 512 = 512 bytes 扇区大小(逻辑/物理):512 字节 / 512 字节 I/O 大小(最小/最佳):512 字节 / 512 字节 磁盘标签类型:gpt Disk identifier: CCBAA7C6-614C-4A45-BD26-2B2EDE14236D # Start End Size Type Name [root@localhost /]# 已经转换为GPT类型了,并且数据完好无损。

相关推荐
大聪明-PLUS30 分钟前
编写您自己的 Linux 操作系统引导加载程序
linux·嵌入式·arm·smarc
渡我白衣31 分钟前
Reactor与多Reactor设计:epoll实战
linux·网络·人工智能·网络协议·tcp/ip·信息与通信·linux网络编程
L16247631 分钟前
linux系统中YUM安装MySQL数据库详细教程
linux·数据库·mysql
阿豪学编程37 分钟前
【Linux】线程基础:控制逻辑与封装指南
linux·运维·服务器
默默在路上37 分钟前
M芯片使用VMware Fusion安装CentOS Stream 9教程
linux·macos·centos
爱敲点代码的小哥41 分钟前
【无标题】
linux·windows·microsoft
liulilittle1 小时前
ISIF Cloud HKG-B/HKG-C解锁(NSP)
linux·运维·服务器
小杰s1 小时前
linux下mysql忘记密码
linux·mysql·adb
没有bug.的程序员1 小时前
中台与微服务的关系:从技术迷雾到组织协同的深度解构
运维·微服务·devops·架构设计·数字化转型·中台架构·组织协同
坐怀不乱杯魂1 小时前
Linux - 缓存利用率
linux·c++·缓存