[PATCH] EFI GPT: reduce alternate header probing
EFI partitioning scheme was reading the last reported sector of the block device to look for the alternate GPT header, before it had confirmed that it should. This causes problems for devices with the following problems: a) those who misreport their size (typically off-by-one), and b) those who fail when asked to read a block outside their range. This patch moves the test for the Protective Master Boot Record (PMBR) ahead of the tests for the Primary and Alternate GPT headers. If the PMBR is not valid, the disk is assumed to not be a GPT disk. This can be overridden with the 'gpt' kernel command line option. If the Primary GPT header is not valid, the Alternate GPT header is not probed automatically unless the 'gpt' kernel command line option is passed. If the both the PMBR and Primary GPT header are valid, then the Alternate GPT header at the end of the disk is probed. Also re-enables CONFIG_EFI_PARTITION for all architectures. Signed-off-by: Matt Domsch <Matt_Domsch@dell.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Showing
This diff is collapsed.
Please register or sign in to comment