From: "Vladimir 'φ-coder/phcoder' Serbinenko" <phcoder@gmail.com>
To: Lennart Sorensen <lsorense@csclub.uwaterloo.ca>
Cc: The development of GNU GRUB <grub-devel@gnu.org>
Subject: Re: Various build failures in current bzr tree
Date: Fri, 10 Feb 2012 20:56:52 +0100 [thread overview]
Message-ID: <4F357684.1020307@gmail.com> (raw)
In-Reply-To: <20120210191226.GI27742@caffeine.csclub.uwaterloo.ca>
[-- Attachment #1: Type: text/plain, Size: 1278 bytes --]
On 10.02.2012 20:12, Lennart Sorensen wrote:
> On Fri, Feb 10, 2012 at 08:01:23PM +0100, Vladimir 'φ-coder/phcoder' Serbinenko wrote:
>> I agree that it should be fixed but the question is how.
> I can't think of a way that would work if the disks were in fact using
> different setups, which they could be.
>
>> No
> OK, fair enough if the below worked then.
>
>>> Currently it only
>>> tries to include partition table support for grub_device, which being
>>> an md raid returns nothing.
>> This is a problem. It should return the partmap of underlying device
>> and we have code for that. What does grub-probe -t partmap -d
>> /dev/mdX is?
> root@rceng03new:~# grub-probe -t partmap -d /dev/md0
>
> root@rceng03new:~#
>
> So that would be a problem of course.
>
> root@rceng03new:~# cat /proc/mdstat
> Personalities : [raid1] [raid6] [raid5] [raid4]
> md1 : active raid5 sda3[0] sdb3[1]
> 284773376 blocks super 1.2 level 5, 512k chunk, algorithm 2 [3/2] [UU_]
>
> md0 : active raid1 sda2[0] sdb2[1]
> 976884 blocks super 1.2 [2/2] [UU]
>
> unused devices:<none>
>
> md0 is /boot
> md1 is /
>
> When I do the final install I will probably but lvm on md1 and put /
> and swap and other things on that.
>
--
Regards
Vladimir 'φ-coder/phcoder' Serbinenko
[-- Attachment #2: 1.diff --]
[-- Type: text/x-diff, Size: 5080 bytes --]
=== modified file 'docs/grub.texi'
--- docs/grub.texi 2012-01-31 21:59:32 +0000
+++ docs/grub.texi 2012-02-10 17:11:59 +0000
@@ -20,7 +20,7 @@
This manual is for GNU GRUB (version @value{VERSION},
@value{UPDATED}).
-Copyright @copyright{} 1999,2000,2001,2002,2004,2006,2008,2009,2010 Free Software Foundation, Inc.
+Copyright @copyright{} 1999,2000,2001,2002,2004,2006,2008,2009,2010,2011,2012 Free Software Foundation, Inc.
@quotation
Permission is granted to copy, distribute and/or modify this document
=== modified file 'gentpl.py'
--- gentpl.py 2011-12-24 14:09:26 +0000
+++ gentpl.py 2012-02-10 17:10:18 +0000
@@ -1,4 +1,19 @@
#! /usr/bin/python
+# GRUB -- GRand Unified Bootloader
+# Copyright (C) 2010,2011 Free Software Foundation, Inc.
+#
+# GRUB is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# GRUB is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GRUB. If not, see <http://www.gnu.org/licenses/>.
#
# This is the python script used to generate Makefile.tpl
=== modified file 'grub-core/disk/diskfilter.c'
--- grub-core/disk/diskfilter.c 2012-02-09 22:43:43 +0000
+++ grub-core/disk/diskfilter.c 2012-02-10 19:54:58 +0000
@@ -260,6 +260,24 @@
return list;
}
+void
+grub_diskfilter_print_partmap (grub_disk_t disk)
+{
+ struct grub_diskfilter_lv *lv = disk->data;
+ struct grub_diskfilter_pv *pv;
+
+ if (lv->vg->pvs)
+ for (pv = lv->vg->pvs; pv; pv = pv->next)
+ {
+ grub_size_t s;
+ if (!pv->disk)
+ grub_util_error (_("Couldn't find physical volume `%s'."
+ " Check your device.map"), pv->name);
+ for (s = 0; pv->partmaps[s]; s++)
+ grub_printf ("%s ", pv->partmaps[s]);
+ }
+}
+
static const char *
grub_diskfilter_getname (struct grub_disk *disk)
{
@@ -964,6 +982,19 @@
pv->part_start = grub_partition_get_start (disk->partition);
pv->part_size = grub_disk_get_size (disk);
+#ifdef GRUB_UTIL
+ {
+ grub_size_t s = 1;
+ grub_partition_t p;
+ for (p = disk->partition; p; p = p->parent)
+ s++;
+ pv->partmaps = xmalloc (s * sizeof (pv->partmaps[0]));
+ s = 0;
+ for (p = disk->partition; p; p = p->parent)
+ pv->partmaps[s++] = xstrdup (p->partmap->name);
+ pv->partmaps[s++] = 0;
+ }
+#endif
if (start_sector != (grub_uint64_t)-1)
pv->start_sector = start_sector;
pv->start_sector += pv->part_start;
=== modified file 'include/grub/diskfilter.h'
--- include/grub/diskfilter.h 2012-01-29 13:28:01 +0000
+++ include/grub/diskfilter.h 2012-02-10 19:53:29 +0000
@@ -72,6 +72,9 @@
struct grub_diskfilter_pv *next;
/* Optional. */
grub_uint8_t *internal_id;
+#ifdef GRUB_UTIL
+ char **partmaps;
+#endif
};
struct grub_diskfilter_lv {
@@ -186,6 +189,8 @@
struct grub_diskfilter_pv *
grub_diskfilter_get_pv_from_disk (grub_disk_t disk,
struct grub_diskfilter_vg **vg);
+void
+grub_diskfilter_print_partmap (grub_disk_t disk);
#endif
#endif /* ! GRUB_RAID_H */
=== modified file 'util/getroot.c'
--- util/getroot.c 2012-02-10 12:17:12 +0000
+++ util/getroot.c 2012-02-10 18:48:24 +0000
@@ -372,7 +372,7 @@
char *buf = NULL;
size_t len = 0;
char **ret = NULL;
- int entry_len = 0, entry_max = 4;
+ grub_size_t entry_len = 0, entry_max = 4;
struct mountinfo_entry *entries;
struct mountinfo_entry parent_entry = { 0, 0, 0, "", "", "", "" };
int i;
@@ -1991,7 +1991,7 @@
const grub_partition_t partition)
{
grub_disk_addr_t part_start = 0;
- grub_util_info ("Partition %d starts from %lu",
+ grub_util_info ("Partition %d starts from %" PRIuGRUB_UINT64_T,
partition->number, partition->start);
part_start = grub_partition_get_start (partition);
@@ -2022,7 +2022,7 @@
return 0;
}
- grub_util_info ("%s starts from %lu", os_dev, start);
+ grub_util_info ("%s starts from %" PRIuGRUB_UINT64_T, os_dev, start);
if (start == 0 && device_is_wholedisk (os_dev))
return name;
=== modified file 'util/grub-probe.c'
--- util/grub-probe.c 2012-02-10 11:57:00 +0000
+++ util/grub-probe.c 2012-02-10 19:56:18 +0000
@@ -87,6 +87,9 @@
for (part = disk->partition; part; part = part->parent)
printf ("%s ", part->partmap->name);
+ if (disk->dev->id == GRUB_DISK_DEVICE_DISKFILTER_ID)
+ grub_diskfilter_print_partmap (disk);
+
/* In case of LVM/RAID, check the member devices as well. */
if (disk->dev->memberlist)
{
@@ -304,7 +307,7 @@
raid_level = probe_raid_level (disk);
if (raid_level >= 0)
{
- printf ("raid ");
+ printf ("diskfilter ");
if (disk->dev->raidname)
printf ("%s ", disk->dev->raidname (disk));
}
next prev parent reply other threads:[~2012-02-10 19:57 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-09 19:02 Various build failures in current bzr tree Lennart Sorensen
2012-02-09 19:33 ` Lennart Sorensen
2012-02-09 20:50 ` Lennart Sorensen
2012-02-09 20:56 ` Lennart Sorensen
2012-02-09 23:02 ` Vladimir 'φ-coder/phcoder' Serbinenko
2012-02-10 15:54 ` Lennart Sorensen
2012-02-10 16:11 ` Vladimir 'φ-coder/phcoder' Serbinenko
2012-02-10 18:18 ` Lennart Sorensen
2012-02-10 19:01 ` Vladimir 'φ-coder/phcoder' Serbinenko
2012-02-10 19:12 ` Lennart Sorensen
2012-02-10 19:41 ` Vladimir 'φ-coder/phcoder' Serbinenko
2012-02-10 19:56 ` Vladimir 'φ-coder/phcoder' Serbinenko [this message]
2012-02-10 20:31 ` Lennart Sorensen
2012-02-10 20:39 ` Lennart Sorensen
2012-02-10 16:16 ` Vladimir 'φ-coder/phcoder' Serbinenko
2012-02-10 18:31 ` Lennart Sorensen
2012-02-09 22:59 ` Vladimir 'φ-coder/phcoder' Serbinenko
2012-02-10 15:45 ` Lennart Sorensen
2012-02-10 16:02 ` Vladimir 'φ-coder/phcoder' Serbinenko
2012-02-10 18:15 ` Lennart Sorensen
2012-02-10 18:57 ` Vladimir 'φ-coder/phcoder' Serbinenko
2012-02-10 19:05 ` Lennart Sorensen
2012-02-10 18:58 ` Vladimir 'φ-coder/phcoder' Serbinenko
2012-02-10 19:08 ` Lennart Sorensen
2012-02-10 19:14 ` Lennart Sorensen
2012-02-10 19:25 ` Vladimir 'φ-coder/phcoder' Serbinenko
2012-02-10 20:25 ` Lennart Sorensen
2012-02-10 20:38 ` Vladimir 'φ-coder/phcoder' Serbinenko
2012-02-10 20:43 ` Lennart Sorensen
2012-02-10 23:14 ` Lennart Sorensen
2012-02-10 23:38 ` Vladimir 'φ-coder/phcoder' Serbinenko
[not found] ` <20120212000258.GP27742@caffeine.csclub.uwaterloo.ca>
2012-02-12 1:02 ` Vladimir 'φ-coder/phcoder' Serbinenko
2012-02-12 17:35 ` Lennart Sorensen
2012-02-12 17:41 ` Lennart Sorensen
2012-02-12 20:19 ` Bruce Dubbs
2012-02-12 20:29 ` Lennart Sorensen
2012-02-13 15:39 ` Lennart Sorensen
2012-02-15 17:04 ` Lennart Sorensen
2012-02-10 19:01 ` Lennart Sorensen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4F357684.1020307@gmail.com \
--to=phcoder@gmail.com \
--cc=grub-devel@gnu.org \
--cc=lsorense@csclub.uwaterloo.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.