+2011-01-07 Vladimir Serbinenko <phcoder@gmail.com>
+
+ * util/grub-setup.c (setup): Handle NetBSD and OpenBSD disklabels.
+ Reported and tested by: Grégoire Sutre.
+
2011-01-06 Colin Watson <cjwatson@ubuntu.com>
* tests/util/grub-shell.in: Set serial terminfo type to `dumb', to
#include <grub/emu/getroot.h>
#include "progname.h"
#include <grub/reed_solomon.h>
+#include <grub/msdos_partition.h>
#define _GNU_SOURCE 1
#include <argp.h>
{
if (p->parent != container)
return 0;
+ /* NetBSD and OpenBSD subpartitions have metadata inside a partition,
+ so they are safe to ignore.
+ */
+ if (grub_strcmp (p->partmap->name, "netbsd") == 0
+ || grub_strcmp (p->partmap->name, "openbsd") == 0)
+ return 0;
if (dest_partmap == NULL)
{
dest_partmap = p->partmap;
grub_partition_iterate (dest_dev->disk, identify_partmap);
+ if (container && grub_strcmp (container->partmap->name, "msdos") == 0
+ && dest_partmap
+ && (container->msdostype == GRUB_PC_PARTITION_TYPE_NETBSD
+ || container->msdostype == GRUB_PC_PARTITION_TYPE_OPENBSD))
+ {
+ grub_util_warn (_("Attempting to install GRUB to a disk with multiple partition labels or both partition label and filesystem. This is not supported yet."));
+ goto unable_to_embed;
+ }
+
fs = grub_fs_probe (dest_dev);
if (!fs)
grub_errno = GRUB_ERR_NONE;