All of lore.kernel.org
 help / color / mirror / Atom feed
From: sean finney <seanius@debian.org>
To: grub-devel@gnu.org
Subject: [PATCH] Fix root device detection for lvm2
Date: Wed, 2 Jun 2010 21:07:44 +0200	[thread overview]
Message-ID: <20100602190744.GA4058@rangda.stickybit.se> (raw)


[-- 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 --]

             reply	other threads:[~2010-06-02 19:47 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-02 19:07 sean finney [this message]
2010-07-01 21:25 ` [PATCH] Fix root device detection for lvm2 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100602190744.GA4058@rangda.stickybit.se \
    --to=seanius@debian.org \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.