0002-Do-not-force-GUID-partition-with-gpt-command-line-op.patch 1.0 KB

12345678910111213141516171819202122232425262728293031323334
  1. From 7d49850b0a41f6db81dfeb0a829d4b7e66ddb473 Mon Sep 17 00:00:00 2001
  2. From: SolidHal <hal@halemmerich.com>
  3. Date: Fri, 24 Aug 2018 11:31:45 -0500
  4. Subject: [PATCH] Do not force GUID partition with 'gpt' command line option.
  5. Fixes a bug where left over partition tables that aren't over written are read
  6. instead of the proper partition table.
  7. Described here: https://bugs.chromium.org/p/chromium/issues/detail?id=260040
  8. Signed-off-by: SolidHal <hal@halemmerich.com>
  9. ---
  10. block/partitions/efi.c | 6 +++++-
  11. 1 file changed, 5 insertions(+), 1 deletion(-)
  12. diff --git a/block/partitions/efi.c b/block/partitions/efi.c
  13. index aa08380..ffcdc16 100644
  14. --- a/block/partitions/efi.c
  15. +++ b/block/partitions/efi.c
  16. @@ -112,7 +112,11 @@ static int force_gpt;
  17. static int __init
  18. force_gpt_fn(char *str)
  19. {
  20. - force_gpt = 1;
  21. + /* Do not force GPT even if 'gpt' command line option is
  22. + * specified for ChromeOS kernel.
  23. + */
  24. + force_gpt = 0;
  25. + pr_warn("Not forcing GPT even though 'gpt' specified on cmd line.\n");
  26. return 1;
  27. }
  28. __setup("gpt", force_gpt_fn);
  29. --
  30. 2.11.0