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类型了,并且数据完好无损。

相关推荐
序属秋秋秋30 分钟前
《Linux系统编程之入门基础》【Linux基础 理论+命令】(上)
linux·运维·服务器·ubuntu·centos·命令模式
知白守黑2672 小时前
docker资源限制
运维·docker·容器
霍格沃兹测试开发学社测试人社区3 小时前
新手指南:通过 Playwright MCP Server 为 AI Agent 实现浏览器自动化能力
运维·人工智能·自动化
ximy13353 小时前
AI服务器工作之服务器的种类分类
运维·服务器
恒创科技HK4 小时前
香港服务器CPU中E5和Gold的区别
运维·服务器
一张假钞5 小时前
Ubuntu SSH 免密码登陆
linux·ubuntu·ssh
Wang's Blog6 小时前
Linux小课堂: 文件操作警惕高危删除命令与深入文件链接机制
linux·运维·服务器
水月wwww7 小时前
操作系统——进程管理
linux·操作系统·vim·进程·进程调度
2501_915909067 小时前
iOS 混淆实战,多工具组合完成 IPA 混淆与加固(源码 + 成品 + 运维一体化方案)
android·运维·ios·小程序·uni-app·iphone·webview
我科绝伦(Huanhuan Zhou)7 小时前
分享一个可以一键制作在线yum源的脚本
linux·运维