>From 9049389abd37ab8251d4bfcb3ee73012221e7546 Mon Sep 17 00:00:00 2001 From: Fedora Ninjas 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