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: Vladimir 'φ-coder/phcoder' Serbinenko
Subject: Re: [PATCH] Fix root device detection for lvm2
Date: Fri, 02 Jul 2010 01:44:21 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100515 Icedove/3.0.4

On 07/02/2010 01:32 AM, Colin Watson wrote:
> 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.
>
>   
Ok I agree. The problem with original patch was that it would accept
ttttlvmuuu too. Feel free to fix.


-- 
Regards
Vladimir 'φ-coder/phcoder' Serbinenko


Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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