2009-05-13 Robert Millan <rmh.grub@aybabtu.com>
Improve warning messages for cases where there's no embedding area, or when it is too small (or core.img too large).
This commit is contained in:
parent
667712d716
commit
59978c8ae7
2 changed files with 12 additions and 2 deletions
|
@ -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>
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue