]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
2009-05-13 Robert Millan <rmh.grub@aybabtu.com>
authorrobertmh <robertmh@localhost>
Wed, 13 May 2009 21:13:11 +0000 (21:13 +0000)
committerrobertmh <robertmh@localhost>
Wed, 13 May 2009 21:13:11 +0000 (21:13 +0000)
        Improve warning messages for cases where there's no embedding area,
        or when it is too small (or core.img too large).

ChangeLog
util/i386/pc/grub-setup.c

index 412d55043342e1d297cc02435e84d21431ab78b9..3cbeab5c74915ee1380d9cc39bf149a8aa007c48 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,8 @@
 
        * util/i386/pc/grub-setup.c (setup): Restructure code flow to make
        it easier to understand / work with.
+       Improve warning messages for cases where there's no embedding area,
+       or when it is too small (or core.img too large).
 
 2009-05-13  Pavel Roskin  <proski@gnu.org>
 
index 0847130b7cbaa8e2caf300d24c14aa89d8aed1d8..3b1beb74ac0c3e5767a8b9310fef029613e8e822 100644 (file)
@@ -337,13 +337,21 @@ setup (const char *dir,
                                           find_usable_region_gpt : find_usable_region_msdos));
   if (embed_region.end == embed_region.start)
     {
-      grub_util_warn ("Embedding area is not present at all!");
+      if (! strcmp (dest_partmap, "pc_partition_map"))
+       grub_util_warn ("This msdos-style partition label has no post-MBR gap; embedding won't be possible!");
+      else
+       grub_util_warn ("This GPT partition label has no BIOS Boot Partition; embedding won't be possible!");
       goto unable_to_embed;
     }
 
   if ((unsigned long) core_sectors > embed_region.end - embed_region.start)
     {
-      grub_util_warn ("Embedding area is too small for core.img.");
+      if (core_sectors > 62 * 512)
+       grub_util_warn ("Your core.img is unusually large.  It won't fit in the embedding area.");
+      else if (embed_region.end - embed_region.start < 62 * 512)
+       grub_util_warn ("Your embedding area is unusually small.  core.img won't fit in it.");
+      else
+       grub_util_warn ("Embedding area is too small for core.img.");
       goto unable_to_embed;
     }