grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Fix root device detection for lvm2


From: Colin Watson
Subject: Re: [PATCH] Fix root device detection for lvm2
Date: Fri, 2 Jul 2010 00:32:27 +0100
User-agent: Mutt/1.5.18 (2008-05-17)

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                                       address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]