summaryrefslogtreecommitdiff
path: root/meta/recipes-core/initrdscripts/files
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-23 07:55:50 +0100
commit1964b697ddadc59e27087f9f1f6b24236f4addcc (patch)
tree1c92aaabae6deef42750659ed1e1d2e806bf72a9 /meta/recipes-core/initrdscripts/files
parent3b635d34d44ee65f8cf93bc180f1ccc1095f2174 (diff)
downloadopenembedded-core-1964b697ddadc59e27087f9f1f6b24236f4addcc.tar.gz
openembedded-core-1964b697ddadc59e27087f9f1f6b24236f4addcc.tar.bz2
openembedded-core-1964b697ddadc59e27087f9f1f6b24236f4addcc.zip
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. Signed-off-by: Awais Belal <awais_belal@mentor.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'meta/recipes-core/initrdscripts/files')
-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
# Get a list of hard drives
hdnamelist=""
-live_dev_name=${1%%/*}
+live_dev_name=`cat /proc/mounts | grep ${1%/} | awk '{print $1}'`
+live_dev_name=${live_dev_name#\/dev/}
live_dev_name=${live_dev_name%%[0-9]*}
echo "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
# Get a list of hard drives
hdnamelist=""
-live_dev_name=${1%%/*}
+live_dev_name=`cat /proc/mounts | grep ${1%/} | awk '{print $1}'`
+live_dev_name=${live_dev_name#\/dev/}
live_dev_name=${live_dev_name%%[0-9]*}
echo "Searching for hard drives ..."