From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1WgCyy-0008KR-Cb for mharc-grub-devel@gnu.org; Fri, 02 May 2014 08:54:28 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38864) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WgCys-0008JK-4d for grub-devel@gnu.org; Fri, 02 May 2014 08:54:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WgCyn-0004bI-Ez for grub-devel@gnu.org; Fri, 02 May 2014 08:54:22 -0400 Received: from mail-out1.informatik.tu-muenchen.de ([131.159.0.8]:53580 helo=smtp1.informatik.tu-muenchen.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WgCyn-0004ZZ-8I for grub-devel@gnu.org; Fri, 02 May 2014 08:54:17 -0400 Received: (Authenticated sender: totakura) by mail.in.tum.de (Postfix) with ESMTPSA id D93B22400F6; Fri, 2 May 2014 14:54:13 +0200 (CEST) Message-ID: <53639575.6020109@totakura.in> Date: Fri, 02 May 2014 14:54:13 +0200 From: Sree Harsha Totakura User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Icedove/24.4.0 MIME-Version: 1.0 To: grub-devel@gnu.org Subject: Why ignore UUID when linux root device is an LV? X-Enigmail-Version: 1.6+git0.20140323 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: Solaris 10 X-Received-From: 131.159.0.8 Cc: Colin Watson 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, 02 May 2014 12:54:26 -0000 Hi, I would like to know why UUID is not used for root device in Linux kernel's `root=' parameter when the root device uses LVM. The following is a snippet from util/10_linux.in: > if [ "x${GRUB_DEVICE_UUID}" = "x" ] || [ "x${GRUB_DISABLE_LINUX_UUID}" = "xtrue" ] \ > || ! test -e "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" \ > || uses_abstraction "${GRUB_DEVICE}" lvm; then > LINUX_ROOT_DEVICE=${GRUB_DEVICE} > else > LINUX_ROOT_DEVICE=UUID=${GRUB_DEVICE_UUID} > fi I have a setup where my root device resides on an LV which is created from an LUKS encrypted partition. The kernel's initramfs takes care of opening the encrypted partition and exposing the logical volumes. So, I believe the condition `uses_abstraction "${GRUB_DEVICE}" lvm' is not required; or am I missing anything? >From the commit log: > commit 507736c87c49712ac618169d17a659bd6c25eecc > Author: Colin Watson > Date: Fri Jul 2 12:32:05 2010 +0100 > > * util/grub-mkconfig_lib.in (uses_abstraction): New function. > * util/grub.d/10_linux.in: Use it to check for LVM, so that > LVM-on-RAID is handled correctly. I see that this condition is added to address LVM/RAID configurations. But, I guess it is similar to LVM/LUKS; is it not? I tried booting my setup with root devices addressed by UUID and it works. In fact, some initramfs errors about not being to able to find volume group are no longer present. I guess these errors were apparent when `root=/dev/mapper/vg0-root' parameter is used as the volume group `vg0' is only visible after decrypting the LUKS partition. When the root device is addressed by UUID, the initramfs does not lookout for `vg0' before opening LUKS partition. Regards, Sree