All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Fix root device detection for lvm2
@ 2010-06-02 19:07 sean finney
  2010-07-01 21:25 ` Vladimir 'φ-coder/phcoder' Serbinenko
  0 siblings, 1 reply; 5+ messages in thread
From: sean finney @ 2010-06-02 19:07 UTC (permalink / raw)
  To: grub-devel


[-- Attachment #1.1: Type: text/plain, Size: 381 bytes --]

If you have a single / filesystem on lvm2, the boot process will hang
waiting for a root filesystem that never appears.  This patch modifies
the logic in deciding what the root device actually is, and allows the
initramfs to succesfully load the root filesystem.

The attached patch has been in use in the debian "grub2" packages for
quite a while, so I assume it's safe to use :)

[-- Attachment #1.2: 01_uuids_and_lvm_dont_play_along_nicely.diff --]
[-- Type: text/x-diff, Size: 611 bytes --]

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}

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 190 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-07-02 11:34 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-02 19:07 [PATCH] Fix root device detection for lvm2 sean finney
2010-07-01 21:25 ` Vladimir 'φ-coder/phcoder' Serbinenko
2010-07-01 23:32   ` Colin Watson
2010-07-01 23:44     ` Vladimir 'φ-coder/phcoder' Serbinenko
2010-07-02 11:34       ` Colin Watson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.