Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1OUTFT-00050h-DF for mharc-grub-devel@gnu.org; Thu, 01 Jul 2010 19:32:51 -0400 Received: from [140.186.70.92] (port=49011 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OUTFM-0004yF-5C for grub-devel@gnu.org; Thu, 01 Jul 2010 19:32:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OUTFG-0005gx-QV for grub-devel@gnu.org; Thu, 01 Jul 2010 19:32:44 -0400 Received: from smarthost01.mail.zen.net.uk ([212.23.3.140]:47054) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OUTFG-0005gg-MJ for grub-devel@gnu.org; Thu, 01 Jul 2010 19:32:38 -0400 Received: from [82.69.40.219] (helo=riva.pelham.vpn.ucam.org) by smarthost01.mail.zen.net.uk with esmtp (Exim 4.63) (envelope-from ) id 1OUTFD-0001Hq-DN for grub-devel@gnu.org; Thu, 01 Jul 2010 23:32:36 +0000 Received: from cjwatson by riva.pelham.vpn.ucam.org with local (Exim 3.36 #1 (Debian)) for grub-devel@gnu.org id 1OUTF5-0007WN-00; Fri, 02 Jul 2010 00:32:27 +0100 Date: Fri, 2 Jul 2010 00:32:27 +0100 From: Colin Watson To: The development of GNU GRUB Message-ID: <20100701233226.GU21862@riva.ucam.org> References: <20100602190744.GA4058@rangda.stickybit.se> <4C2D07AC.6020006@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <4C2D07AC.6020006@gmail.com> User-Agent: Mutt/1.5.18 (2008-05-17) X-Originating-Smarthost01-IP: [82.69.40.219] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) Subject: Re: [PATCH] Fix root device detection for lvm2 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 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: Thu, 01 Jul 2010 23:32:49 -0000 On Thu, Jul 01, 2010 at 11:25:00PM +0200, Vladimir 'φ-coder/phcoder' Serbinenko wrote: > On 06/02/2010 09:07 PM, sean finney wrote: > > Index: b/util/grub.d/10_linux.in > > =================================================================== > > --- a/util/grub.d/10_linux.in > > +++ b/util/grub.d/10_linux.in > > @@ -43,7 +43,8 @@ > > esac > > > > if [ "x${GRUB_DEVICE_UUID}" = "x" ] || [ "x${GRUB_DISABLE_LINUX_UUID}" = "xtrue" ] \ > > - || ! test -e "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" ; then > > + || ! test -e "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" \ > > + || [ "`grub-probe -t abstraction --device ${GRUB_DEVICE} | sed -e 's,.*\(lvm\).*,\1,'`" = "lvm" ] ; then > > LINUX_ROOT_DEVICE=${GRUB_DEVICE} > > else > > LINUX_ROOT_DEVICE=UUID=${GRUB_DEVICE_UUID} > > Applied with some chages. Thanks The changes seem to have been to simplify the test to: [ "x`grub-probe -t abstraction --device ${GRUB_DEVICE}`" = "xlvm" ] Unfortunately this is an incorrect simplification. grub-probe can print multiple abstractions, and does in the case of e.g. LVM on RAID. If it is correct to avoid UUIDs for plain LVM, it is also correct to avoid them for LVM on RAID. -- Colin Watson [cjwatson@ubuntu.com]