All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch] incorrect root device while /dev/ on tmpfs
@ 2009-10-17 12:24 Vasily Averin
  2009-10-17 12:50 ` Felix Zielcke
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Vasily Averin @ 2009-10-17 12:24 UTC (permalink / raw)
  To: grub-devel

[-- Attachment #1: Type: text/plain, Size: 339 bytes --]

While /dev mounted as tmpfs it does not contain /dev/disk/by-uuid directory,
10_linux script did not check it properly and do not set root device via UUID.
Therefore following kernel boot can fail (incorrect root device) if device names
was changed.

Attached path fixes this issue. Please review and commit it

thank you,
	Vasily Averin


[-- Attachment #2: grub2-tmpdevuuid.patch --]
[-- Type: text/plain, Size: 601 bytes --]

diff -up ./util/grub.d/10_linux.in.tmpdevuuid ./util/grub.d/10_linux.in
--- ./util/grub.d/10_linux.in.tmpdevuuid	2009-08-29 20:05:06.000000000 +0400
+++ ./util/grub.d/10_linux.in	2009-09-03 11:07:34.000000000 +0400
@@ -36,7 +36,7 @@ case ${GRUB_DEVICE} in
 esac
 
 if [ "x${GRUB_DEVICE_UUID}" = "x" ] || [ "x${GRUB_DISABLE_LINUX_UUID}" = "xtrue" ] \
-    || ! test -e "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" ; then
+    || ( test -d /dev/disk/by-uuid  && ! test -e "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}") ; then
   LINUX_ROOT_DEVICE=${GRUB_DEVICE}
 else
   LINUX_ROOT_DEVICE=UUID=${GRUB_DEVICE_UUID}

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

end of thread, other threads:[~2009-10-17 13:40 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-17 12:24 [patch] incorrect root device while /dev/ on tmpfs Vasily Averin
2009-10-17 12:50 ` Felix Zielcke
2009-10-17 12:56   ` Colin Watson
2009-10-17 13:40     ` Felix Zielcke
2009-10-17 12:55 ` Colin Watson
2009-10-17 13:39 ` Vladimir 'phcoder' Serbinenko

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.