summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core
diff options
context:
space:
mode:
authorAwais Belal <awais_belal@mentor.com>2015-05-21 19:28:34 +0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-05-24 07:19:18 +0100
commite1de8af4877d0dce6d4f1ca3a6204d8fc45a8612 (patch)
treeb6281480d2e0999653db66ca6ef5dbff4f5f0e57 /meta/recipes-core
parent9da81df30e78005a076f6644dbe3fd6ab7dbc1ca (diff)
downloadpoky-e1de8af4877d0dce6d4f1ca3a6204d8fc45a8612.tar.gz
initrdscripts: make boot drive detection more generic
The init script that invokes install and install-efi scripts passes the first parameter that identifies the boot drive but in cases when this disk is labeled and kernel configurations allow disk labeling under /run/media/ this would pass the disk label. The earlier implementation considered that the drive name will be passed and in case the label is passed it fails and provides the boot drive as an option for installation driver. We now use a more generic approach to identify the boot drive which can handle both drive name as well as label if passed. (From OE-Core rev: 1964b697ddadc59e27087f9f1f6b24236f4addcc) Signed-off-by: Awais Belal <awais_belal@mentor.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core')
-rw-r--r--meta/recipes-core/initrdscripts/files/init-install-efi.sh3
-rw-r--r--meta/recipes-core/initrdscripts/files/init-install.sh3
2 files changed, 4 insertions, 2 deletions
diff --git a/meta/recipes-core/initrdscripts/files/init-install-efi.sh b/meta/recipes-core/initrdscripts/files/init-install-efi.sh
index 329586d74d..8dd2749b5e 100644
--- a/meta/recipes-core/initrdscripts/files/init-install-efi.sh
+++ b/meta/recipes-core/initrdscripts/files/init-install-efi.sh
@@ -16,7 +16,8 @@ swap_ratio=5
16 16
17# Get a list of hard drives 17# Get a list of hard drives
18hdnamelist="" 18hdnamelist=""
19live_dev_name=${1%%/*} 19live_dev_name=`cat /proc/mounts | grep ${1%/} | awk '{print $1}'`
20live_dev_name=${live_dev_name#\/dev/}
20live_dev_name=${live_dev_name%%[0-9]*} 21live_dev_name=${live_dev_name%%[0-9]*}
21 22
22echo "Searching for hard drives ..." 23echo "Searching for hard drives ..."
diff --git a/meta/recipes-core/initrdscripts/files/init-install.sh b/meta/recipes-core/initrdscripts/files/init-install.sh
index fb537ee310..cb261630d0 100644
--- a/meta/recipes-core/initrdscripts/files/init-install.sh
+++ b/meta/recipes-core/initrdscripts/files/init-install.sh
@@ -15,7 +15,8 @@ swap_ratio=5
15 15
16# Get a list of hard drives 16# Get a list of hard drives
17hdnamelist="" 17hdnamelist=""
18live_dev_name=${1%%/*} 18live_dev_name=`cat /proc/mounts | grep ${1%/} | awk '{print $1}'`
19live_dev_name=${live_dev_name#\/dev/}
19live_dev_name=${live_dev_name%%[0-9]*} 20live_dev_name=${live_dev_name%%[0-9]*}
20 21
21echo "Searching for hard drives ..." 22echo "Searching for hard drives ..."