stu*_*uck 5 linux windows diskpart parted gpt
当我在 GPT 分区上设置“隐藏”标志时,Windows 8.1 不尊重它(Windows 尝试堆积、抛出 UI 等)。但是,如果我从 diskpart.exe 设置“隐藏”标志,它会受到尊重 - 这两个“隐藏”是否不同?
我如何从 Linux 设置位,使其在 Windows 中受到尊重?
GNU Parted 3.0
Using /dev/sda
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print
print
Model: LaCie P9220 (scsi)
Disk /dev/sda: 1000GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
1 1049kB 8001MB 8000MB fat32 SD_Recovery
2 8001MB 8101MB 101MB ext4 SD_OS hidden
3 8101MB 8201MB 99.6MB SD_Page hidden
4 8201MB 520GB 512GB ext4 SD_Data0 hidden
5 520GB 1000GB 480GB ext4 SD_Data1 hidden
Run Code Online (Sandbox Code Playgroud)
和来自 Windows 的同一个磁盘
DISKPART> lis vol
Volume ### Ltr Label Fs Type Size Status Info
---------- --- ----------- ----- ---------- ------- --------- --------
...
Volume 7 E FAT32 Partition 7629 MB Healthy
Volume 8 H RAW Partition 96 MB Healthy
Volume 9 I RAW Partition 95 MB Healthy
Volume 10 J RAW Partition 476 GB Healthy
Volume 11 K RAW Partition 447 GB Healthy
DISKPART>
Run Code Online (Sandbox Code Playgroud)
小智 4
我不确定parted使用哪些属性bits来定义隐藏分区,您需要查看源代码。但从你所经历的来看,它一定是不同的。
Microsoft 为 GPT 定义了以下分区属性:位 60 - 只读、位 62 - 隐藏、位 63 - 不自动挂载
有关详细信息,请参阅这篇 wiki 文章。
您将如何在 Linux 上执行此操作?好吧,您可以检查parted文档,看看是否允许您为分区条目设置自定义属性位;如果没有,那么您需要修改源代码以使其设置微软也使用的位。
| 归档时间: |
|
| 查看次数: |
6357 次 |
| 最近记录: |