无忧启动论坛

 找回密码
 注册
搜索
系统gho:最纯净好用系统下载站广告联系 微信:wuyouceo QQ:184822951
查看: 5061|回复: 16
打印 上一主题 下一主题

[已解决] 请教关于 grub4dos 读取 gpt 磁盘的问题

[复制链接]
跳转到指定楼层
1#
发表于 2020-5-31 18:47:05 | 显示全部楼层 回帖奖励 |倒序浏览 |阅读模式
本帖最后由 wintoflash 于 2020-6-1 07:10 编辑

请问 grub4dos 读取 GPT 分区表磁盘时,会不会忽略 protective MBR 里面记录的分区信息 (比如 CHS)?

如果 protective MBR 里面的分区 CHS 之类的全是乱的,会不会导致 grub4dos 不认这个磁盘?
2#
 楼主| 发表于 2020-5-31 20:09:13 | 显示全部楼层
2011yaya2007777 发表于 2020-5-31 19:53
首先要判断是否为有效的MBR分区表,因此不会忽略分区表信息。

如果只有 CHS 是乱填的,会不会有影响?
回复

使用道具 举报

3#
 楼主| 发表于 2020-5-31 20:59:08 | 显示全部楼层
不点 发表于 2020-5-31 20:35
grub4dos 在读盘时,首先要确定 c/h/s 的值,以及 lba 的支持与否。如果确定不了这些关键信息,那就无法进 ...

是这样的,这个问题来自 https://github.com/a1ive/grub/issues/26
NOTE:For partitions which begin or end beyond  the 1024th cylinder, the three CHS bytes should always be filled with: FE FF FF ; which are decoded as follows:Byte 1:  FEh = 254  for a total of 255 heads.Bytes 2 and 3:  FFh and FFh — split into two full binary counts of 6 bits (11 1111; 3Fh = 63 sectors), and 10 bits (11 1111 1111) or 3FFh = 1023 for a total of 1024 cylinders. CHS: 1023, 254, 63.This tuple corresponds to an LBA sector of: 16450559. That's a point where about  8.4 GB of hard disk sectors could be accessed (16,450,560 sectors * 512 bytes/sector = 8,422,686,720 bytes).16-byte partition table entries can not exceed 1024 cylinders for their Starting and Ending CHS bytes!  When utility programs display CHS tuples with a cylinder value larger than 1023, they can only do so by computing pseudo-CHS values from the 4-byte "Starting Sector" or "Partition Size" values.

如果是一个很大的分区,chs应该是 fe ff ff,但是根据uefi的规范,gpt分区表硬盘的mbr上chs应该填 ff ff ff。
回复

使用道具 举报

4#
 楼主| 发表于 2020-5-31 21:17:57 | 显示全部楼层
2011yaya2007777 发表于 2020-5-31 21:13
应该不会这样规定吧。在哪个文件里?我觉得应当是feffff.

Set to the CHS address of the last logical block on the disk. Set to 0xFFFFFF if it is not possible to represent the value in this field.

https://uefi.org/sites/default/f ... pec_2_8_A_Feb14.pdf
116页
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|捐助支持|无忧启动 ( 闽ICP备05002490号-1 )

闽公网安备 35020302032614号

GMT+8, 2024-5-5 03:38

Powered by Discuz! X3.3

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表