OK, my first attempt to get this accepted as a bug report with patches
to fix the problem seems to have been ignored. The patches to os-prober
needed for the btrfs support have been submitted to os-prober upstream
and are currently being staged to Fedora 17 and Fedora 18 as os-prober-1.57.
Grub2 will work fine with these patches if os-prober has not been
updated and os-prober will work fine if grub2 is not updated.
BUT, you need both sets of updates for the needed btrfs support.
The basic btrfs support grub2 patch is attached.
Also attached is a fix to support a btrfs volume to be on multiple devices.
Gene
>From 9049389abd37ab8251d4bfcb3ee73012221e7546 Mon Sep 17 00:00:00 2001
From: Fedora Ninjas <grub2-ow...@fedoraproject.org>
Date: Thu, 10 Jan 2013 08:57:28 -0500
Subject: [PATCH] Add btrfs support for root and boot on a subvolume
This patch adds support for having root ("/") and or /boot
being on a btrfs subvolume. It also supports no separate
/boot.
This requires an updated os-prober package which also provides
btrfs support for both os-prober and linux-boot-prober.
---
util/grub.d/30_os-prober.in | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/util/grub.d/30_os-prober.in b/util/grub.d/30_os-prober.in
index bcc6c25..be989ac 100644
--- a/util/grub.d/30_os-prober.in
+++ b/util/grub.d/30_os-prober.in
@@ -112,6 +112,11 @@ for OS in ${OSPROBED} ; do
LONGNAME="`echo ${OS} | cut -d ':' -f 2 | tr '^' ' '`"
LABEL="`echo ${OS} | cut -d ':' -f 3 | tr '^' ' '`"
BOOT="`echo ${OS} | cut -d ':' -f 4`"
+ BTRFS="`echo ${OS} | cut -d ':' -f 5`"
+ if [ "x$BTRFS" = "xbtrfs" ]; then
+ BTRFSuuid="`echo ${OS} | cut -d ':' -f 6`"
+ BTRFSsubvol="`echo ${OS} | cut -d ':' -f 7`"
+ fi
if [ -z "${LONGNAME}" ] ; then
LONGNAME="${LABEL}"
@@ -145,7 +150,11 @@ EOF
EOF
;;
linux)
- LINUXPROBED="`linux-boot-prober ${DEVICE} 2> /dev/null | tr ' ' '^' | paste -s -d ' '`"
+ if [ "x$BTRFS" = "xbtrfs" ]; then
+ LINUXPROBED="`linux-boot-prober btrfs ${BTRFSuuid} ${BTRFSsubvol} 2> /dev/null | tr ' ' '^' | paste -s -d ' '`"
+ else
+ LINUXPROBED="`linux-boot-prober ${DEVICE} 2> /dev/null | tr ' ' '^' | paste -s -d ' '`"
+ fi
prepare_boot_cache=
boot_device_id=
is_first_entry=true
--
1.8.1
_______________________________________________
Bug-grub mailing list
Bug-grub@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-grub