首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >将磁盘类型从Microsoft更改为Linux文件系统

将磁盘类型从Microsoft更改为Linux文件系统
EN

Unix & Linux用户
提问于 2019-02-13 19:43:46
回答 1查看 12.3K关注 0票数 3

我不清楚这是从哪里来的,虽然看起来很漂亮,但我想把我的磁盘类型从Microsoft改为Linux文件系统

代码语言:javascript
运行
复制
    WARNING: fdisk GPT support is currently new, and therefore in an experimental phase. Use at your own discretion.

Disk /dev/sda: 50.0 GB, 50010783744 bytes, 97677312 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 1048576 bytes
Disk label type: gpt
Disk identifier: 5E29C82B-93C9-47D8-B99C-A8DD0C1A2970


#         Start          End    Size  Type            Name
 1         2048       411647    200M  EFI System      EFI System Partition
 2       411648     17188863      8G  Linux swap
 3     17188864     97675263   38.4G  Microsoft basic
EN

回答 1

Unix & Linux用户

回答已采纳

发布于 2019-02-13 20:39:01

是的,对于Linux来说,这完全是表面的。

Type字段基于GPT分区表中的分区类型GUID和有很多可能的类型。

使用Linux fdisk更改分区类型GUID不应该以任何方式更改分区的内容。但是基于WARNING消息,您的fdisk版本似乎有点过时,因此您可能需要小心,首先备份任何关键数据。

基本上,你需要做的是:

代码语言:javascript
运行
复制
# fdisk /dev/sda
[...]
Command (m for help): t
Partition number (1-3, default 3): 3
Hex code (type L to list all codes): L

<A long list is displayed...> 
<Find the correct short code matching the "Linux filesystem" type GUID>

Hex code (type L to list all codes: <type the short code here>
Command (m for help): w

您的fdisk版本可能有一些不同。该示例使用以下方法生成:

代码语言:javascript
运行
复制
# fdisk --version
fdisk from util-linux 2.29.2
票数 4
EN
页面原文内容由Unix & Linux提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://unix.stackexchange.com/questions/500475

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档