merge with mainline
This commit is contained in:
commit
2fb384544a
6 changed files with 80 additions and 22 deletions
40
ChangeLog
40
ChangeLog
|
@ -1,3 +1,43 @@
|
||||||
|
2010-10-26 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* util/grub-setup.c (setup): Refuse to do a cross-disk embeddingless
|
||||||
|
install rather than creating a broken install.
|
||||||
|
|
||||||
|
2010-10-26 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* util/grub-setup.c (argp): Remove misleading example of installing to
|
||||||
|
a partition.
|
||||||
|
|
||||||
|
2010-10-26 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* util/grub-setup.c (setup): Clarify the error message.
|
||||||
|
|
||||||
|
2010-10-26 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* include/grub/types.h (grub_target_off_t): Removed no longer used type.
|
||||||
|
|
||||||
|
2010-10-23 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* grub-core/kern/emu/misc.c
|
||||||
|
(grub_make_system_path_relative_to_its_root)
|
||||||
|
[HAVE_LIBZFS && HAVE_LIBNVPAIR]: Fix mountpoint return on ZFS.
|
||||||
|
|
||||||
|
2010-10-23 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* grub-core/kern/emu/misc.c
|
||||||
|
(grub_make_system_path_relative_to_its_root): Revert r2882.
|
||||||
|
|
||||||
|
2010-10-22 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* grub-core/lib/relocator.c (grub_relocator_subchunk): Remove now
|
||||||
|
useless field head. All users updated.
|
||||||
|
(free_subchunk): Correct handling of IN_REGION subchunk.
|
||||||
|
|
||||||
|
2010-10-22 Colin Watson <cjwatson@ubuntu.com>
|
||||||
|
|
||||||
|
* docs/grub.texi (Installing GRUB using grub-install): Proofread.
|
||||||
|
(Supported kernels): Likewise.
|
||||||
|
|
||||||
2010-10-18 Grégoire Sutre <gregoire.sutre@gmail.com>
|
2010-10-18 Grégoire Sutre <gregoire.sutre@gmail.com>
|
||||||
|
|
||||||
Make mktemp invocations portable.
|
Make mktemp invocations portable.
|
||||||
|
|
|
@ -559,11 +559,12 @@ always. Therefore, GRUB provides you with a map file called the
|
||||||
@dfn{device map}, which you must fix if it is wrong. @xref{Device
|
@dfn{device map}, which you must fix if it is wrong. @xref{Device
|
||||||
map}, for more details.
|
map}, for more details.
|
||||||
|
|
||||||
On BIOS platforms GRUB has to use a so called embedding zone. On msdos
|
On BIOS platforms GRUB has to use a so-called embedding zone. On msdos
|
||||||
partition tables it's the space between MBR and first partition (called
|
partition tables, this is the space between the MBR and the first partition
|
||||||
MBR gap), on GPT partition it uses a BIOS Boot Partition (a partition
|
(called the MBR gap or the boot track), while on GPT partition tables it
|
||||||
having type 21686148-6449-6e6f-744e656564454649). If you use GRUB on
|
uses a BIOS Boot Partition (a partition with GUID
|
||||||
BIOS be sure to supply at least 31 KiB of embedding zone (512KiB or more
|
21686148-6449-6e6f-744e656564454649). If you use GRUB on a BIOS system, make
|
||||||
|
sure that the embedding zone is at least 31 KiB (512KiB or more
|
||||||
recommended).
|
recommended).
|
||||||
|
|
||||||
If you still do want to install GRUB under a UNIX-like OS (such
|
If you still do want to install GRUB under a UNIX-like OS (such
|
||||||
|
@ -617,9 +618,9 @@ installation. The format is defined in @ref{Device map}. Please be
|
||||||
quite careful. If the output is wrong, it is unlikely that your
|
quite careful. If the output is wrong, it is unlikely that your
|
||||||
computer will be able to boot with no problem.
|
computer will be able to boot with no problem.
|
||||||
|
|
||||||
Some BIOSes have a bug of exposing first partition of USB pendrive as a floppy
|
Some BIOSes have a bug of exposing the first partition of a USB drive as a
|
||||||
instead of exposing pendrive as a hard disk (they call it ``USB-FDD'' boot)
|
floppy instead of exposing the USB drive as a hard disk (they call it
|
||||||
In such cases you need to install as following:
|
``USB-FDD'' boot). In such cases, you need to install like this:
|
||||||
|
|
||||||
@example
|
@example
|
||||||
# @kbd{losetup /dev/loop0 /dev/sdb1}
|
# @kbd{losetup /dev/loop0 /dev/sdb1}
|
||||||
|
@ -3295,7 +3296,7 @@ commands.
|
||||||
@node Supported kernels
|
@node Supported kernels
|
||||||
@chapter Supported boot targets
|
@chapter Supported boot targets
|
||||||
|
|
||||||
X86 support is summarised in following table. ``Yes'' means that kernel works on the given platform, ``crashes'' means an early kernel crash which we hove will be fixed by concerned kernel developpers. ``no'' means GRUB doesn't load given kernel on a given platform. ``headless'' means that the kernel works but lacks console drivers (you can still use serial or network console). In case of ``no'' and ``crashes'' the reason is given in footnote.
|
X86 support is summarised in the following table. ``Yes'' means that the kernel works on the given platform, ``crashes'' means an early kernel crash which we hope will be fixed by concerned kernel developers. ``no'' means GRUB doesn't load the given kernel on a given platform. ``headless'' means that the kernel works but lacks console drivers (you can still use serial or network console). In case of ``no'' and ``crashes'' the reason is given in footnote.
|
||||||
@multitable @columnfractions .50 .22 .22
|
@multitable @columnfractions .50 .22 .22
|
||||||
@item @tab BIOS @tab Coreboot
|
@item @tab BIOS @tab Coreboot
|
||||||
@item BIOS chainloading @tab yes @tab no (1)
|
@item BIOS chainloading @tab yes @tab no (1)
|
||||||
|
|
|
@ -406,7 +406,25 @@ grub_make_system_path_relative_to_its_root (const char *path)
|
||||||
|
|
||||||
/* buf is another filesystem; we found it. */
|
/* buf is another filesystem; we found it. */
|
||||||
if (st.st_dev != num)
|
if (st.st_dev != num)
|
||||||
break;
|
{
|
||||||
|
/* offset == 0 means path given is the mount point.
|
||||||
|
This works around special-casing of "/" in Un*x. This function never
|
||||||
|
prints trailing slashes (so that its output can be appended a slash
|
||||||
|
unconditionally). Each slash in is considered a preceding slash, and
|
||||||
|
therefore the root directory is an empty string. */
|
||||||
|
if (offset == 0)
|
||||||
|
{
|
||||||
|
free (buf);
|
||||||
|
free (buf2);
|
||||||
|
#if defined(HAVE_LIBZFS) && defined(HAVE_LIBNVPAIR)
|
||||||
|
if (poolfs)
|
||||||
|
return xasprintf ("/%s/@", poolfs);
|
||||||
|
#endif
|
||||||
|
return xstrdup ("");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
offset = p - buf;
|
offset = p - buf;
|
||||||
/* offset == 1 means root directory. */
|
/* offset == 1 means root directory. */
|
||||||
|
@ -434,10 +452,7 @@ grub_make_system_path_relative_to_its_root (const char *path)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* This works around special-casing of "/" in Un*x. This function never
|
/* Remove trailing slashes, return empty string if root directory. */
|
||||||
prints trailing slashes (so that its output can be appended a slash
|
|
||||||
unconditionally). Each slash in it is considered a preceding slash,
|
|
||||||
and therefore the root directory is an empty string. */
|
|
||||||
len = strlen (buf3);
|
len = strlen (buf3);
|
||||||
while (len > 0 && buf3[len - 1] == '/')
|
while (len > 0 && buf3[len - 1] == '/')
|
||||||
{
|
{
|
||||||
|
|
|
@ -40,7 +40,6 @@ struct grub_relocator_subchunk
|
||||||
#endif
|
#endif
|
||||||
} type;
|
} type;
|
||||||
grub_mm_region_t reg;
|
grub_mm_region_t reg;
|
||||||
grub_mm_header_t head;
|
|
||||||
grub_phys_addr_t start;
|
grub_phys_addr_t start;
|
||||||
grub_size_t size;
|
grub_size_t size;
|
||||||
grub_size_t pre_size;
|
grub_size_t pre_size;
|
||||||
|
@ -355,11 +354,11 @@ free_subchunk (const struct grub_relocator_subchunk *subchu)
|
||||||
}
|
}
|
||||||
case CHUNK_TYPE_IN_REGION:
|
case CHUNK_TYPE_IN_REGION:
|
||||||
{
|
{
|
||||||
grub_mm_header_t h = (grub_mm_header_t) ALIGN_DOWN ((grub_addr_t) subchu->head,
|
grub_mm_header_t h = (grub_mm_header_t) ALIGN_DOWN ((grub_addr_t) subchu->start,
|
||||||
GRUB_MM_ALIGN);
|
GRUB_MM_ALIGN);
|
||||||
h->size
|
h->size
|
||||||
= ((subchu->start + subchu->size + GRUB_MM_ALIGN - 1) / GRUB_MM_ALIGN)
|
= ((subchu->start + subchu->size + GRUB_MM_ALIGN - 1) / GRUB_MM_ALIGN)
|
||||||
- (subchu->start / GRUB_MM_ALIGN);
|
- (subchu->start / GRUB_MM_ALIGN) - 1;
|
||||||
h->next = h;
|
h->next = h;
|
||||||
h->magic = GRUB_MM_ALLOC_MAGIC;
|
h->magic = GRUB_MM_ALLOC_MAGIC;
|
||||||
grub_free (h + 1);
|
grub_free (h + 1);
|
||||||
|
@ -971,7 +970,6 @@ malloc_in_range (struct grub_relocator *rel,
|
||||||
|| typepre == CHUNK_TYPE_IN_REGION)
|
|| typepre == CHUNK_TYPE_IN_REGION)
|
||||||
{
|
{
|
||||||
curschu->reg = events[last_start].reg;
|
curschu->reg = events[last_start].reg;
|
||||||
curschu->head = events[last_start].head;
|
|
||||||
curschu->pre_size = alloc_start - events[j - 1].pos;
|
curschu->pre_size = alloc_start - events[j - 1].pos;
|
||||||
}
|
}
|
||||||
if (!oom && (typepre == CHUNK_TYPE_REGION_START
|
if (!oom && (typepre == CHUNK_TYPE_REGION_START
|
||||||
|
|
|
@ -84,12 +84,10 @@ typedef unsigned long long grub_uint64_t;
|
||||||
/* Misc types. */
|
/* Misc types. */
|
||||||
#if GRUB_TARGET_SIZEOF_VOID_P == 8
|
#if GRUB_TARGET_SIZEOF_VOID_P == 8
|
||||||
typedef grub_uint64_t grub_target_addr_t;
|
typedef grub_uint64_t grub_target_addr_t;
|
||||||
typedef grub_uint64_t grub_target_off_t;
|
|
||||||
typedef grub_uint64_t grub_target_size_t;
|
typedef grub_uint64_t grub_target_size_t;
|
||||||
typedef grub_int64_t grub_target_ssize_t;
|
typedef grub_int64_t grub_target_ssize_t;
|
||||||
#else
|
#else
|
||||||
typedef grub_uint32_t grub_target_addr_t;
|
typedef grub_uint32_t grub_target_addr_t;
|
||||||
typedef grub_uint32_t grub_target_off_t;
|
|
||||||
typedef grub_uint32_t grub_target_size_t;
|
typedef grub_uint32_t grub_target_size_t;
|
||||||
typedef grub_int32_t grub_target_ssize_t;
|
typedef grub_int32_t grub_target_ssize_t;
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -385,7 +385,7 @@ setup (const char *dir,
|
||||||
|
|
||||||
if (! dest_partmap)
|
if (! dest_partmap)
|
||||||
{
|
{
|
||||||
grub_util_warn (_("Attempting to install GRUB to a partitionless disk. This is a BAD idea."));
|
grub_util_warn (_("Attempting to install GRUB to a partitionless disk or to a partition. This is a BAD idea."));
|
||||||
goto unable_to_embed;
|
goto unable_to_embed;
|
||||||
}
|
}
|
||||||
if (multiple_partmaps || fs)
|
if (multiple_partmaps || fs)
|
||||||
|
@ -482,6 +482,12 @@ unable_to_embed:
|
||||||
grub_util_error (_("embedding is not possible, but this is required when "
|
grub_util_error (_("embedding is not possible, but this is required when "
|
||||||
"the root device is on a RAID array or LVM volume"));
|
"the root device is on a RAID array or LVM volume"));
|
||||||
|
|
||||||
|
#ifdef GRUB_MACHINE_PCBIOS
|
||||||
|
if (dest_dev->disk->id != root_dev->disk->id)
|
||||||
|
grub_util_error (_("embedding is not possible, but this is required for "
|
||||||
|
"cross-disk install"));
|
||||||
|
#endif
|
||||||
|
|
||||||
grub_util_warn (_("Embedding is not possible. GRUB can only be installed in this "
|
grub_util_warn (_("Embedding is not possible. GRUB can only be installed in this "
|
||||||
"setup by using blocklists. However, blocklists are UNRELIABLE and "
|
"setup by using blocklists. However, blocklists are UNRELIABLE and "
|
||||||
"their use is discouraged."));
|
"their use is discouraged."));
|
||||||
|
@ -822,7 +828,7 @@ Set up images to boot from DEVICE.\n\
|
||||||
\n\
|
\n\
|
||||||
You should not normally run this program directly. Use grub-install instead.")
|
You should not normally run this program directly. Use grub-install instead.")
|
||||||
"\v"N_("\
|
"\v"N_("\
|
||||||
DEVICE must be an OS device (e.g. /dev/sda1)."),
|
DEVICE must be an OS device (e.g. /dev/sda)."),
|
||||||
NULL, help_filter, NULL
|
NULL, help_filter, NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue