From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1Rvwaf-000849-MX for mharc-grub-devel@gnu.org; Fri, 10 Feb 2012 14:57:05 -0500 Received: from eggs.gnu.org ([140.186.70.92]:53546) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RvwaZ-000831-I7 for grub-devel@gnu.org; Fri, 10 Feb 2012 14:57:03 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RvwaY-0003XP-0q for grub-devel@gnu.org; Fri, 10 Feb 2012 14:56:59 -0500 Received: from mail-ww0-f49.google.com ([74.125.82.49]:55996) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RvwaX-0003XI-H2 for grub-devel@gnu.org; Fri, 10 Feb 2012 14:56:57 -0500 Received: by wgbdt13 with SMTP id dt13so2386899wgb.30 for ; Fri, 10 Feb 2012 11:56:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type; bh=M9fEbH1OCaLECkVPVb9L0XJqOYiSJAPbvB+FUzL+DbE=; b=XoCIAO/WKX3EV0rXhmmH315Fp46e2cIZcCHNdO5vdOcO9VxvQl67FuIXqrLm/VGZQe R9DxfBkCwSRriJgvJfR/MigPS5yGLuNhKNfQXWPvQQPw+zyrMo/FRjvdfxoZqefu55+h hrIgX6uyw9j7CT9UmWXtqCH8KyfioKjoqhPwo= Received: by 10.216.139.97 with SMTP id b75mr1328985wej.0.1328903816591; Fri, 10 Feb 2012 11:56:56 -0800 (PST) Received: from debian.x201.phnet (93-93.203-62.cust.bluewin.ch. [62.203.93.93]) by mx.google.com with ESMTPS id q7sm5392665wix.5.2012.02.10.11.56.54 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 10 Feb 2012 11:56:55 -0800 (PST) Message-ID: <4F357684.1020307@gmail.com> Date: Fri, 10 Feb 2012 20:56:52 +0100 From: =?UTF-8?B?VmxhZGltaXIgJ8+GLWNvZGVyL3BoY29kZXInIFNlcmJpbmVua28=?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:8.0) Gecko/20120104 Icedove/8.0 MIME-Version: 1.0 To: Lennart Sorensen Subject: Re: Various build failures in current bzr tree References: <20120209190204.GW27742@caffeine.csclub.uwaterloo.ca> <20120209193301.GX27742@caffeine.csclub.uwaterloo.ca> <20120209205045.GY27742@caffeine.csclub.uwaterloo.ca> <20120209205603.GZ27742@caffeine.csclub.uwaterloo.ca> <4F34509C.5050005@gmail.com> <20120210155450.GB27742@caffeine.csclub.uwaterloo.ca> <4F3541A4.10502@gmail.com> <20120210181823.GD27742@caffeine.csclub.uwaterloo.ca> <4F356983.40905@gmail.com> <20120210191226.GI27742@caffeine.csclub.uwaterloo.ca> In-Reply-To: <20120210191226.GI27742@caffeine.csclub.uwaterloo.ca> Content-Type: multipart/mixed; boundary="------------040205050906050900090202" X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 74.125.82.49 Cc: The development of GNU GRUB X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Feb 2012 19:57:03 -0000 This is a multi-part message in MIME format. --------------040205050906050900090202 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit 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: > > 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 --------------040205050906050900090202 Content-Type: text/x-diff; name="1.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="1.diff" === 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 . # # 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)); } --------------040205050906050900090202--