Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1N3HmR-0000Y7-RZ for mharc-grub-devel@gnu.org; Wed, 28 Oct 2009 19:18:15 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N3HmP-0000WG-Uz for grub-devel@gnu.org; Wed, 28 Oct 2009 19:18:13 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N3HmL-0000S9-7U for grub-devel@gnu.org; Wed, 28 Oct 2009 19:18:13 -0400 Received: from [199.232.76.173] (port=32877 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N3HmL-0000S3-3R for grub-devel@gnu.org; Wed, 28 Oct 2009 19:18:09 -0400 Received: from moutng.kundenserver.de ([212.227.17.10]:61007) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1N3HmK-0000mr-FP for grub-devel@gnu.org; Wed, 28 Oct 2009 19:18:08 -0400 Received: from [85.180.49.145] (e180049145.adsl.alicedsl.de [85.180.49.145]) by mrelayeu.kundenserver.de (node=mrbap0) with ESMTP (Nemesis) id 0MQu3K-1McJn63F9S-00Tku6; Thu, 29 Oct 2009 00:18:06 +0100 From: Felix Zielcke To: The development of GRUB 2 In-Reply-To: <20091028230003.GB16736@thorin> References: <1256769231.12048.16.camel@fz.local> <20091028230003.GB16736@thorin> Content-Type: text/plain; charset="UTF-8" Date: Thu, 29 Oct 2009 00:18:05 +0100 Message-ID: <1256771885.12048.27.camel@fz.local> Mime-Version: 1.0 X-Mailer: Evolution 2.28.1 Content-Transfer-Encoding: 7bit X-Provags-ID: V01U2FsdGVkX198/j+fNDSD+pN3dtngNN19Je+kQjNaqVd5sxG AFVijpFw2xI1AJj1jcHcbgGQvAtQTJcL94wujte6JVR4pzh2Fr fHNQ+iwbh3mDVBqP8k20ArJCmkeyB78 X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Subject: Re: [PATCH] try to reread partition table in 10_linux X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Oct 2009 23:18:14 -0000 Am Donnerstag, den 29.10.2009, 00:00 +0100 schrieb Robert Millan: > On Wed, Oct 28, 2009 at 11:33:51PM +0100, Felix Zielcke wrote: > > +if which sfdisk /dev/null ; then > > + GRUB_DEVICE_DISK=`echo ${GRUB_DEVICE} | sed -e "s/[0-9]*$//"` > > + sfdisk -R ${GRUB_DEVICE_DISK} 2>/dev/null > > +fi > > s/[0-9]*$// doesn't catch all partition path layouts. More heuristic > is needed for that (we have this in util/hostdisk.c), but duplicating it > doesn't sound like a good idea. Oh right I forgot about e.g. the hardware RAID controllers. Hm if grub-probe would accept a GRUB device, we could use 2 grub-probe calls to do that. i.e. something like tmp_drive=`grub-probe -t drive -d ${GRUB_DEVICE} | sed -e 's/,[a-z0-9]//g'` GRUB_DEVICE_DISK=`grub-probe -t device ${tmp_drive}` > Can this be avoided altogether? E.g. by telling Linux the partition path > instead, or by using another interface. I don't think we can: $ LANG=C sudo sfdisk -R /dev/hda2 BLKRRPART: Invalid argument I doubt the kernel provides more then one way to reread the partition table. Hm but maybe libparted or something else has a wrapper for this. -- Felix Zielcke Proud Debian Maintainer and GNU GRUB developer